capabilities.work

Square Customer Order Then Pay

A 2-step recipe with Block. We can help you get access.

Recipe · 2 steps

Square Customer Order Then Pay

with Block

Create an order, then take payment only if the order is OPEN.

  1. Open an order with the supplied line items and branch on its state.
  2. Charge the supplied source for the amount at the location.
What you'll need to have ready
  • accessToken: Square access token presented as a Bearer credential.
  • locationId: The seller location the order and payment are associated with.
  • lineItems: Order line items, each with a name, quantity, and base_price_money.
  • sourceId: The payment source id (card nonce or token) to charge.
  • amount: The amount to charge in the smallest currency denomination.
  • currency: The ISO 4217 currency code for the charge.
  • orderIdempotencyKey: Idempotency key for the create-order request.
  • paymentIdempotencyKey: Idempotency key for the create-payment request.
For your developer

Arazzo workflow block:customer-order-then-pay, 2 operations: create-order → create-payment. Specs on APIs.io.