Is it possible to create an order and process/link its payment using a single API call?

Hi All,

I am integrating Square POS APIs with our ordering platform and would like to clarify whether it is possible to create an order and process its payment in a single API call.

Currently, my integration follows these three steps:

  1. Create Order API (POST /v2/orders) – Create the order with line items, taxes, discounts, service charges, and fulfillment details.

  2. Create Payment API (POST /v2/payments) – Process the customer’s payment using the relevant payment source.

  3. Pay Order API (POST /v2/orders/{order_id}/pay) – Associate the processed payment with the previously created order.

I would like to know whether Square provides a way to achieve this entire process with a single API call.

Specifically:

  1. Is there any option in the Create Order API to process or capture the payment while creating the order?

  2. Can payment details or a payment source be included directly in the Create Order API request?

  3. Alternatively, is there another Square API that allows us to create an order, process the payment, and associate the payment with the order in one request?

  4. If a single API call is not supported, is the current three-step approach (Create Order → Create Payment → Pay Order) the recommended implementation?

I would appreciate any guidance on the recommended approach and whether there are any API limitations or alternative workflows I should consider.

Thank you!

Hi,
No single call creates an order and charges it. CreateOrder doesn’t take a payment source. But you only need two calls, not three:

  1. POST /v2/orders to create the order.
  2. POST /v2/payments with that order_id and an amount_money equal to the order’s net_amount_due. autocomplete defaults to true, so the payment gets captured, linked to the order, and the order is marked paid, all in that one call.

You only need PayOrder if you create payments with autocomplete: false. That covers delayed capture, or splitting one order across several payments (e.g. a gift card plus a card). In those cases you call PayOrder with every payment_id once the total is covered.

If the payment amount doesn’t exactly match the order’s net_amount_due, the call fails with INVALID_REQUEST_ERROR. Most mismatches come from tax calculated differently on your side, especially on taxable service charges.

Docs: Pay for Orders