CoinsFlow Payments API
Create invoices, send customers to a hosted payment page, and track payments on Bitcoin, Litecoin, Ethereum and BNB Smart Chain, including USDT and USDC (TRON is switched off for now). JSON over HTTPS; no SDK required.
For AI agents & LLM integrations
Base URL: https://api.coinsflow.app
Auth: header Authorization: Bearer cf_live_…. Keys come from https://coinsflow.app/apis/dashboard.
Amounts: always decimal strings, e.g. "0.015". Never JSON numbers.
Endpoints: POST /v1/invoices · GET /v1/invoices/{id} · GET /v1/invoices · POST /v1/invoices/{id}/cancel · POST /v1/invoices/{id}/accept · POST /v1/invoices/{id}/simulate · GET /v1/balances · GET /v1/me · GET /v1/stats · GET /v1/withdrawals/quote · POST /v1/withdrawals · GET /v1/withdrawals/{id} · GET /v1/withdrawals · POST /v1/withdrawals/{id}/cancel · /v1/webhooks · GET /chains · GET /prices · GET /status
Webhooks: header CoinsFlow-Signature: t=…,v1=…; v1 = hex HMAC-SHA256(secret, "<t>.<raw body>"). Dedupe on the event id.
Networks: bitcoin, litecoin, ethereum, bsc; tron is switched off for now (503 chain_unavailable). GET /chains says which take payments.
Testing: add "test": true to POST /v1/invoices; pay it with POST /v1/invoices/{id}/simulate. No money moves; the same webhooks arrive, marked "test": true.
Statuses: new invoices are pending; fulfil at paid, overpaid or settled; detected is not paid yet.
Any coin: omit chain and asset, send priceAmount (USD) or openAmount: true (pay what you want) and optionally accept; the invoice is awaiting_choice (chain, asset, address, amountDue null) until the customer picks a coin on paymentUrl, then an ordinary invoice under the same id.
Machine-readable: /openapi.json (OpenAPI 3.1) · /llms.txt
Getting started
- 1Create an account and add a merchant (one per store). Confirm your password to see its API key, now or later in Settings.
- 2From your server,
POST /v1/invoiceswith the price, and the chain and asset to be paid in. Leave those two out and the customer picks the coin: see Pay in any coin. - 3Redirect the customer to the
paymentUrlin the response. It shows the address, amount, a QR code and live status. - 4Check the invoice with
GET /v1/invoices/{id}. Fulfil the order once its status ispaid,overpaidorsettled.
Try it in test mode first. The example below sends "test": true, so it makes a test invoice: the same answer and the same webhooks as a real one, and no money moves. Open its paymentUrl and press Pays in full, or pay it from your server with simulate (see Test mode): the invoice becomes paid, then settled. Leave test out for a real invoice.
curl https://api.coinsflow.app/v1/invoices \
-H "Authorization: Bearer $COINSFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: test-1042" \
-d '{
"chain": "bsc",
"asset": "USDT",
"priceAmount": "49.99",
"orderId": "test-1042",
"description": "Pro plan, 1 month",
"test": true
}'See also. A whole integration with its webhook handler, in Node and Python: a Discord bot and a Minecraft server store. Invoices with no code at all: payment links made in the dashboard.
Authentication
Send your key as a Bearer token on every request. Keys look like cf_live_<prefix>_<secret>.
Authorization: Bearer cf_live_3f9a0c1d2e4b5a6f_9sQ…You can copy your key again in the dashboard whenever you need it (Settings, after your password); it is kept encrypted. Rotating it there gives you a new one, and the old key stops working immediately: it is then refused with 401 and reason: "key_replaced", and the detail says the day it was replaced. Suspended merchants' keys are refused with 401 and reason: "merchant_suspended". A wrong key gets no reason. Something that is not a CoinsFlow key at all (a setting left empty, another service's key, or a key pasted with quotes round it) is refused with 401 and a detail that says so: keys begin with cf_live_. A key can do everything your merchant can, withdrawals included: see Keys.
Base URL & format
https://api.coinsflow.appRequests with a body must send Content-Type: application/json: a body sent as anything else (a form, plain text) is refused with 415 request_failed, and a body over 64 kB with 413 request_failed. Responses are JSON. Times are ISO 8601 in UTC.
A body that is not valid JSON, or an empty one sent as JSON, is refused with 400 invalid_request. So is a body nested more than 64 levels deep (objects and lists inside each other), and text anywhere in a request (body, query or path) that holds the NUL character or broken Unicode, such as half of a surrogate pair on its own (U+D800). A path this API does not have answers 404 not_found, with or without a key, and its detail names the method and the path.
Coming from coinsflow.net? Its five Litecoin data endpoints also answer here, with your key as a Bearer token: GET /v1/price/ltc, /v1/blocks/ltc, /v1/block/ltc/{hash or height}, /v1/tx/ltc/{txid} and /v1/address/ltc/{address}. They keep their old answers: amounts as JSON numbers in LTC, times in unix seconds, errors as {"error": "…"}. The rest of that API is still served at api.coinsflow.net, with the same key.
Amounts
Every amount, in requests and responses, is a decimal string in whole units of the asset: "0.015" BTC, "49.99" USDT. Never send or parse them as JSON numbers; floating point cannot represent them exactly.
Give either amount (exact crypto) or priceAmount (USD). With a USD price we lock the current rate when the invoice is created and round the crypto amount up to something a person can type into a wallet or an exchange: 2 decimals for USDT, USDC and TRX, 6 for LTC, ETH and BNB, 8 for BTC, and never more than 0.25% above the exact figure (a very small price keeps more decimals instead). USDT and USDC count as one dollar each while their market price is within 0.5% of it, so priceAmount: "49.99" asks for exactly 49.99 USDT.
Chains & assets
Use the chain id exactly as written. Paid at and settled at are confirmations: an invoice is paid at its confirmationsRequired, and settled (final: the network can no longer reverse it) at the depth shown.
| chain | assets | block time | payment seen | paid at | settled at |
|---|---|---|---|---|---|
bitcoin | BTC | ~10 min | seconds (mempool) | 1 | 1 to 6, by value |
litecoin | LTC | ~2.5 min | seconds (mempool) | 1 | 2 to 12, by value |
ethereum | ETH · USDT · USDC | 12 s | first block | 12 | 32 |
bsc | BNB · USDT · USDC | under 1 s | first block | 15 | 30 |
tron | TRX · USDT · USDC | 3 s | first block | 20 | 40 |
Decimals, the most an amount can have: 8 for BTC and LTC; on ethereum 18 for ETH and 6 for USDT and USDC; on bsc 18 for all three, USDT and USDC included; on tron 6.
USDT and USDC exist on three networks. They are different tokens with different contracts: a customer paying a bsc USDT invoice must send BEP-20 USDT. The hosted page warns them about this.
TRON is switched off for now. A new invoice on tron is refused with 503 chain_unavailable, and GET /chains shows it as unavailable with paused: true. Payments to TRON addresses already given out are still credited, and TRON balances can still be withdrawn. Read GET /chains to offer only the networks taking payments.
How a payment flows
- 1 · pendingYou create the invoice and send the customer to paymentUrl.
- 2 · detectedThe customer sends. On Bitcoin and Litecoin we see it in the mempool within seconds; on the other chains in its first block.
- 3 · paidIt reaches confirmationsRequired and is credited. On Bitcoin and Litecoin that is the first confirmation, and the money can be withdrawn from here on. Fulfil here.
- 4 · settledIt reaches final depth: the network can no longer reverse it. On the other chains it becomes withdrawable here.
Typical time from sending to paid:
| chain | paid after | withdrawable |
|---|---|---|
bitcoin | ~10 min (1 conf.) | at once |
litecoin | ~2.5 min (1 conf.) | at once |
ethereum | ~2.5 min | ~4 min later |
bsc | ~15 s | ~15 s later |
tron | ~1 min | ~1 min later |
On Bitcoin and Litecoin every invoice is paid at its first confirmation, whatever its size, and the money can be withdrawn at once. Until settled (1 to 6 confirmations on Bitcoin and 2 to 12 on Litecoin, growing with the value of the payment) a block reorganisation could in principle still take the payment back. If that happens the credit is reversed, the invoice stops saying paid, and a withdrawal that was made from it is undone with it: it was sent from the very coins that arrived, so it cannot outlive them. You never end up owing anything. If you hand over something that cannot be taken back for a large order, wait for invoice.settled.
Money that is not yet settled can be withdrawn but not moved to another of your merchants or used to pay another CoinsFlow invoice; it can a few minutes later. See transferable under Balances.
What the customer pays in network fees (the fee is theirs, on top of the invoice amount):
| network · asset | fee | notes |
|---|---|---|
| litecoin · LTC | Very low | Usually a fraction of a cent. |
| bsc · BNB, USDT, USDC | Very low | Cents or less, paid in BNB. |
| ethereum · ETH, USDT, USDC | Varies | Paid in ETH; token transfers cost more than plain ETH. |
| bitcoin · BTC | Varies | Depends on how busy the network is; usually low today. |
| tron · TRX | Low | Covered by free bandwidth for most wallets. |
| tron · USDT, USDC | Noticeable | Burns energy: about 6.5 to 13 TRX per transfer unless the sender holds staked energy. |
For the lowest customer fees, offer Litecoin or BNB Smart Chain. Our addresses are native SegWit on Bitcoin and Litecoin, the cheapest kind to send to.
Invoice lifecycle
| status | meaning |
|---|---|
awaiting_choice | Any-coin invoices only: created with a dollar price, waiting for the customer to pick the coin and network on the payment page. chain, asset, address and amountDue are null until then. Picking one makes it pending, with its own address and amount. It can expire or be cancelled from here. |
pending | Created, waiting for the customer. Nothing sent yet. An invoice whose only payment was dropped before it was mined comes back here (invoice.pending). |
detected | A payment is on the network. On Bitcoin and Litecoin that is seconds after the customer sends it (still in the mempool); elsewhere, in its first block. Not money yet. |
confirming | In a block, gaining confirmations. |
underpaid | Confirmed, but less than amountDue arrived (0.5% tolerance). What came is credited to you. The customer can send the rest to the same address; or accept it as it is, and it becomes paid. It does not expire on its own. |
paid | Reached confirmationsRequired and credited to your pending balance. Safe to fulfil the order. |
overpaid | Like paid, but more than amountDue arrived (over the 0.5% tolerance). The full amount is credited to you; amountOverpaid is the surplus. |
settled | Final: the network can no longer reverse the payment. Withdrawable, if it was not already (Bitcoin and Litecoin are from paid on). |
expired | Deadline passed with nothing sent. Every address we issue is watched permanently, so a payment that arrives late is still detected and credited (paidLate: true). |
cancelled | Cancelled by you before any payment. Anything sent to its address later is credited to you as a deposit. |
A payment that is still in the mempool keeps an invoice open past its deadline: it was sent in time. If it is dropped instead of mined (replaced by fee or double-spent), the invoice goes back to pending, and invoice.pending tells you so, or to expired if its time is up.
Block reorganisations are handled for you: if a confirmed payment is reorganised out of the chain, the invoice steps back to confirming and the credit is reversed. That is why you should treat paid as final only for goods you can take back, and wait for settled for anything irreversible and large.
The invoice object
| field | type | meaning |
|---|---|---|
id | uuid | The invoice id. |
chain, asset | string | null | Network and asset the customer must pay with. On an any-coin invoice, null until the customer has picked them, then the ones picked. |
address | string | null | A fresh address used by this invoice only. null on an any-coin invoice until a coin is picked. |
amountDue | decimal string | null | What the customer must send, exactly. "0" on a pay-what-you-want invoice; null on an any-coin invoice until a coin is picked (amountPaid and amountRemaining too). |
anyCoin | boolean | True for an any-coin invoice: priced in dollars, or pay what you want (openAmount true), the customer picks the coin and network on the payment page. See Pay in any coin. |
accept | string[] | Any-coin invoices: the options the customer can pick from, such as "LTC" or "USDT@bsc". |
option | string | null | Any-coin invoices: the option picked, such as "USDT@bsc" (the same as chain and asset); null until the customer has picked one. |
choices | array | Any-coin invoices: the coins the customer picked and then changed, oldest first, each with its option, chain, asset, address, amountDue, chosenAt, replacedAt, the payments seen at its address (not in webhooks, where a choice comes without them), amountReceived (what arrived there in that coin and is in a block) and amountSeen (the same with mempool payments). Empty until the customer changes coin. See Pay in any coin for a payment that still reaches one. |
amountPaid | decimal string | Sum of payments that are in a block, from their first confirmation (and a Pay with CoinsFlow payment). Mempool payments are not counted. A payment is counted here before it is credited: on Ethereum, BNB Smart Chain and TRON it needs more confirmations first, so amountPaid can show the full amount while the invoice is still confirming. |
amountRemaining | decimal string | What is still missing before it counts as paid. While the invoice is pending, detected or confirming it counts only payments that have been credited (reached confirmationsRequired), so it stays the whole amountDue until one is, even when amountPaid already shows it. From underpaid on, it is amountDue less amountPaid. "0" once it is paid (also when you accepted a short payment), on a cancelled invoice, and always on a pay-what-you-want invoice. Fulfil on status, never on amountRemaining reaching "0" alone. |
amountOverpaid | decimal string | null | What arrived on top of amountDue, counted like amountRemaining: once the payments are credited. "0" unless more than the price was paid; null on an any-coin invoice until a coin is picked. |
openAmount | boolean | True for a pay-what-you-want invoice: there is no price, and any confirmed payment makes it paid. Read amountPaid for how much arrived. Also on an any-coin invoice made with openAmount: true, before the customer picks a coin and after. |
status | string | See Invoice lifecycle. |
confirmationsRequired | integer | null | Confirmations at which it becomes paid. Set when created, from the chain and the invoice value; on an any-coin invoice, null until a coin is picked and then set for that coin. |
orderId, description | string | null | Yours. The description is shown to the customer. |
metadata | object | Your key/value pairs, returned as given. Never shown to the customer. |
priceAmount, priceCurrency | string | null | The USD price, when you priced it in USD. amountDue then follows the price until the invoice is paid (see amountUpdatesAt). priceAmount is null on a pay-what-you-want invoice, in one coin or in any coin. |
usdValue | string | null | USD value when created, for reporting. |
paidLate | boolean | True if the payment that completed it arrived after expiresAt. |
acceptedAt | ISO 8601 | null | When you accepted a short payment as payment in full; null otherwise. |
amountUpdatesAt | ISO 8601 | null | Invoices priced in USD only: when amountDue is next brought up to date. While such an invoice is unpaid its crypto amount follows the price, once an hour, so it always asks for priceAmount dollars’ worth. null when the amount is fixed: priced in crypto, pay-what-you-want, paid, expired or cancelled. |
paidWith | string | null | How it was paid: "chain" (a transfer on the network), "coinsflow" (Pay with CoinsFlow, from a CoinsFlow balance), or null until a payment has been credited (also while one is only detected or confirming). |
expiresAt, createdAt | ISO 8601 | UTC. |
paymentUrl | url | The hosted payment page. Send the customer here. |
payments | array | The latest 50 payments, oldest first. On GET /v1/invoices/{id} and in webhooks, not in lists. See Payments. |
paymentsCount | integer | How many payments the invoice has in all. Over 50, payments shows only the latest 50. On GET /v1/invoices/{id} and in webhooks, not in lists. |
test | boolean | Only on a test invoice, and then true. See Test mode. |
archived | boolean | Only on an invoice made on coinsflow.net before the move, read with GET /v1/invoices/{id}, and then true: it is read-only. |
Payments
GET /v1/invoices/{id} includes payments: the latest 50 on-chain transfers to the invoice address, oldest first, with txid, amount, confirmations, status, blockHeight and seenAt, and paymentsCount: how many there are in all. When paymentsCount is over 50 the earliest ones are not listed; amountPaid still counts every one. Webhooks carry the same 50 and the same count.
ETH, BNB or TRX sent from inside a smart contract (a contract wallet, an exchange’s batch payout) is credited like any other payment. Such a transfer has no transaction of its own addressed to you, so its txid reads internal:… instead of a transaction hash: treat txid as an opaque id, not always something to look up in an explorer.
| payment status | meaning |
|---|---|
mempool | Broadcast, not in a block yet. Shown to you and the customer; never counted or credited. |
confirming | In a block, gaining confirmations. |
confirmed | Reached full finality. |
orphaned | No longer valid. With a blockHeight, a block reorganisation removed it (it is usually re-mined within minutes). With blockHeight null, it left the mempool without being mined: replaced by fee or double-spent. Either way it is not counted. |
Several payments to one invoice add up (a customer topping up after an underpayment). Anything sent to an invoice address in a different asset is still credited to you, as a deposit.
Pay what you want. For donations, tips and top-ups, create the invoice with openAmount: true and no amount or priceAmount. The payment page asks for any amount. The invoice goes to detected when a payment is seen, paid once it has its confirmations and settled at final depth, whatever the amount: it is never underpaid or overpaid. amountDue stays "0"; read amountPaid (and payments) to know how much arrived, and credit your customer for that. A later payment to the same invoice is credited to you and added to amountPaid, but the status does not change again, so no further webhook is sent for it. It must be asked for explicitly: a request with no amount and no openAmount is a 400, so a bug that drops your amount can never create an invoice anyone can settle with a cent. confirmationsRequired and usdValue are set from the amount once a payment is seen. Leave out chain and asset as well and the customer picks the coin too: see Pay what you want in any coin.
Pay with CoinsFlow. Customers who hold a CoinsFlow balance in the same asset on the same network can pay from it on the hosted page, confirmed with their password (and two-factor code, when on). There is nothing to confirm on-chain: the invoice goes through detected, paid and settled at once, with a webhook for each, and the amount (less your usual fee) is withdrawable immediately. Such an invoice has paidWith: "coinsflow" and an empty payments list. Handle it like any settled invoice; no change is needed in your integration.
Pay in any coin
Give a price in dollars and let your customer pay in the coin they have. Create the invoice with priceAmount and priceCurrency: "USD" and no chain or asset. The answer is an invoice like any other, with anyCoin: true, the options it offers in accept, and status awaiting_choice: chain, asset, address and amountDue are null, because nothing is to be sent yet.
curl https://api.coinsflow.app/v1/invoices \
-H "Authorization: Bearer $COINSFLOW_API_KEY" -H "Content-Type: application/json" \
-H "Idempotency-Key: order-1043" \
-d '{"priceAmount":"49.99","priceCurrency":"USD","orderId":"order-1043","description":"Pro plan, 1 month"}'{
"id": "9b2e4d71-3c8a-4f05-b6e2-71d0c5a9e8f3",
"anyCoin": true,
"accept": ["LTC", "BTC", "ETH", "BNB", "USDT@ethereum", "USDT@bsc", "USDC@ethereum", "USDC@bsc"],
"option": null,
"status": "awaiting_choice",
"chain": null,
"asset": null,
"address": null,
"amountDue": null,
"amountPaid": null,
"amountRemaining": null,
"amountOverpaid": null,
"openAmount": false,
"confirmationsRequired": null,
"priceAmount": "49.99",
"priceCurrency": "USD",
"orderId": "order-1043",
"description": "Pro plan, 1 month",
"metadata": { "customerId": "c_8812" },
"choices": [],
"expiresAt": "2026-10-21T10:00:00.000Z",
"createdAt": "2026-10-18T10:00:00.000Z",
"paymentUrl": "https://coinsflow.app/invoice/9b2e4d71-3c8a-4f05-b6e2-71d0c5a9e8f3"
}Send the customer to paymentUrl. The payment page asks How would you like to pay?, with the approximate amount in each coin; for USDT and USDC it then asks which network. There is no API call for this: the customer chooses on the page. The moment they do, the invoice becomes pending with its own address and an exact amountDue, worked out from a fresh price as for any invoice priced in USD (see Amounts) and kept worth the price every hour until it is paid (amountUpdatesAt). From there it is an ordinary invoice under the same id: the same statuses, payments, webhooks and Pay with CoinsFlow, and option says which was picked. Read chain, asset and amountDue from the invoice or from the webhook; fulfil on status, as always. USDT and USDC count as one dollar here only while their price is at or above a dollar (within 0.5%); below it, their real price is used, so the customer always pays the price's worth.
| option | coin and network |
|---|---|
LTC | Litecoin |
BTC | Bitcoin |
ETH | Ether on Ethereum |
BNB | BNB on BNB Smart Chain |
USDT@ethereum | USDT, ERC-20 |
USDT@bsc | USDT, BEP-20 |
USDC@ethereum | USDC, ERC-20 |
USDC@bsc | USDC, BEP-20 |
USDT@tron | USDT, TRC-20, while TRON is switched on |
What is offered. Without accept, the invoice offers your merchant's default: every option, or the ones you left on in the dashboard (New invoice, Coins to offer, saved for next time; options we add later are on while you have not narrowed the list). Send accept to choose for one invoice, for example ["USDT@bsc", "USDC@bsc", "LTC"]: any option can be named, whatever your default. An option on a network that is paused right now is left out of that invoice; if none is left, the answer is 400 invalid_option, as it is for an option nobody knows and for an empty list. A network that is paused after the invoice was made is shown to the customer as not available; so is a coin whose amount would be below the smallest that coin can be sent in. A price below the smallest amount of every coin offered is refused when you make the invoice, with 400 below_minimum: its detail names the smallest price that works at today's prices.
Pay what you want in any coin. Send openAmount: true instead of priceAmount, still with no chain, asset or amount; accept, orderId, description, metadata, ttlSeconds and "test": true work as above. Giving both openAmount: true and priceAmount, or neither, is 400 invalid_request. Until the customer picks a coin the invoice is awaiting_choice as above, with openAmount: true and priceAmount and usdValue null. The payment page lists each coin with the smallest amount of it that counts (“from 0.0001 LTC”) instead of a price; no price is needed to choose, so a coin is only unavailable while its network is paused. Once a coin is picked it is an ordinary pay-what-you-want invoice in that coin, plus the any-coin fields: amountDue "0", any confirmed payment makes it paid, and read amountPaid for how much arrived. Changing coin, earlier choices, cancelling, expiry and test mode work as for a priced one.
Changing coin. Until anything is sent (a payment in the mempool counts, at any address the invoice has had), the customer can go back and pick another coin, up to five times. Each change gives the invoice a new address and amount; the earlier one is listed in choices with its option, the time it was replaced, the payments seen at its address, amountReceived (in a block) and amountSeen (the mempool included). Once a payment is seen the coin can no longer change.
Where the money arrives wins. A customer may still pay an address they left, for example from an exchange that was slow to send. While the invoice is still open (before its deadline, not expired or cancelled) and the coin chosen now has received nothing, the invoice goes back to that earlier coin, with its address and its amount, and that payment pays it as usual: the webhooks, chain, asset and option are that coin's, and the coin it replaced is listed in choices. Otherwise the payment to the earlier address is credited to your balance like any payment to one of your addresses, without counting toward the invoice: when the coin chosen now was paid too (the invoice is paid by that one), when the invoice had already expired or been cancelled, and when it came in another coin than that choice's. You hear of it with an invoice.payment event carrying earlierChoice: true, whose payment names its chain, asset and option, and it shows in choices. Either way nothing is lost, and the payment page tells the customer calmly that the shop has it.
Lists, cancelling, webhooks. GET /v1/invoices includes any-coin invoices, newest first with the rest; status=awaiting_choice finds the ones not chosen yet, and a chain filter leaves those out. You can cancel before the choice as after it. There are no new events: every invoice event carries anyCoin, accept, option and choices (each choice without its payments: amountReceived and amountSeen say what reached it, and GET /v1/invoices/{id} lists the payments), and an invoice.expired or invoice.cancelled sent before a choice has chain and asset null. A customer who never picks a coin lets the invoice expire as usual. An any-coin invoice counts toward the 10,000 open invoices of your account from the moment it is made. The customer's first choice, and every change of coin, counts toward the invoices your account may make in a minute, as each gives an address; when those are used up the page asks the customer to try again in a minute, and never mentions your limits.
The payment page's own requests. The page reads the coins on offer from GET /pay/{id}: each option has its amount (what choosing it now would ask; null on pay what you want), minimum (the smallest amount of that coin that counts), available and a reason when it is not (paused, below_minimum or price_unavailable; on pay what you want only paused). It picks the coin with POST /pay/{id}/choose and {"option": "USDT@bsc"} (no key: the invoice id is the secret). You never need to call them, but these are the answers to a choice, each of which the page puts in plain words: 400 not_offered (not an option of this invoice), 400 below_minimum (the price comes to less than the smallest amount of that coin), 403 merchant_inactive, 409 not_switchable with a reason of seen, paid, expired, cancelled or paying (a Pay with CoinsFlow payment is under way), 429 too_many_changes, rate_limited or busy, and 503 chain_unavailable or price_unavailable. Pay with CoinsFlow on an any-coin invoice sends the option the customer saw (and, on pay what you want, the amount they typed); if the coin was changed meanwhile it is refused with 409 coin_changed and nothing is taken.
Test mode. Add "test": true as for any invoice, or make one in the dashboard under Developers (Any coin; leave the price empty for pay what you want). Pick the coin on its payment page, then pay it with POST /v1/invoices/{id}/simulate or the page's buttons; the events are the same, marked "test": true.
Metadata
Attach up to 20 key/value pairs to an invoice with metadata. Keys are 1 to 40 characters; values are strings (up to 500 characters), numbers, booleans or null. They come back on every read of the invoice and are never shown to the customer (unlike orderId and description, which the payment page displays).
"metadata": { "customerId": "c_8812", "plan": "pro", "seats": 3 }Idempotency
Send an Idempotency-Key header (1 to 200 characters, e.g. your order id) when creating an invoice or a withdrawal. Retrying with the same key and the same body returns the original invoice instead of creating a second one, even when retries run at the same moment: one of them creates it, the others get 409 idempotency_in_progress until it exists, then the same invoice. The same key with a different body is refused with 409 idempotency_key_reuse. An invoice's key is kept for 30 days: after that, the same key makes a new invoice. A withdrawal's key is kept for good: retried at any time, it returns that withdrawal and never sends again (after 30 days, as the withdrawal stands now rather than as first sent).
A key belongs to your merchant, not to one endpoint: a key used to create an invoice cannot be used again for a withdrawal (or for a test invoice and then a real one), and is refused with 409 idempotency_key_reuse. Give each its own, for example order-1042 for the invoice and payout-1042 for a refund. A retry is answered with the response as it was first sent, even hours later: to see where an invoice or a withdrawal stands now, GET it by its id.
Fulfilling orders safely
- Create the invoice from your server, with an
Idempotency-Key(your order id works) so a retry never makes a second invoice. - Store the invoice
idagainst your order. Put your own references inorderIdormetadata. - Never fulfil because the customer came back from the payment page. Fetch
GET /v1/invoices/{id}from your server and checkstatus. - Fulfil at
paid,overpaidorsettled, on the status: never becauseamountRemainingreached"0"oramountPaidlooks right. For something large and irreversible, wait forsettled. - Treat
detectedas “payment on its way”, not as paid. It can still be replaced or double-spent until it is in a block. - Handle
underpaid(ask for the rest, same address, or accept what came) andpaidLate(the money arrived after the deadline; you decide whether to honour the price). - Fulfil an order once per invoice, whatever you hear and however often: remember that you did. After a chain reorganisation an invoice can become paid a second time, and a customer can pay the same invoice twice (
invoice.paymenttells you about every payment). - Use webhooks to hear about payments at once, verify the signature, and still confirm with
GET /v1/invoices/{id}before shipping anything valuable.
Test mode
Try the whole flow before a customer does, without sending crypto. Add "test": true to POST /v1/invoices and you get a test invoice: the same request, the same answer, the same statuses and the same signed webhooks as a real one. It is not money: it has no address (the address field holds a placeholder no wallet accepts), nothing can be sent to it, and nothing is credited to your balance.
# 1. make a test invoice (same key, same endpoint)
curl -X POST https://api.coinsflow.app/v1/invoices \
-H "Authorization: Bearer $COINSFLOW_API_KEY" -H "Content-Type: application/json" \
-d '{"chain":"litecoin","asset":"LTC","priceAmount":"49.99","orderId":"A-1043","test":true}'
# 2. pretend the customer paid: your webhook endpoint receives the events
curl -X POST https://api.coinsflow.app/v1/invoices/<id>/simulate \
-H "Authorization: Bearer $COINSFLOW_API_KEY" -H "Content-Type: application/json" \
-d '{"outcome":"paid"}'| outcome | what happens | events sent, in order |
|---|---|---|
paid | The customer pays in full. Also what you get with no outcome at all. | invoice.detected, invoice.confirming, invoice.payment, invoice.paid, invoice.settled |
underpaid | Half of the amount arrives. Then "paid" sends the rest, or accept it with POST /v1/invoices/{id}/accept. | invoice.detected, invoice.confirming, invoice.payment, invoice.underpaid |
overpaid | A tenth more than the amount arrives. | invoice.detected, invoice.confirming, invoice.payment, invoice.paid, invoice.overpaid, invoice.settled |
detected | A payment is seen and not yet in a block. Follow with "confirming" or "paid". | invoice.detected |
confirming | The payment is in a block. Follow with "paid". | invoice.detected, invoice.confirming |
expired | Nobody paid in time (Never pays on the test payment page). It expires at once, and its expiresAt becomes that moment, as on a real invoice whose time ran out (an invoice in any coin whose coin was never chosen keeps the deadline it had). | invoice.expired |
Every test event carries "test": true, on the event and on the invoice in data; real events do not have the field. It is sent to the endpoints you already have, under the same signature, so your server must ignore test events when it fulfils real orders (or use a separate endpoint while you test). Everything else works as it does for a real invoice: GET /v1/invoices/{id}, cancel, accept, Idempotency-Key. Test invoices are listed apart, with GET /v1/invoices?test=true, and never among your real invoices, your balances or your statistics.
The payment page of a test invoice (paymentUrl) says that it is a test and has buttons in place of an address, so you can walk through what your customer sees. In the dashboard, Developers has the same under Test mode. A merchant can make 500 test invoices a day; they are kept for 30 days.
Each simulation calls your webhook endpoints, so a merchant can run 30 a minute (from the API, the dashboard and the test payment page together); more are refused with 429 rate_limited and a Retry-After header, and change nothing. A test suite that simulates in a loop should wait between runs. When one of your endpoints already has 200 test events waiting to be delivered, no more are queued for it: the invoice still changes, and the answer to simulate carries webhooksNotQueued ({ "events": 3, "reason": "…" }, how many of this simulation's events were not queued, and why). Let the endpoint catch up, or fix it, then simulate again.
See also. Every outcome walked through, how to keep test events out of your live code, and the limits, as one article: Test mode: how to test crypto payments end to end without spending a coin.
Errors
Errors return a JSON body with a stable machine-readable error code and a human detail, every one of them, a 404 included. A 429 that clears by waiting (rate_limited, too_many_attempts) carries a Retry-After header, the seconds to wait before trying again, and says it in the body too as retryAfterSeconds (the limit per IP address sends the header only); so does a 503 busy. One without it (too_many_open_invoices, too_many_test_invoices) does not clear in a moment: do not retry it in a loop. Switch on error, and treat a code you do not know by its HTTP status.
{
"error": "unsupported_asset",
"detail": "USDT is not available on bitcoin. Supported: BTC."
}| status | error | meaning |
|---|---|---|
400 | invalid_request | Body or query failed validation; detail lists each problem. Also: a body that is not valid JSON, or an empty one sent as JSON; a body nested more than 64 levels deep (objects and lists inside each other); text with the NUL character or broken Unicode anywhere in the request; and, in GET /v1/invoices, a status nobody knows, even beside known ones. |
400 | unsupported_asset | That asset is not available on that chain (e.g. USDT on bitcoin). |
400 | invalid_option | Any-coin invoices: accept names an option nobody knows, or is empty, or none of its options is on a network taking payments right now (those on a paused network are left out of the invoice without an error while others remain). Leave accept out to offer your default. |
400 | below_minimum | Any-coin invoices priced in USD: at today’s prices, priceAmount comes to less than the smallest amount of every coin offered (BTC 0.00001, LTC 0.0001, ETH 0.000005, BNB 0.00002, USDT and USDC 0.01), so no coin could be picked. detail names the smallest price that works: raise the price, or offer more coins. A coin with no fresh price is not counted. Never for pay what you want. Test invoices the same. |
400 | invalid_amount | Amount (or a withdrawal’s maxFee) is not a positive decimal string with at most the asset’s decimals. |
400 | invalid_cursor | Pass nextCursor back exactly as returned. |
400 | invalid_chain | A chain nobody knows, in a list of invoices or withdrawals or in a withdrawal quote. Use the chain id exactly as written. |
400 | invalid_status | GET /v1/withdrawals: a status nobody knows. (The invoice list answers that with invalid_request.) |
400 | invalid_url | Webhook endpoints: the URL is not https://, not on the public internet, carries a user name or password, is longer than 500 characters, or has a space or a line break in it. |
400 | invalid_events | Webhook endpoints: events is not a list with at least one event in it, or names an event nobody knows. detail lists the events there are. |
400 | limit_reached | Webhook endpoints: a merchant can have 10. Remove one before you add another. |
400 | invalid_destination | Withdrawal address is not valid for that network (checksum included). |
400 | destination_not_allowed | Withdrawals: a valid address that cannot receive one. An address of CoinsFlow itself, and on Ethereum, BNB Smart Chain and TRON any CoinsFlow deposit or invoice address. Refused before anything is held; detail says why in a sentence you can show. The quote says the same in destinationProblem. |
400 | amount_too_small | Below the minimum withdrawal for that asset. |
400 | insufficient_balance | Not enough withdrawable balance for amount + fee; detail says how much is available and the most that can be sent. |
401 | unauthorized | Missing, wrong or replaced API key. A key that is right but was replaced adds reason: "key_replaced", and detail says the day it was replaced: copy the current key in the dashboard. A key whose merchant is suspended adds reason: "merchant_suspended". A wrong or unknown key gets no reason. A value that is not a CoinsFlow key at all is told so in detail: keys begin with cf_live_. |
403 | merchant_inactive | Dashboard only: this merchant is suspended. Over the API a suspended merchant’s key answers 401 unauthorized, reason: "merchant_suspended". |
403 | withdrawals_disabled | Withdrawals are disabled for this merchant. Contact support. |
404 | not_found | No such invoice, withdrawal, webhook endpoint or delivery for this merchant, and detail says which. Get, cancel and accept answer the same. Also a path this API does not have, with a key or without: detail names the method and the path. |
409 | idempotency_key_reuse | The Idempotency-Key was already used with a different body, or for another endpoint: a key belongs to the merchant, so one used for an invoice cannot make a withdrawal. See Idempotency. |
409 | idempotency_in_progress | A retry arrived while the first request with that key was still running. Retry in a moment; you will get the same invoice. |
409 | not_cancellable | Invoice: yours, but a payment was already detected, or it is already paid, expired or cancelled. Withdrawal: it is already being sent. |
409 | not_acceptable | Accept: yours, but not underpaid. Only an invoice that received less than its amount can be accepted as paid. |
409 | not_a_test_invoice | Simulate was asked for a real invoice. Only a payment changes a real invoice; make one with "test": true. |
409 | not_possible | Simulate: a test invoice in this status cannot take that outcome (one that is already paid, expired or cancelled takes none). |
409 | endpoint_disabled | A test event or a delivery sent again to a webhook endpoint that is switched off. Nothing is queued. Turn it back on first ("enabled": true), then send. |
409 | fee_changed | Create a withdrawal with maxFee: its fee now is above the maxFee you sent (network fees rose since your quote). Nothing was created; detail gives the fee now. Quote again, and send the new fee if it suits you. |
409 | too_many_payments | Bitcoin and Litecoin withdrawals (and quotes with an amount): sending that much would combine more than 250 separate payments in one transaction. Nothing is created. detail says the most that can be sent at once: withdraw that first, then the rest. |
413 | request_failed | The request body is over 64 kB. Nothing was read. |
415 | request_failed | The request has a body that is not sent as Content-Type: application/json (a form, or plain text). Send JSON. |
429 | rate_limited | Too many requests of one kind; nothing was done. More than 120 invoices in a minute for one merchant, or 240 for all the merchants of one account (test invoices have their own limit); more than 30 simulated payments a minute (see Test mode); more than 30 changes to a merchant’s webhook endpoints in an hour (see Delivery and retries); and, from one IP address, more than 50 requests a second (bursts up to 200 are absorbed) or more than 40 open at once. Wait as long as Retry-After says, then retry. |
429 | too_many_attempts | Webhook endpoints: more than 10 test events, or deliveries sent again by hand, to one endpoint in a minute. Nothing is queued; Retry-After says when to try again. |
429 | too_many_open_invoices | The account already has 10,000 invoices waiting to be paid (awaiting_choice, pending, detected or underpaid), across all its merchants. Cancel the ones you no longer need, or let them expire, before making more. |
429 | too_many_test_invoices | More than 500 test invoices in a day for one merchant. |
500 | internal_error | Our fault. Safe to retry with the same Idempotency-Key. |
503 | busy | The API is working on too many requests at once and turned this one away before doing anything. Retry after a second (the Retry-After header says 1). |
503 | price_unavailable | No fresh USD price for that asset. Retry shortly, or send a crypto amount. |
503 | rates_unavailable | Withdrawals and quotes: no fresh USD price for the asset, or for the network’s own coin the fee is worked out in. For USDT and USDC, also while either of the two prices is more than 2 hours old: the fee is paid in the network’s coin and charged in the token. Nothing was created; retry in a few minutes. |
503 | chain_unavailable | That network is paused (our watcher or the network itself is delayed, or we have switched it off for now: TRON is), so we do not hand out an address nobody is watching. Try another network or retry shortly. A withdrawal on a network that cannot send right now is answered the same, and so are a withdrawal and a quote of USDT or USDC on TRON while their balance cannot be read (detail: “TRON token withdrawals are not available right now.”). |
503 | withdrawals_paused | Withdrawals are paused platform-wide for maintenance. Your balance is safe; retry later. |
Create an invoice
https://api.coinsflow.app/v1/invoicesReserves a fresh address from our HD wallet and returns the invoice. Returns 201. One merchant can make 120 invoices a minute and one account 240, across its merchants (more: 429 rate_limited); one account can have 10,000 waiting to be paid at once (more: 429 too_many_open_invoices). Test invoices do not count.
Parameters
chainstringassetstringamountstringpriceAmountstringpriceCurrencystringacceptstring[]openAmountbooleanorderIdstringdescriptionstringttlSecondsintegermetadataobjecttestbooleanIdempotency-KeyheaderExample
curl https://api.coinsflow.app/v1/invoices \
-H "Authorization: Bearer $COINSFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{
"chain": "bsc",
"asset": "USDT",
"priceAmount": "49.99",
"orderId": "order-1042",
"description": "Pro plan, 1 month"
}'{
"id": "4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34",
"chain": "bsc",
"asset": "USDT",
"address": "0x652Ef5665d2FA421046cF7502B0ae16E4Bc6228C",
"amountDue": "49.99",
"amountPaid": "0",
"amountRemaining": "49.99",
"amountOverpaid": "0",
"openAmount": false,
"status": "pending",
"orderId": "order-1042",
"description": "Pro plan, 1 month",
"metadata": { "customerId": "c_8812", "plan": "pro" },
"priceAmount": "49.99",
"priceCurrency": "USD",
"confirmationsRequired": 15,
"paidLate": false,
"acceptedAt": null,
"amountUpdatesAt": "2026-09-26T11:00:00.000Z",
"paidWith": null,
"expiresAt": "2026-09-29T10:00:00.000Z",
"createdAt": "2026-09-26T10:00:00.000Z",
"usdValue": "49.99",
"paymentUrl": "https://coinsflow.app/invoice/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34"
}Get an invoice
https://api.coinsflow.app/v1/invoices/{id}The current state. amountPaid sums payments that are in a block (unconfirmed mempool payments are not counted); amountRemaining, amountOverpaid and paidWith change only once a payment is credited. Compare status, not amounts, to decide when to fulfil.
Parameters
iduuidRequiredExample
curl https://api.coinsflow.app/v1/invoices/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34 \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"id": "4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34",
"chain": "bsc",
"asset": "USDT",
"address": "0x652Ef5665d2FA421046cF7502B0ae16E4Bc6228C",
"amountDue": "49.99",
"amountPaid": "49.99",
"amountRemaining": "0",
"amountOverpaid": "0",
"openAmount": false,
"status": "paid",
"orderId": "order-1042",
"description": "Pro plan, 1 month",
"metadata": { "customerId": "c_8812", "plan": "pro" },
"priceAmount": "49.99",
"priceCurrency": "USD",
"confirmationsRequired": 15,
"paidLate": false,
"acceptedAt": null,
"amountUpdatesAt": "2026-09-26T11:00:00.000Z",
"paidWith": "chain",
"expiresAt": "2026-09-29T10:00:00.000Z",
"createdAt": "2026-09-26T10:00:00.000Z",
"usdValue": "49.99",
"paymentUrl": "https://coinsflow.app/invoice/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34",
"payments": [
{
"txid": "0x8f3c1a…e9d2",
"amount": "49.99",
"confirmations": 16,
"status": "confirming",
"blockHeight": 128801412,
"seenAt": "2026-09-26T10:03:12.000Z"
}
],
"paymentsCount": 1
}List invoices
https://api.coinsflow.app/v1/invoicesNewest first. When there are more, nextCursor is set; pass it back as cursor for the next page. Cursors are stable even while new invoices are being created.
Parameters
statusstringchainstringorderIdstringqstringteststringlimitintegercursorstringExample
curl "https://api.coinsflow.app/v1/invoices?status=paid,overpaid,settled&chain=bitcoin&limit=50" \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"data": [ { "id": "4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34", "status": "paid", "...": "..." } ],
"nextCursor": "MjAyNi0wOS0yNiAxMDowMDowMC4xMjM0NTYrMDB8NGYxYzllMmEt..."
}Cancel an invoice
https://api.coinsflow.app/v1/invoices/{id}/cancelOnly while nothing has been detected (an any-coin invoice also before its customer has picked a coin). After that it returns 409 not_cancellable: money is already moving and the invoice must play out. An id you have no invoice under returns 404 not_found.
Parameters
iduuidRequiredExample
curl -X POST https://api.coinsflow.app/v1/invoices/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34/cancel \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"id": "4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34",
"chain": "bsc",
"asset": "USDT",
"address": "0x652Ef5665d2FA421046cF7502B0ae16E4Bc6228C",
"amountDue": "49.99",
"amountPaid": "0",
"amountRemaining": "49.99",
"amountOverpaid": "0",
"openAmount": false,
"status": "cancelled",
"orderId": "order-1042",
"description": "Pro plan, 1 month",
"metadata": { "customerId": "c_8812", "plan": "pro" },
"priceAmount": "49.99",
"priceCurrency": "USD",
"confirmationsRequired": 15,
"paidLate": false,
"acceptedAt": null,
"amountUpdatesAt": "2026-09-26T11:00:00.000Z",
"paidWith": null,
"expiresAt": "2026-09-29T10:00:00.000Z",
"createdAt": "2026-09-26T10:00:00.000Z",
"usdValue": "49.99",
"paymentUrl": "https://coinsflow.app/invoice/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34"
}Accept a short payment
https://api.coinsflow.app/v1/invoices/{id}/acceptFor an underpaid invoice: what arrived is enough. The invoice becomes paid at that amount (then settled), invoice.paid is sent, and acceptedAt is set. Nothing moves: what the customer sent was credited to you when it confirmed. The answer waits a few seconds for the new status; if it still says underpaid, it will change on its own. Anything other than an underpaid invoice returns 409 not_acceptable; an id you have no invoice under, 404 not_found. The same button is in the dashboard, on the invoice.
Parameters
iduuidRequiredExample
curl -X POST https://api.coinsflow.app/v1/invoices/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34/accept \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"id": "4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34",
"chain": "bsc",
"asset": "USDT",
"address": "0x652Ef5665d2FA421046cF7502B0ae16E4Bc6228C",
"amountDue": "49.99",
"amountPaid": "45",
"amountRemaining": "0",
"amountOverpaid": "0",
"openAmount": false,
"status": "paid",
"orderId": "order-1042",
"description": "Pro plan, 1 month",
"metadata": { "customerId": "c_8812", "plan": "pro" },
"priceAmount": "49.99",
"priceCurrency": "USD",
"confirmationsRequired": 15,
"paidLate": false,
"acceptedAt": "2026-09-27T08:12:44.000Z",
"amountUpdatesAt": "2026-09-26T11:00:00.000Z",
"paidWith": "chain",
"expiresAt": "2026-09-29T10:00:00.000Z",
"createdAt": "2026-09-26T10:00:00.000Z",
"usdValue": "49.99",
"paymentUrl": "https://coinsflow.app/invoice/4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34"
}Balances
https://api.coinsflow.app/v1/balancesWhat you hold, per chain and asset, derived from the ledger. pending is credited but not yet final; payable is final. reserved is what is already promised to a withdrawal being sent. withdrawable is what a new withdrawal can use: on Bitcoin and Litecoin payable + pending - reserved (a payment can be withdrawn from its first confirmation), elsewhere payable - reserved. transferable (payable - reserved) is what can be moved to another of your merchants or paid with, and confirming is what is credited and cannot be withdrawn yet. Every supported pair is listed, including zeros.
Example
curl https://api.coinsflow.app/v1/balances \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"currency": "USD",
"totalUsd": "1234.56",
"assets": [
{
"chain": "bsc", "chainName": "BNB Smart Chain",
"asset": "USDT", "assetName": "Tether", "decimals": 18,
"pending": "49.74", "payable": "1180.02", "reserved": "0", "withdrawable": "1180.02",
"transferable": "1180.02", "confirming": "49.74", "total": "1229.76",
"priceUsd": 1, "valueUsd": "1229.76", "allocation": 99.6
}
]
}Merchant profile
https://api.coinsflow.app/v1/meThe merchant this key belongs to. Handy for checking a key works. logoUrl is the merchant’s logo, or null when it has none.
Example
curl https://api.coinsflow.app/v1/me \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"id": "b0c4…",
"name": "My Shop",
"logoUrl": null,
"status": "active",
"feePercent": "0.50",
"createdAt": "2026-09-20T12:00:00.000Z"
}Stats
https://api.coinsflow.app/v1/statsHeadline numbers for invoices that have been paid (paid, overpaid or settled), valued in USD when they were created.
Example
curl https://api.coinsflow.app/v1/stats \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"totalTurnover": "5120.00",
"incomeToday": "149.97",
"averageCheck": "42.67",
"conversionPct": 81.3,
"settledCount": 120,
"totalCount": 148
}Keys
Each merchant has one key, and it can do everything the merchant can: create and read invoices, read balances and withdraw, from any address. There is nothing to switch on and nothing to configure.
That makes the key worth as much as the balance behind it. Keep it in your server's configuration, never in code that ships to a browser or an app. If it may have leaked, open Settings in the dashboard and rotate it: the old key stops working at that moment. You can copy the current key there again whenever you need it; that asks for your password (and your code, with two-factor on), the same as rotating.
Withdrawals
Send your withdrawable balance to any address on the same network. On Bitcoin and Litecoin that includes a payment from its first confirmation; such a withdrawal is sent from the coins the payment arrived in. The amount you ask for is what arrives; a fee, quoted up front in the same asset, is taken from your balance on top.
The fee covers every network cost of the withdrawal. Usually that is one transaction. When the funds first have to be brought together on the network (for example a token balance spread over several deposit addresses), those extra transactions are priced in too, and the quote says how many (networkTransactions). Quote with the amount and destination you will use to get the exact fee, and pass it as maxFee when you create the withdrawal: you are never charged more than that. If network fees jump after the quote so that the fee no longer covers sending, the withdrawal is not sent and the amount and fee go back to your balance; quote again. If a withdrawal fails after network fees were already spent on it (for example, a transaction that failed on chain), the amount comes back and the fee pays for those network fees.
- 1 · requestedYou ask. Amount + fee are reserved from your withdrawable balance.
- 2 · approvedAutomatically, whatever the amount. Only where a daily limit has been set on an account are amounts over it reviewed by our team first.
- 3 · broadcastSigned and sent, usually within a minute of approval. txid is set.
- 4 · confirmedConfirmed on chain. You get a webhook and an email.
| status | meaning |
|---|---|
requested | Received. Checked against your balance; the amount plus fee is reserved. |
approved | Approved: automatically, unless a daily limit has been set on your account and this goes over it. |
signing | Your balance has been debited; the transaction is being built and signed. |
broadcast | Sent to the network. txid is set. Counting confirmations. |
confirmed | Done: confirmationsRequired reached. |
failed | Could not be completed (rejected by the network, failed on chain, or network fees rose above the quoted fee before it was sent). The amount is refunded; so is the fee, unless network fees were already spent on it. failureReason says why. |
cancelled | Cancelled by you or by our review before anything was sent. Nothing debited. Webhook: withdrawal.cancelled. |
stuck | Sent but not confirming as expected. Our team is alerted and resolves it; it is never refunded while it could still confirm. Webhook: withdrawal.stuck. |
Minimums. The fee comes on top and is quoted before you confirm; on a busy network it can be more than a very small withdrawal itself.
| asset | minimum |
|---|---|
| BTC | 0.00001 |
| LTC | 0.0001 |
| ETH | 0.0002 |
| BNB | 0.0005 |
| TRX | 20 |
| USDT | 1 |
| USDC | 1 |
Destination addresses are checked strictly, checksum included: a mistyped Bitcoin or TRON address, a Litecoin address on Bitcoin, or a mixed-case Ethereum address with a wrong EIP-55 checksum is refused with 400 invalid_destination before anything happens.
Some CoinsFlow addresses cannot receive a withdrawal. An address of CoinsFlow itself (its wallets, or one that belongs to no merchant), and on Ethereum, BNB Smart Chain and TRON any CoinsFlow deposit or invoice address, is refused with 400 destination_not_allowed before anything is held; detail says why, in a sentence you can show. On Bitcoin and Litecoin another merchant's CoinsFlow address is an ordinary payment: it is sent, and that merchant is credited. Quote with the destination to find out first: destinationProblem holds the same sentence, or null.
Quote a withdrawal
https://api.coinsflow.app/v1/withdrawals/quoteThe fee for a withdrawal made now, the minimum, and the most you can send (maxAmount: everything withdrawable, less the fee for sending that much). With amount the fee is exact for that amount; without it, it is the lowest fee (one transaction). destinationProblem is always there: null, or, when you sent a destination that cannot receive a withdrawal, the sentence a withdrawal there would be refused with (400 destination_not_allowed). Works with any key. While no fresh USD price is known for the asset or the network's own coin, it answers 503 rates_unavailable, and so does a withdrawal; for USDT and USDC, also while either price is more than 2 hours old. USDT and USDC on TRON answer 503 chain_unavailable while their balance cannot be read.
Parameters
chainstringRequiredassetstringRequiredamountstringdestinationstringExample
curl "https://api.coinsflow.app/v1/withdrawals/quote?chain=bsc&asset=USDT&amount=250&destination=0x275685f70cCcD127ef7102f6a451524cE9a43173" \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"chain": "bsc",
"asset": "USDT",
"available": true,
"amount": "250",
"fee": "0.0124",
"feeUsd": "0.01",
"feeSource": "live",
"networkTransactions": 1,
"minAmount": "1",
"withdrawable": "1180.02",
"maxAmount": "1180.0076",
"confirmationsRequired": 15,
"destinationProblem": null
}Create a withdrawal
https://api.coinsflow.app/v1/withdrawalsAny key can withdraw. Returns 201 with status requested. Send an Idempotency-Key: a retry then returns the same withdrawal instead of sending twice. With maxFee, a fee above it is refused with 409 fee_changed and nothing is created. On Bitcoin and Litecoin one transaction combines at most 250 payments: an amount that would need more is refused with 409 too_many_payments, and the quote's maxAmount is what fits. An address that cannot receive a withdrawal (see Withdrawals) is refused with 400 destination_not_allowed before anything is held.
Parameters
chainstringRequiredassetstringRequiredamountstringRequireddestinationstringRequiredmaxFeestringorderRefstringIdempotency-KeyheaderExample
curl https://api.coinsflow.app/v1/withdrawals \
-H "Authorization: Bearer $COINSFLOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: payout-2026-09-28" \
-d '{
"chain": "bsc",
"asset": "USDT",
"amount": "250",
"destination": "0x275685f70cCcD127ef7102f6a451524cE9a43173",
"maxFee": "0.0124",
"orderRef": "payout-2026-09-28"
}'{
"id": "9b2e7c10-5d4a-4f3b-8e21-6a0c1d2e3f40",
"chain": "bsc",
"asset": "USDT",
"destination": "0x275685f70cCcD127ef7102f6a451524cE9a43173",
"amount": "250",
"fee": "0.0124",
"total": "250.0124",
"status": "requested",
"txid": null,
"networkFee": null,
"networkFeeAsset": null,
"confirmations": 0,
"confirmationsRequired": 15,
"usdValue": "249.95",
"orderRef": "payout-2026-09-28",
"failureReason": null,
"statusNote": null,
"automatic": false,
"requestedAt": "2026-09-28T10:00:00.000Z",
"approvedAt": null,
"broadcastAt": null,
"confirmedAt": null,
"failedAt": null
}Get a withdrawal
https://api.coinsflow.app/v1/withdrawals/{id}Current status, txid once sent, confirmations, and the network fee we paid. failureReason explains a failed or stuck withdrawal in plain words; statusNote explains one that is taking longer than usual. automatic is true when an automatic withdrawal set up in the dashboard made it.
Parameters
iduuidRequiredExample
curl https://api.coinsflow.app/v1/withdrawals/9b2e7c10-5d4a-4f3b-8e21-6a0c1d2e3f40 \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"id": "9b2e7c10-5d4a-4f3b-8e21-6a0c1d2e3f40",
"chain": "bsc",
"asset": "USDT",
"destination": "0x275685f70cCcD127ef7102f6a451524cE9a43173",
"amount": "250",
"fee": "0.0124",
"total": "250.0124",
"status": "confirmed",
"txid": "0xc4d7e1…0a9b",
"networkFee": "0.0000162",
"networkFeeAsset": "BNB",
"confirmations": 15,
"confirmationsRequired": 15,
"usdValue": "249.95",
"orderRef": "payout-2026-09-28",
"failureReason": null,
"statusNote": null,
"automatic": false,
"requestedAt": "2026-09-28T10:00:00.000Z",
"approvedAt": null,
"broadcastAt": null,
"confirmedAt": null,
"failedAt": null
}List withdrawals
https://api.coinsflow.app/v1/withdrawalsNewest first, paginated like invoices with nextCursor.
Parameters
statusstringchainstringlimitintegercursorstringExample
curl "https://api.coinsflow.app/v1/withdrawals?status=requested,approved,signing,broadcast&limit=50" \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"data": [ { "id": "9b2e7c10-5d4a-4f3b-8e21-6a0c1d2e3f40", "status": "broadcast", "...": "..." } ],
"nextCursor": null
}Cancel a withdrawal
https://api.coinsflow.app/v1/withdrawals/{id}/cancelOnly while it is requested or approved. Once it is being signed the network decides, and this returns 409 not_cancellable.
Parameters
iduuidRequiredExample
curl -X POST https://api.coinsflow.app/v1/withdrawals/9b2e7c10-5d4a-4f3b-8e21-6a0c1d2e3f40/cancel \
-H "Authorization: Bearer $COINSFLOW_API_KEY"{
"id": "9b2e7c10-5d4a-4f3b-8e21-6a0c1d2e3f40",
"chain": "bsc",
"asset": "USDT",
"destination": "0x275685f70cCcD127ef7102f6a451524cE9a43173",
"amount": "250",
"fee": "0.0124",
"total": "250.0124",
"status": "cancelled",
"txid": null,
"networkFee": null,
"networkFeeAsset": null,
"confirmations": 0,
"confirmationsRequired": 15,
"usdValue": "249.95",
"orderRef": "payout-2026-09-28",
"failureReason": "Cancelled by you.",
"statusNote": null,
"automatic": false,
"requestedAt": "2026-09-28T10:00:00.000Z",
"approvedAt": null,
"broadcastAt": null,
"confirmedAt": null,
"failedAt": null
}Webhooks
Add an endpoint in the dashboard (Developers) or with POST /v1/webhooks, and we POST a signed JSON event to it every time an invoice or withdrawal changes status. The event is queued in the same database transaction as the change, so none is ever lost.
POST /webhooks/coinsflow HTTP/1.1
Content-Type: application/json
User-Agent: CoinsFlow-Webhooks/1.0
CoinsFlow-Event: invoice.paid
CoinsFlow-Delivery: 5d0b8a52-6c1e-4f7a-9b3d-2e8f0a1c4b6d
CoinsFlow-Signature: t=1790590000,v1=5f3c9a0e...c21d
{
"id": "5d0b8a52-6c1e-4f7a-9b3d-2e8f0a1c4b6d",
"type": "invoice.paid",
"createdAt": "2026-09-26T10:05:40.000Z",
"previousStatus": "confirming",
"data": {
"object": "invoice",
"id": "4f1c9e2a-7b3d-4c1e-9a55-2d8e6f0b1c34",
"status": "paid",
"chain": "bsc",
"asset": "USDT",
"address": "0x652Ef5665d2FA421046cF7502B0ae16E4Bc6228C",
"amountDue": "49.99",
"amountPaid": "49.99",
"orderId": "order-1042",
"metadata": { "customerId": "c_8812" },
"priceAmount": "49.99",
"priceCurrency": "USD",
"usdValue": "49.99",
"expiresAt": "2026-09-29T10:00:00.000Z",
"createdAt": "2026-09-26T10:00:00.000Z",
"paidAt": "2026-09-26T10:05:39.000Z",
"settledAt": null,
"payments": [
{ "txid": "0x8f3c1a…e9d2", "amount": "49.99", "confirmations": 15, "status": "confirming" }
],
"paymentsCount": 1
}
}| event | when |
|---|---|
invoice.detected | A payment was seen (mempool on BTC/LTC, first block elsewhere). Not paid yet. |
invoice.confirming | A payment is in a block and gaining confirmations. |
invoice.pending | Open again: the payment that took it to detected or confirming is gone (dropped before it was mined, replaced by fee or double-spent, or reorganised out of the chain for good), so the customer can pay again. If you held stock on invoice.detected, release it here. Sent only for that step back, never when an invoice is made; past its deadline the invoice becomes expired instead (invoice.expired). |
invoice.paid | Paid in full at the required confirmations. Fulfil the order. Also sent when more than due arrived (then invoice.overpaid follows), and when you accept a short payment. |
invoice.overpaid | More than due arrived: data.amountOverpaid says how much. The whole amount is credited to you; send the surplus back with a withdrawal if you want to. |
invoice.underpaid | Less than due arrived: data.amountRemaining says how much is missing. The customer can send the rest to the same address, or you accept what came (POST /v1/invoices/{id}/accept). |
invoice.payment | One payment was credited to you. Sent for every payment, including the ones that change no status: a second payment to an invoice already paid, or a top-up that is still short. The event carries payment: { txid, amount }. On an any-coin invoice, any payment credited at the address of an earlier choice that does not pay the invoice (the coin chosen now was paid too, the invoice had already expired or been cancelled, or it came in another coin) is sent with earlierChoice: true, and payment.chain, payment.asset and payment.option name its coin: it is in your balance, and the invoice is unchanged. After a chain reorganisation the same payment can be announced again (same txid): count payments by txid. When a reorganisation mines a replacement of a payment already credited (a fee bump, a new txid for the same money), its event carries payment.replaces: true: it is the same money, not a second payment. |
invoice.settled | Reached final depth: the payment can no longer be reversed by the network. (On Bitcoin and Litecoin the money was withdrawable from invoice.paid on; elsewhere it is from now.) |
invoice.expired | Nothing arrived in time. (An invoice that received part of its amount does not expire: it stays underpaid until the rest arrives or you accept it.) An any-coin invoice whose customer never picked a coin expires the same way, with chain and asset null. |
invoice.cancelled | You cancelled it. Before an any-coin invoice’s customer picked a coin, chain and asset are null. |
withdrawal.broadcast | The withdrawal transaction was sent to the network. data.txid is set. |
withdrawal.confirmed | The withdrawal is confirmed on chain. |
withdrawal.failed | It could not be completed. The amount and fee are back in your balance. |
withdrawal.cancelled | Cancelled before anything was sent: by you, or rejected by our review (failureReason says which). Nothing was debited; the amount and fee are back in your withdrawable balance. |
withdrawal.stuck | Sent, but neither mined nor in the mempool for a long time (or reorganised out after it confirmed). Our team is alerted and resolves it; it is never refunded while it could still confirm, and if it is mined after all, withdrawal.confirmed follows. |
data is the invoice (or withdrawal) as it is when we send: for an invoice the same fields as the API, plus paidAt (when it became paid; null before) and settledAt (when it became final, at settled; null until then), with payments (the latest 50, each with txid, amount, confirmations and status) and paymentsCount; for a withdrawal the core fields (id, status, chain, asset, destination, amount, fee, txid, networkFee, networkFeeAsset, confirmations, orderRef, failureReason and the timestamps). Fetch the object from the API when you need everything. Events for one endpoint are sent in the order they happened, but one that had to be retried can arrive after a newer one, and any event can arrive more than once: use the event id to ignore repeats, and trust data.status over the event name. A ping event (from Send test) has {"type":"ping","message":"…"} as its data.
See also. Complete handlers that check the signature and act once per invoice, in Node and Python: for a Discord bot (seen, then paid, in the ticket) and for a Minecraft server store (a command over RCON when paid). The whole of this, as one article: Webhooks for crypto payments: verifying the signature and handling retries.
Verifying signatures
Every request carries CoinsFlow-Signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of <t>.<raw body> keyed with your endpoint's secret (whsec_…). Recompute it over the raw bytes, compare in constant time, and reject anything older than five minutes so a captured request cannot be replayed.
import crypto from "node:crypto";
import express from "express";
const app = express();
const SECRET = process.env.COINSFLOW_WEBHOOK_SECRET; // whsec_...
// The header comes from whoever calls this URL: compare bytes, never let it throw.
function verified(header, body) {
try {
const parts = Object.fromEntries(String(header ?? "").split(",").map((p) => p.split("=", 2)));
const t = String(parts.t ?? "");
if (!/^\d{1,12}$/.test(t) || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const given = Buffer.from(String(parts.v1 ?? ""), "hex");
const expected = crypto.createHmac("sha256", SECRET).update(`${t}.`).update(body).digest();
return given.length === expected.length && crypto.timingSafeEqual(given, expected);
} catch {
return false;
}
}
// Verify over the RAW body: parsing and re-serialising JSON changes the bytes.
app.post("/webhooks/coinsflow", express.raw({ type: "application/json" }), async (req, res) => {
if (!Buffer.isBuffer(req.body) || !verified(req.get("CoinsFlow-Signature"), req.body)) return res.sendStatus(400);
try {
const event = JSON.parse(req.body.toString("utf8"));
if (event.test) return res.sendStatus(200); // test mode: never fulfil a real order from it
if (await alreadyHandled(event.id)) return res.sendStatus(200); // retries reuse the id
if (event.type === "invoice.paid") await fulfilOrder(event.data.orderId, event.data);
res.sendStatus(200); // answer quickly; do slow work in a queue
} catch {
res.sendStatus(500); // a failure on your side: we send it again later
}
});Check your code against this. Writing the check in another language? With this body (the exact bytes: one line, no line break at the end), this secret and this timestamp, v1 must come out as below. The timestamp is in the past, so leave out the five-minute check while you compare.
{"id":"5d0b8a52-6c1e-4f7a-9b3d-2e8f0a1c4b6d","type":"ping","createdAt":"2026-10-20T10:00:00.000Z","data":{"type":"ping","message":"Test event from CoinsFlow. If you can read this, your endpoint works."}}secret whsec_example_secret_for_testing_only
t 1790590000
signed "1790590000." followed by the body above
v1 4deb3dee012a9ea4a9918068c54b03b60d2fda04a6153b4583c42dc51508bf38
header CoinsFlow-Signature: t=1790590000,v1=4deb3dee012a9ea4a9918068c54b03b60d2fda04a6153b4583c42dc51508bf38Delivery and retries
Answer with any 2xx within 10 seconds. Anything else (an error status, a redirect, a timeout, a refused connection) is retried:
| attempt | sent |
|---|---|
| 1 | immediately |
| 2 | 3 seconds later |
| 3 | 30 seconds |
| 4 | 5 minutes |
| 5 | 1 hour |
| 6 | 6 hours |
| 7 | 24 hours, then it is marked failed |
You can see every delivery, its response and its next retry in the dashboard, and send any of them again. While an endpoint is failing we wait between tries (a few seconds at first, at most an hour), and its first success sends everything that waited, in order. If it has not accepted a single event for six hours, we email the account's owner. After five days without a success it is switched off and the owner is emailed again: deliveries still waiting for it are given up on, and while it is off nothing is sent to it and nothing is kept for it, so events that happen in the meantime are never sent, not even later. Turn it back on in the dashboard (or PATCH it with "enabled": true), then send again what you missed from its delivery list, or read the current state from the API. While it is off, sending it a test event or a delivery again is refused with 409 endpoint_disabled, and nothing is queued. Test-mode events never count towards any of this, whether they are accepted or not. Endpoints must use https:// on the public internet; we do not follow redirects and never call private or internal addresses. A URL with a space or a line break in it is refused with 400 invalid_url.
Adding or removing an endpoint, pointing it at another address, switching it on or off and giving it a new secret are emailed to the account's owner; changes made within a few minutes of each other arrive as one email. A merchant can make at most 30 changes to its endpoints an hour (POST, PATCH, DELETE and rotate-secret): more are refused with 429 rate_limited and change nothing.
| endpoint | does |
|---|---|
GET / | Your endpoints (the secret is shown only as a hint here). |
POST / | Add one: url, events (default: invoice pending, paid, underpaid, overpaid, settled and expired; withdrawal confirmed, failed and cancelled), description. Returns the secret. A merchant can have 10. |
PATCH / | Change url, events, description, or enabled. |
DELETE / | Remove it. |
POST / | Queue a ping event now. 409 endpoint_disabled while the endpoint is switched off. With retries, 10 a minute per endpoint (429 too_many_attempts). |
GET / | Recent deliveries with status, attempts, response, and body: what the last attempt sent, as your server received it (null before the first). ?status=failed for failures only. |
POST / | Send one again now. 409 endpoint_disabled while the endpoint is switched off. With tests, 10 a minute per endpoint (429 too_many_attempts). |
POST / | New secret; the old one stops working immediately. |
curl https://api.coinsflow.app/v1/webhooks \
-H "Authorization: Bearer $COINSFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://shop.example.com/webhooks/coinsflow",
"events": ["invoice.pending", "invoice.paid", "invoice.underpaid", "invoice.overpaid", "invoice.settled", "invoice.expired", "withdrawal.confirmed", "withdrawal.failed", "withdrawal.cancelled"],
"description": "Order fulfilment"
}'Network status (public)
https://api.coinsflow.app/chainsNo key needed. Which networks are taking payments right now. New invoices are refused with 503 chain_unavailable on a network whose status is not ok, so a customer is never given an address nobody is watching. status is ok, delayed, offline or unavailable; paused: true means we have switched the network off (TRON, for now), not that it is slow.
Example
curl https://api.coinsflow.app/chains{
"chains": [
{
"chain": "litecoin", "name": "Litecoin", "assets": ["LTC"],
"status": "ok", "acceptingPayments": true, "paused": false,
"height": 3184650, "lastBlockAt": "2026-09-26T10:50:46.000Z",
"checkedAt": "2026-09-26T10:51:02.000Z"
},
{
"chain": "tron", "name": "TRON", "assets": ["TRX", "USDT", "USDC"],
"status": "unavailable", "acceptingPayments": false, "paused": true,
"height": 87283846, "lastBlockAt": "2026-09-26T10:51:00.000Z",
"checkedAt": "2026-09-26T10:51:02.000Z"
}
]
}Prices (public)
https://api.coinsflow.app/pricesNo key needed. The latest USD price per asset, for showing estimates, as a decimal string with 12 decimals. Invoices priced in USD work out their own amount (and bring it up to date every hour while unpaid); do not compute amounts from this.
Example
curl https://api.coinsflow.app/prices{
"currency": "USD",
"rates": { "BTC": "84125.000000000000", "LTC": "73.740000000000", "USDT": "0.999800000000", "...": "..." },
"updatedAt": "2026-09-26T10:51:00.000Z"
}Platform status (public)
https://api.coinsflow.app/statusNo key needed. The same data as the status page: overall state, payments per network, withdrawals and webhooks, and history: 90 days per component, one entry per UTC day from start, each [share up, minutes degraded, minutes down] or null before recording began (shortened in the example).
Example
curl https://api.coinsflow.app/status{
"status": "operational",
"updatedAt": "2026-09-28T10:00:00.000Z",
"components": [
{ "id": "api", "name": "Payments API", "status": "operational" },
{ "id": "withdrawals", "name": "Withdrawals", "status": "operational" },
{ "id": "webhooks", "name": "Webhooks", "status": "operational" }
],
"chains": [
{ "chain": "litecoin", "name": "Litecoin", "status": "ok", "height": 3184650, "lastBlockAt": "2026-09-28T09:58:31.000Z" }
],
"history": {
"start": "2026-07-03",
"days": 90,
"uptime": { "api": 1, "withdrawals": 0.99965, "litecoin": 1 },
"series": {
"withdrawals": [null, null, [0.99931, 12, 1], [1, 0, 0]]
}
}
}Changelog
| date | change |
|---|---|
| 2026-10-23 | A withdrawal to an address that cannot receive one is refused before anything is held, with 400 destination_not_allowed and a detail that says why: an address of CoinsFlow itself, or, on Ethereum, BNB Smart Chain and TRON, any CoinsFlow deposit or invoice address. Such a withdrawal used to be accepted, with its amount and fee held, and then failed. GET /v1/withdrawals/quote, given a destination, says the same in advance: its answer now always has destinationProblem, null or that sentence. USDT and USDC on TRON answer 503 chain_unavailable (“TRON token withdrawals are not available right now.”) while their balance cannot be read, and a USDT or USDC withdrawal or quote answers 503 rates_unavailable while the price of the token or of the network’s own coin is more than 2 hours old: its fee is paid in that coin. In the dashboard, an asset that cannot be withdrawn right now says why. Test mode: the expired outcome (Never pays) now sets expiresAt to the moment the invoice expired; it kept the deadline still to come. |
| 2026-10-20 | New webhook events: invoice.pending (an invoice open again, because the payment that made it detected or confirming was dropped before it was mined, replaced, or reorganised away), withdrawal.cancelled (cancelled by you, or rejected by our review) and withdrawal.stuck. New endpoints get invoice.pending and withdrawal.cancelled by default; the endpoints you have keep the events they chose, so add them with PATCH /v1/webhooks/{id} if you want them. Invoice webhooks carry paidAt, when the invoice became paid, and settledAt is now when it became final (settled), null until then: it used to be the paid time. Their payments leave out a payment dropped before it was mined and never credited, as GET /v1/invoices/{id} always did. Withdrawal webhooks carry approvedAt and failedAt, and networkFeeAsset is null until there is a network fee, as in the API. The delivery log gains body, what the last attempt sent. Every 404 not_found has a detail. Every 429 that clears by waiting (rate_limited, too_many_attempts) has a Retry-After header and retryAfterSeconds in its body; a 429 for too many requests from one address is JSON (rate_limited, with Retry-After) like every other error, where it was an HTML page. GET /v1/invoices takes test=true or 1 (any case) for test invoices, and false or 0 for real ones; any other value is 400 invalid_request, where it used to list real invoices without a word. A withdrawal amount or maxFee with too many decimals is 400 invalid_amount, as in a quote (it was invalid_request). A webhook endpoint description that is not text or is over 120 characters is 400 invalid_request; it used to be cut or dropped. Now documented: 409 fee_changed, 503 rates_unavailable, 400 invalid_events and limit_reached (webhook endpoints), 429 too_many_attempts (tests and deliveries sent again), 413 and 415 request_failed (a body over 64 kB, or one not sent as JSON), the 30 simulated payments a minute of test mode and the webhooksNotQueued field of its answer, that one Idempotency-Key cannot serve both an invoice and a withdrawal, and a signature to test your check against. The examples now use USDT on BNB Smart Chain, and Getting started makes a test invoice: they used TRON, which is switched off for now, and answered 503 chain_unavailable. |
| 2026-10-19 | An any-coin invoice priced in USD is refused with 400 below_minimum when, at today’s prices, its price comes to less than the smallest amount of every coin it offers: for example $0.50 offering only Bitcoin, where 0.00001 BTC is about $0.65. detail names the smallest price that works. Until now such an invoice was made, and no coin on its page could be picked. A coin with no fresh price is not counted, pay what you want is unaffected, and test invoices are refused the same way. The payment page no longer offers to change the coin while the shop is not taking payments. Webhooks: sending a test event or a delivery again to an endpoint that is switched off answers 409 endpoint_disabled and queues nothing (it used to answer 202, and what it queued was never sent); turn the endpoint on first. A webhook URL with a space or a line break in it is refused with 400 invalid_url: a line break used to be dropped without a word, so events could go to another host than the one shown. A path this API does not have answers 404 not_found, with or without a key, and detail names it. A value that is not a CoinsFlow key at all is refused with 401 and a detail that says so (keys begin with cf_live_). A body nested more than 64 levels deep is 400 invalid_request. The five Litecoin data endpoints of the coinsflow.net API (GET /v1/price/ltc, /v1/blocks/ltc, /v1/block/ltc/…, /v1/tx/ltc/… and /v1/address/ltc/…) also answer here, with your key as a Bearer token, in their old format. A merchant’s name can no longer hold a web address (400 invalid_name). Corrected in these docs: choosing a coin the price is too small for is answered 400 below_minimum (they said not_offered), and in webhooks each entry of choices comes without its payments. |
| 2026-10-18 | Pay in any coin. Create an invoice with priceAmount (USD) and no chain or asset, and your customer picks the coin and network on the payment page: Litecoin, Bitcoin, Ether, BNB, and USDT and USDC on each of their networks. Until then the invoice has the new status awaiting_choice, with chain, asset, address and amountDue null; once a coin is picked it is an ordinary invoice with its own address and amount, under the same id. Invoices gain anyCoin, accept, option and choices (with amountReceived and amountSeen); confirmationsRequired and amountOverpaid are null until a coin is picked. With openAmount: true instead of priceAmount it is pay what you want in any coin: openAmount true and priceAmount null from the start, no price needed to choose (a coin is unavailable only while its network is paused), and once a coin is picked an ordinary pay-what-you-want invoice in it. The payment page’s options carry minimum, the smallest amount of that coin that counts. Optional accept lists the options to offer, any of them whatever your default (400 invalid_option for one nobody knows, an empty list, or none on a network taking payments; options on a paused network are left out); without it, the merchant’s default applies, set in the dashboard. The customer can change coin until anything is sent, at most five times. A payment to an earlier choice’s address while the invoice is still open (not expired or cancelled) and the coin chosen now has received nothing takes the invoice back to that coin, and it is paid by it; any other payment credited at an earlier choice’s address (the coin chosen now was paid too, the invoice had ended, or it came in another coin) is credited to you as a deposit and sent as invoice.payment with earlierChoice: true, its coin in payment.asset and payment.option. No new webhook events: invoice events carry anyCoin and accept, and invoice.expired or invoice.cancelled before a choice carry chain null. An any-coin invoice counts toward the 10,000 open invoices from the start, and the first choice and every change count toward the invoices a minute. GET /v1/invoices lists any-coin invoices too (status=awaiting_choice finds those not chosen yet; a chain filter leaves them out). Works in test mode. Invoices made with chain and asset are unchanged. |
| 2026-10-18 | An invoice counts a payment against its price once the payment is credited. amountRemaining stays the whole amount, amountOverpaid "0" and paidWith null until a payment has reached confirmationsRequired; they used to follow amountPaid, which counts a payment from its first block, so on Ethereum, BNB Smart Chain and TRON an invoice could say nothing was missing while it was still confirming. amountPaid is unchanged. Fulfil on status, as before, never on amountRemaining. payments lists the latest 50 payments of an invoice, oldest first, in the API and in webhooks, and the new paymentsCount says how many there are in all. GET /v1/invoices answers 400 invalid_chain for a chain nobody knows, as the withdrawal list does, and 400 invalid_request when any status asked for is unknown (one beside known ones used to be dropped quietly). Cancel and accept answer 404 not_found for an invoice you do not have; 409 now means only "yours, but not now". New limits on real invoices: 120 a minute for one merchant and 240 for one account (429 rate_limited), and 10,000 waiting to be paid at once in one account (429 too_many_open_invoices). A replaced key is refused with reason: "key_replaced" and the day it was replaced, a suspended merchant’s key with reason: "merchant_suspended". A body that is not valid JSON or is empty is 400 invalid_request, and so is text with the NUL character or broken Unicode, which used to fail with a 500. Now documented: 409 too_many_payments (a Bitcoin or Litecoin withdrawal that would combine more than 250 payments in one transaction) and 503 busy (retry in a second). |
| 2026-10-16 | Emails about payments and withdrawals carry a one-click Unsubscribe (List-Unsubscribe), which switches that kind of email off for your address, like Settings does. A new merchant’s API key is shown after your password, the way Copy and Rotate already worked. The API itself is unchanged. |
| 2026-10-15 | Invoices made on coinsflow.net before the move can be read here too: GET /v1/invoices/{id} answers for them with "archived": true, read-only, in this API’s format (a long-expired one says "expired"). The invoice list stays this system’s own. |
| 2026-10-13 | Test mode. Send "test": true with POST /v1/invoices and you get a test invoice: the same fields, statuses and signed webhooks as a real one, and no money. Pay it with POST /v1/invoices/{id}/simulate (paid, underpaid, overpaid, detected, confirming or expired), with the buttons on its payment page, or in the dashboard under Developers. Test events and test invoices carry "test": true. Nothing else changes: an invoice made without the flag is a real invoice, as before. |
| 2026-10-13 | Smaller withdrawals. The least you can withdraw is now 0.00001 BTC, 0.0002 ETH, 0.0005 BNB, 1 USDT and 1 USDC (it was 0.00006, 0.002, 0.005, 5 and 5). Litecoin stays at 0.0001. The fee is quoted before you confirm, as before; on a busy network it can be more than a very small withdrawal itself. |
| 2026-10-12 | No daily limit on withdrawals. Every withdrawal is approved automatically, whatever its size; until now amounts over USD 5,000 a day waited for a review. A limit applies only where one has been set on an account. |
| 2026-10-12 | Every API key can withdraw, from any address. The per-key switch "Allow withdrawals with this key" and the IP allowlist are gone: 403 scope_required and 403 ip_not_allowed are no longer returned. A key can be copied again in the dashboard (Settings, after your password); until now it was shown once, when it was made. |
| 2026-10-08 | Bitcoin and Litecoin: paid at the first confirmation whatever the size, and withdrawable from then on. Until now an invoice over $500 waited for 2 (Bitcoin) or 6 (Litecoin) confirmations to be paid, and every payment waited for settled (up to 6 or 12) before it could be withdrawn. settled keeps its depths and now means only "final: the network can no longer reverse it"; if you deliver something irreversible for a large order, that is the event to wait for. A withdrawal of money that is not yet settled is sent from the coins the payment arrived in, so a reorganisation that takes the payment back takes the withdrawal back too. Balances gain transferable (what can be moved between your merchants or paid with: settled money only) and confirming; withdrawable now includes pending on these two chains. The other chains are unchanged. The quote’s maxAmount is now always an amount that is accepted: it is searched for with the fee each amount would really be charged, where it used to be "everything less the fee for sending everything", which on Bitcoin could name an amount that was then refused. A remainder too small to be a change output is no longer added to the fee. |
| 2026-10-08 | The smallest Bitcoin withdrawal is now 0.00006 BTC (about $5; it was 0.0002). TRON is switched off for now: new invoices and deposit addresses on tron are refused with 503 chain_unavailable, GET /chains reports it as unavailable with paused: true, payments to TRON addresses already given out are still credited, and TRON balances can still be withdrawn. |
| 2026-10-08 | USD-priced invoices follow the price. An invoice made with priceAmount used to keep the crypto amount it got when it was created for its whole life (3 to 7 days). Its amountDue is now brought up to date once an hour while it is unpaid, so a $20 invoice asks for $20 worth of the coin whenever it is paid; the new field amountUpdatesAt says when the next update is. It stops as soon as a payment that covers the amount is seen (in the mempool or a block), and for 15 minutes after an update a payment of the previous amount still pays the invoice in full. A part payment does not stop it: amountRemaining follows the price, and the invoice becomes paid if what was sent comes to be worth the price. Invoices made with amount (crypto) do not change. If you show the amount in your own checkout, read amountDue again before showing it, or send customers to paymentUrl. Also: signing in to the dashboard now needs a confirmed email address; API keys are not affected. |
| 2026-10-08 | Withdrawals leave when the balance says they can. On Bitcoin and Litecoin a withdrawal used to wait until the coins it would send were at the chain’s full depth (6 and 12 confirmations), although the balance already counted as withdrawable; a merchant paid in the last half hour could wait that long. A withdrawal now spends the merchant’s own payments as soon as they are settled, and the change of its own earlier withdrawals after one block. A withdrawal that still has to wait says why in statusNote, from the start. In the dashboard the amount to withdraw can be typed in US dollars. |
| 2026-10-08 | Litecoin is credited sooner. A Litecoin invoice worth at most $500 is paid after 1 confirmation (it was 2), the same as Bitcoin; larger ones still wait for 6. A deposit to a merchant’s permanent address is now credited by what it is worth, like an invoice of that value (1 confirmation on Bitcoin and Litecoin up to $500), where it used to wait for 6 on Litecoin and 2 on Bitcoin whatever its size; a merchant whose recent deposits are small together (up to $50 / up to $500) can also withdraw them sooner, at 2 / 4 confirmations on Litecoin and 1 / 2 on Bitcoin. For invoices, the depth at which a payment becomes withdrawable (settled) has not changed. Invoices created before today keep the confirmationsRequired they were given. |
| 2026-10-07 | Amounts people can actually send. An invoice priced in USD used to ask for the exact conversion at the coin’s full precision (5.001725595330388985 USDT on BNB Smart Chain for $5). It is now rounded up to 2 decimals for USDT, USDC and TRX, 6 for LTC, ETH and BNB, 8 for BTC, never by more than 0.25%; and USDT and USDC count as one dollar each while the market agrees to within 0.5%, so $5 asks for 5 USDT. An amount you give in crypto is still kept exactly. Invoice links now show what they are for when pasted into a chat (amount, coin, network, your order reference). |
| 2026-10-07 | Short and extra payments. Invoices gain amountRemaining, amountOverpaid and acceptedAt. New: POST /v1/invoices/{id}/accept turns an underpaid invoice into a paid one at the amount that arrived. New event invoice.payment, sent for every credited payment (with payment: { txid, amount }), so a second payment to a paid invoice or a top-up that is still short is no longer silent. An invoice that is overpaid in one go now sends invoice.paid and then invoice.overpaid. New endpoints subscribe to invoice.underpaid and invoice.overpaid by default. Events for one endpoint are sent in the order they happened. paidLate now looks at the payment that completed the invoice. Turnover in reports counts what arrived, not the price. You get an email for a short payment and for an extra one. |
| 2026-10-01 | Small Bitcoin and Litecoin payments become withdrawable sooner. The depth at which an invoice goes from paid to settled now depends on what the payment is worth (up to $50 / up to $500 / up to $5,000 / above): Bitcoin 1, 2, 3 or 6 confirmations, Litecoin 2, 4, 6 or 12, and never before it is paid. A small payment can be paid and settled in the same block; invoice.paid and invoice.settled are both sent, paid first. Ethereum, BNB Smart Chain and TRON are unchanged. |
| 2026-10-01 | Automatic withdrawals: in the dashboard (Withdrawals), choose an asset, your own wallet address and when to send: as soon as the balance reaches an amount, or once a day or week. Each one is an ordinary withdrawal with the same fee, limits and webhooks; withdrawals gain automatic (true when a rule made it). A rule waits while the fee would be more than the share you set, and switches itself off, with an email, if a withdrawal is cancelled or three in a row fail. The hosted payment page no longer shows the merchant name or logo. |
| 2026-10-01 | Balances gain reserved and withdrawable (payable minus what a withdrawal in progress has already claimed). Webhook invoice objects now carry description, confirmationsRequired, paidLate and paymentUrl, and priceAmount in the same form as the API. An invoice that passes through several statuses at once (for example confirming, paid, settled) now sends an event for each, so invoice.paid is never skipped. A paid invoice that receives a second payment before it settles becomes overpaid and then settled. A short block reorganisation that leaves the payment in place no longer changes the invoice or repeats its events. |
| 2026-10-01 | Pay-what-you-want invoices: create one with openAmount: true instead of amount or priceAmount. The customer sends any amount; the invoice is detected, then paid as soon as that payment is confirmed (it is never underpaid or overpaid), and amountPaid says how much arrived. Invoices and webhook objects gain openAmount; webhook objects also gain paidWith. In the dashboard, leave the amount empty. |
| 2026-09-30 | Pay with CoinsFlow: on the hosted payment page, a customer with a CoinsFlow account can pay from their balance instead of from a wallet. The invoice goes straight to settled (the usual detected, paid and settled webhooks fire), final at once, and carries paidWith: "coinsflow". Invoices gain paidWith ("chain", "coinsflow" or null). |
| 2026-09-30 | Invoices stay open at least 3 days: ttlSeconds defaults to 259200 and anything shorter is raised to it (maximum still 7 days). With a USD priceAmount the rate stays locked for the whole time. |
| 2026-09-30 | GET /status adds history: a 90-day, per-day record of every service and network, recorded once a minute. The status page shows it as uptime bars. |
| 2026-09-30 | Withdrawal fees now cover every network cost of the withdrawal, including any transactions needed to bring the funds together before sending. GET /v1/withdrawals/quote takes amount and destination and returns the exact fee (and networkTransactions). POST /v1/withdrawals accepts maxFee: if the fee is higher now, nothing is created (409 fee_changed). Withdrawals carry statusNote, a plain explanation while one takes longer than usual. |
| 2026-09-28 | Withdrawals on all five networks (API and dashboard) with fees quoted up front, automatic approval up to a daily limit, and strict address validation. Signed webhooks for every invoice and withdrawal status, with retries for 24 hours and a delivery log. API keys can be limited to IP addresses; withdrawing over the API needs a key permission, an allowlist and two-factor. Two-factor authentication, password reset and email confirmation in the dashboard. Public GET /status. |
| 2026-09-26 | Bitcoin and Litecoin payments are detected in the mempool, seconds after the customer sends them (status detected; never counted until mined). Invoices worth at most $500 are paid after 1 confirmation on Bitcoin and 2 on Litecoin. New: metadata, several statuses in one list filter, idempotency_in_progress, and a 400 for Idempotency-Keys over 200 characters instead of silently truncating them. |
Planned
Bitcoin Lightning is planned, with no date yet.
Questions? Use the chat bubble at the bottom right of any page.
Choosing a gateway? How CoinsFlow compares with OxaPay, NOWPayments, CoinPayments, Plisio, Cryptomus, CoinGate, BTCPay Server and Coinbase Commerce, each from the other side's own pages, dated.
