Create a checkout
Start an attempt at paying a link or payment, and reserve a fresh address for crypto.
Public, so a page you build can call it from the browser. Requires an Idempotency-Key, and allows 30 checkouts per 10 minutes from one IP address.
Each call is one attempt: a crypto checkout reserves a fresh address in the business's wallet and locks the rate, and when email is known it creates a pending payment right away. Card availability and limits depend on the amount and customer location. Customers review the total and complete any required identity checks on the secure payment page.
Called with your secret key, the response also has email, reporting and fee_rate_bps, as described on retrieve a checkout.
Body
payment_codestringThe code at the end of a payment'surl. Send this orlink_code.link_codestringThe code at the end of a link'surl.railstringcryptoorcard. Defaults tocrypto.assetstringFor crypto:USDC,USDT,BTC,ETHorSOL.networkstringFor crypto: a network the business accepts the asset on, such aspolygon.emailstringThe customer's email, which you see on the payment. Required for cards, and when the business asks for it.countrystringThe customer's two-letter country code, used to determine card-payment availability.replacesstringThe ID of the checkout this one replaces, when the customer goes back to choose again. The same choice returns the same quote and address, and a different one carries a link's pending payment over. Supersede the old checkout when the customer steps back: it stops being the quote on screen, but funds already on the way still count and can still be claimed.simulatestringFor testing only: how the transfer arrives,exact,underpaid,overpaidorwrong_network.latereturns 400 here; it's only reachable through simulating a transfer. See testing.
Errors
- 400
invalid_requestA field is missing or invalid, such as asimulatevalue it doesn't take. - 400
idempotency_key_requiredThe request has noIdempotency-Keyheader. - 400
email_requiredThe rail or the business needs the customer's email, and none was sent. - 400
invalid_emailemailisn't a valid email address. - 400
rail_unavailableThe business doesn't accept this rail. - 400
asset_unavailableThe business doesn't accept this coin on this network. - 400
amount_out_of_rangeThe price is outside the available card-payment limits. - 403
customer_blockedThe business has blocked the customer with this email. - 403
business_suspended402pay suspended the business, so it can't take new payments. - 403
test_mode_unavailableA test key can't open a checkout on a live business, so send none, as a customer's browser does, or a live key. - 404
link_not_foundNo active link has this code. - 404
payment_not_foundNo payment has this code. - 409
not_acceptingThe business isn't taking payments yet. - 409
payment_paidFunds already arrived for the payment: it succeeded, or it'sunderpaidorneeds_review. - 409
payment_canceledThe business canceled the payment. - 410
payment_expiredThe payment passed itsexpires_at. - 429
rate_limitedToo many checkouts from one IP address. Wait for Retry-After seconds. - 503
temporarily_unavailable402pay paused new checkouts, card payments, or payments on this network for now. Try again later.
Any request can also fail on its key or its body. See errors.
curl -X POST "https://dash.402pay.co/api/v1/checkouts" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d '{ "payment_code": "2jrsrcxv7k", "rail": "crypto", "asset": "USDC", "network": "polygon", "email": "harper.wilson@example.com" }'{ "data": { "id": "chk_C5yhPQvPqpYgdDgj", "kind": "checkout", "status": "open", "rail": "crypto", "link_id": null, "payment_id": "pmt_QI02vLdJGd48hBbg", "amount": 4900, "currency": "USD", "breakdown": { "currency": "USD", "price": 4900, "processing_fee": null, "network_fee": 2, "total": 4902 }, "crypto": { "asset": "USDC", "network": "polygon", "amount": "49.00", "address": "0x9a3c416D4A81669C01f4515bBDEB93C45d3813fe", "payment_uri": "ethereum:0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359@137/transfer?address=0x9a3c416D4A81669C01f4515bBDEB93C45d3813fe&uint256=49000000", "rate": { "amount": 100, "currency": "USD" }, "received_amount": "0.00", "remaining_amount": null, "remaining_payment_uri": null, "overpaid_amount": null, "detected_network": null, "tx_hash": null, "explorer_url": null }, "card": null, "confirmations": { "current": 0, "required": 4 }, "remainder": false, "canceled_by": null, "replaced_by": null, "failure_code": null, "review_reason": null, "success_url": "https://example.com/thanks", "expires_at": "2026-09-26T21:37:47.047Z", "sent_at": null, "created_at": "2026-09-26T21:22:47.047Z", "updated_at": "2026-09-26T21:22:47.047Z" }}