Start at the payment
When your own app already asked how the payer pays, open Volume's checkout straight on the address or Lightning invoice for that coin.
Volume's checkout normally starts by asking the payer how they pay: Bitcoin, Lightning, USDT or USDC. If your app already asked, say with its own "Paying with" list, name the coin when you create the checkout. Volume then skips the question and opens on the payment itself: the address and QR code (or for Lightning, the invoice), the amount and the network. It works the same on the hosted page and in the popup.
Name the coin
Pass pay_with when creating the checkout session: the coin, and the network too if
your app asked for it.
curl https://api.paywithvolume.com/v1/checkout_sessions \
-H "Authorization: Bearer $VOLUME_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"invoice_id": "inv_3Hf8QwZ1mKp7XnB2sLd9Vt4R",
"success_url": "https://pro.monierate.com/wallet",
"cancel_url": "https://pro.monierate.com/wallet",
"pay_with": { "asset": "USDT" }
}'asset | network it may name | Without a network, it starts on |
|---|---|---|
BTC | bitcoin, lightning | bitcoin (on-chain) |
USDT | tron, bsc, ethereum, solana | bsc (BNB Smart Chain) |
USDC | base, bsc, ethereum, solana | bsc (BNB Smart Chain) |
- Coin only. The checkout opens on the coin's cheapest network, and the payer may switch to any of its other networks on the payment screen. Ethereum is the dearest to send on, so it is never where a checkout starts.
- Coin and network. The checkout opens on that network, and the payer cannot change
it. Use this for Lightning:
{ "asset": "BTC", "network": "lightning" }.
The payer can pay only with what you named: the checkout offers no other coin, and no
other network when you named one. Leave pay_with out and Volume asks them, as before.
What can be refused
| Status | code | When |
|---|---|---|
| 400 | unsupported_payment_method | A network that does not carry the coin, such as USDT on base. Or lightning for more than $1,000, the most a Lightning payment carries: name bitcoin for larger amounts. |
| 400 | invalid_request | A coin or network Volume does not take, or no asset. |
| 400 | unknown_parameter | A field pay_with does not have, such as source. |
What the payer sees
The checkout is headed by who is paid and how much ("Pay $25 to Monierate"), then the
address or invoice to pay. There is no coin to go back to; Cancel payment
still returns them to your cancel_url, or closes the popup. From there the payment is
followed and receipted as on any checkout.
As on any checkout, the payer sends exactly the amount shown, and if their exchange charges a withdrawal fee, they add it on top.
With open_amount as well, the checkout
asks the amount first, then opens on the payment.
Reading it back
The checkout session carries pay_with as you sent it, with network null when you
named only the coin, and pay_with: null when the payer chooses. Once they have the
address, payment holds the coin and network they are paying on, as on any checkout.
Popup checkout
The same checkout in a popup over your own page, so the payer never leaves it. One script, one call, and your server still decides what is paid.
Let the payer enter the amount
For a wallet top-up, a donation or a tab, leave the amount to the payer. Volume's checkout asks how much, between your limits, then how they pay.