<- Checkout API

Checkout API

Create payment link

POST

 /v2/online-checkout/payment-links

Creates a Square-hosted checkout page.

Applications can share the resulting payment link with their buyer to pay for goods and services.

Permissions:ORDERS_READ, ORDERS_WRITE, PAYMENTS_WRITE
Try in API Explorer
Link to section

Request body

Example code

Link to section

idempotency_key

string

A unique string that identifies this CreatePaymentLinkRequest request. If you do not provide a unique string (or provide an empty string as the value), the endpoint treats each request as independent.

For more information, see Idempotency.

Link to section

description

string

A description of the payment link. You provide this optional description that is useful in your application context. It is not used anywhere.

Link to section

quick_pay

Describes an ad hoc item and price for which to generate a quick pay checkout link. For more information, see Quick Pay Checkout.

Link to section

order

Describes the Order for which to create a checkout link. For more information, see Square Order Checkout.

Link to section

checkout_options

Link to section

pre_populated_data

Link to section

payment_note

string

A note for the payment. After processing the payment, Square adds this note to the resulting Payment.

Link to section

Response fields

Link to section

errors

Any errors that occurred during the request.

Link to section

payment_link

The created payment link.

Link to section

related_resources

The list of related objects.

Error descriptions