Create a checkout
Onlyamount 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’svalue, 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.
Return links
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:
The checkout page
Each checkout has a page at itsurl. On it the customer:
- Chooses a token and network from the ones you accept.
- Sees the address and the exact amount to send, with a QR code.
- Watches the page update as the payment is detected and completed.
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 atexpires_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:
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.