Square Order Checkout

Applies to: Checkout API | Orders API

Learn how to create a checkout for a Square order.

Link to section

Overview

An application can generate a checkout page by specifying an order in a CreatePaymentLink request (see Checkout API). The following example request specifies an Order object. For simplicity, the example specifies four ad hoc line items.

You can also use catalog items. Note that the catalog_object_id refers to the CatalogItemVariation ID that’s associated with a particular line item in a transaction. For more information, see Create Orders.

Create payment link

Applications can use the order ID to access the order details using the Orders API (RetrieveOrder endpoint).

The application can send the payment link to the buyer. The buyer experience is identical to what is described in Quick Pay Checkout.

Link to section

Finding a customer associated with a payment made for an order

Orders created from a payment link don't get associated with a customer. These orders don't include a customer_id field when they're retrieved by using the Orders API.

If a buyer completes a payment through the payment link that's associated with the order, you can find the buyer's customer_id in the Payment.customer_id field of the corresponding payment. Use the Payments API GetPayment endpoint to access the payment.

Link to section

See also