Checkouts
Hosted payment pages with the v2 API: a fiat amount, the coins you accept, signed events when paid or expired.
A checkout is a hosted page your customer pays on: they pick a coin, pay to a fresh address, watch the payment confirm, and are sent back to you. It is a payment link created with v2 names and v2 events.
curl -X POST https://api.noncepay.app/v2/checkouts \
-H 'content-type: application/json' \
-d '{
"amount": "49.90",
"currency": "usd",
"wallets": { "evm": "0xYourWallet", "tron": "TYourWallet" },
"assets": [{ "asset": "usdt", "network": "tron" }, { "asset": "usdt", "network": "bsc" }],
"webhook_url": "https://your-shop.com/noncepay",
"redirect_url": "https://your-shop.com/thanks",
"description": "Order 1042",
"metadata": { "order_id": "1042" }
}'Send your customer to the url it returns. Keep id and success_token: the token is returned only here. Once the
checkout is paid, the page sends the customer to redirect_url with checkout_id and success_token added: match the
order on checkout_id, check the token, and still fulfil only on checkout.paid.
type:payment(a fixedamount, paid once) ordonation(any amount, any number of times, with an optionalsuggested_amount).wallets: your wallet per key family (evm,tron,btc,ltc,bch,doge,sol), a single address or a split.assets: the coins offered; by default every coin of the families you gave a wallet for.expires_at(paymentonly): ISO 8601, at least 1 hour ahead; 7 days by default. Adonationcheckout never expires.tolerance_percent: 0 to 1.
Events
Each payment sends its own payment.detected and payment.forwarded, with the checkout id in data.checkout_id.
A payment checkout also sends checkout.paid once covered, or checkout.expired if it expires unpaid. Partial,
over and late payments follow the payment links rules: every payment is forwarded to
your wallet whatever happens to the checkout.
GET /v2/checkouts/{id} answers its status, amount_paid, amount_due and
the payments counted towards it.