capabilities.work

Square Full Commerce Flow

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

Recipe · 5 steps

Square Full Commerce Flow

with Block

Location, customer, order, payment, and payment verification end to end.

  1. List the seller's locations and select the first for the sale.
  2. Create the customer profile the order and payment are attributed to.
  3. Open an order at the resolved location with the supplied line items.
  4. Charge the supplied source for the order amount at the location.
  5. Read the created payment back by id to confirm its settled status.
What you'll need to have ready
  • accessToken: Square access token presented as a Bearer credential.
  • givenName: The customer's first name.
  • familyName: The customer's last name.
  • emailAddress: The customer's email address.
  • 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.
  • customerIdempotencyKey: Idempotency key for the create-customer request.
  • orderIdempotencyKey: Idempotency key for the create-order request.
  • paymentIdempotencyKey: Idempotency key for the create-payment request.
For your developer

Arazzo workflow block:full-commerce-flow, 5 operations: list-locations → create-customer → create-order → create-payment → get-payment. Specs on APIs.io.