Skip to main content
A checkout is a request for one payment. It has an amount, a page where the customer pays, and a status that tells you whether it has been paid.

Create a checkout

Only amount and currency are required.
The full rules for each field are in Create a checkout.

Amount and currency

The amount is converted to US dollars when the checkout is created. The result is the checkout’s value, and it does not change afterwards. A checkout must be worth between 1 and 1,000,000 US dollars. Use no more decimal places than the currency has. "25.00" is valid for USD, and "2500" is valid for JPY, which has none. success_url and cancel_url are links on the checkout page. They are not redirects, and the customer may close the page without using them, so confirm payment with a webhook and not by waiting for the customer to arrive at success_url. Put {CHECKOUT_ID} anywhere in either URL and it is replaced with the checkout’s ID:

Reference and metadata

reference and metadata are stored with the checkout and returned whenever you read it, including in webhook events. Use them to tie a checkout to a record in your own system. You can find checkouts by reference later:
References do not have to be unique. If two checkouts share one, both are returned.

The checkout page

Each checkout has a page at its url. On it the customer:
  1. Chooses a token and network from the ones you accept.
  2. Sees the address and the exact amount to send, with a QR code.
  3. Watches the page update as the payment is detected and completed.
To show these details in your own site or app, see Build your own checkout.

Settings that change the page

Owners and admins of a merchant account can change how its checkout page behaves under Settings in the dashboard.

Statuses

A checkout starts as pending and usually moves to confirming and then completed. Each change after pending sends a webhook event named after the new status, such as checkout.completed. Fulfil an order when its checkout is completed. Treat resolved as paid too if you use it. Three flags add detail to the status: Underpayments and late payments explains what to do in each case.

Expiry

A checkout closes at expires_at. If it has not been paid in full by then, its status becomes expired. The default is 24 hours after creation. Set expires_at to any time between 10 minutes and 365 days from now:
To close a checkout early, for example when the customer cancels the order, expire it:
Only a pending or partial checkout can be expired.

Read a checkout

Get a checkout returns the checkout together with its quotes and payments:
received is the USDC that has reached your wallet from this checkout so far. It is lower than value on a fully paid checkout because the fee has been taken out. Use status, not received, to decide whether a checkout is paid. See Fees and settlement.