Square Returning Customer Checkout
A 4-step recipe with Block. We can help you get access.
Recipe · 4 steps
Square Returning Customer Checkout
with Block
Reuse or create a customer, then create an order and take payment.
- List customers and branch on whether an existing profile is available.
- Create a new customer profile when none was found.
- Open an order at the seller location with the supplied line items.
- Charge the supplied source for the order 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.
- givenName: First name to use when creating a new customer.
- familyName: Last name to use when creating a new customer.
- emailAddress: Email address to use when creating a new customer.
- 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:returning-customer-checkout, 4 operations: list-customers → create-customer → create-order → create-payment. Specs on APIs.io.