How CoinStack works: from checkout to USDC in your wallet
CoinStack is a crypto payment gateway that works in 4 steps. A checkout is created for an amount, the customer pays it with the token and network they choose from any wallet or exchange, the payment is converted to USDC, and the USDC settles on the network you choose, to an address you choose. The fee is 0.8% per payment, which is 20 cents on a $25 checkout.
One payment from start to finish
The rest of this page follows a single payment, the one used as the running example in our docs: order 1042, priced at $25.00, paid with USDC on Base and settled as USDC on Base. The times are the timestamps on the sample objects in the docs. Read them as the order of events, since settlement usually takes seconds to a few minutes depending on the network the customer pays on.
| Time (UTC) | What happens | Checkout status | Where the money is |
|---|---|---|---|
| 16:20:11 | Your store creates a checkout for $25.00 | pending | In the customer's wallet or exchange account |
| 16:21:03 | The customer picks USDC on Base and is shown an address | pending | Still with the customer |
| 16:23:58 | The customer's transfer of 25 USDC is detected | confirming | On its way from the checkout's deposit address to your wallet |
| 16:24:37 | The payment completes and your server receives a webhook | completed | In your wallet, as 24.776432 USDC on Base |
No row in that table has a balance waiting at CoinStack for a payout. CoinStack is non-custodial, which means it does not hold merchant funds. The money ends up at your settlement address: the wallet created for your merchant account when you signed up, or any other address you name, such as a hardware wallet, a multisig or an exchange deposit address. How non-custodial settlement works covers what that means for control and for responsibility.
Step 1: a checkout is created
A checkout is a request for one payment. It has an amount, a page where the customer pays and a status. There are 3 ways to create one:
- A plugin creates it when a customer chooses to pay with crypto. Official plugins exist for WHMCS, WooCommerce, Blesta and PrestaShop.
- Your server asks the API for one.
- Someone on your team fills in the New checkout form in the dashboard and sends the customer the link, as described in creating a checkout by hand.
Through the API, only amount and currency are required:
curl https://coinstack.net/api/v1/checkouts \
-H "Authorization: Bearer $COINSTACK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amount": "25.00",
"currency": "USD",
"reference": "order-1042",
"success_url": "https://example.com/orders/1042/thanks",
"cancel_url": "https://example.com/cart"
}'The response contains a checkout_id to store with the order and a url to send the customer to. It also shows the fee for the full amount before anyone has paid: "fee": "0.20000000", which is 0.8% of $25.
Three rules apply at this step. The amount can be in any of 146 currencies, and it is converted to US dollars once, when the checkout is created, so a customer who pays an hour later owes the same dollar value. A checkout must be worth between $1 and $1,000,000. And it stays open for 24 hours unless the API call sets expires_at, which accepts anything from 10 minutes to 365 days. A checkout made in the dashboard always gets the 24 hours. The checkouts guide lists every field.
Step 2: the customer chooses a token and pays
The customer opens the checkout page. In the grid layout the first screen is headed "Choose how to pay". It shows the amount in your currency, the tokens on offer, the networks that carry the selected token, and a "You send" line with the amount in that token. The list layout puts the same choices into a Token field and a Network field. You pick the layout under Settings.
After Continue, the page shows what to send and where:
- "Send exactly" and the token amount, which copies when pressed
- a QR code
- the address, with the name of the network beside it
- the line "Send only USDC on Base to this address."
- "Waiting for payment" next to a "Rate locked" countdown
There is no wallet to connect. The customer pastes the address and amount into any wallet or into the withdrawal form of an exchange, or scans the code. A tour of the checkout page goes through every screen, and the demo checkout lets you click through it without paying.
Four things sit behind that screen. The page offers 10 tokens across 11 networks unless you narrow the list under Settings, then Payment methods. Each token and network the customer selects gets its own deposit address, and that address belongs to this checkout alone, which is how the payment is matched to order 1042. The token amount is fixed when the customer makes the choice. For stablecoins that lock has no time limit, for BTC it lasts 60 minutes and for other tokens 20 minutes, and a payment sent later is counted at the market price when it arrives. Finally, each token has a minimum checkout value, which is $1 on most networks.
Step 3: the payment is detected, converted and settled
At 16:23:58 the transfer is detected. The checkout page changes to "Confirming payment" with the note "Payment detected. This page updates when the network confirms it." From here the customer can close the tab without affecting anything.
On your side a payment record appears, shown as Confirming in the dashboard and as pending in the API. The payment is converted to USDC and delivered to your wallet. In this example the record is completed 39 seconds after it appeared, with these amounts:
| Field in the API | Label on the payment's page in the dashboard | Value in the example |
|---|---|---|
value | Value when received | 24.99375 US dollars |
fee | Fee | 0.19995 |
cost | Network cost | 0.017368 |
settled | Amount settled | 24.776432 USDC |
value is a fraction under $25 because it uses the market price of USDC at that moment, which is rarely exactly one dollar. settled is value minus fee and cost. What 0.8% covers works through these lines and shows how they change on other networks.
The record also holds two transaction hashes. The customer transaction is the transfer they sent, on the network they paid on. The settlement transaction is the one that delivered the USDC to your wallet. Both are links to a block explorer, so each side of the payment can be checked on the network itself.
Had the customer paid with BTC, or with USDT on TRON, the last row would still be USDC on the network you settle on, so your books carry one USDC balance whatever mix of tokens your customers used. Only the value, fee and cost lines would change.
Step 4: your system is told
When the checkout becomes completed, CoinStack sends a checkout.completed webhook to your server. It is a POST with the checkout as JSON, signed with HMAC-SHA256 in a CoinStack-Signature header. Your code verifies the signature, finds the order by checkout_id or reference, and marks it paid. A failed delivery is retried, 8 attempts in all over about a day, and any event can be sent again from the dashboard. The webhooks guide has verification code in Node.js, Python and PHP.
With a plugin none of this needs code. Each plugin registers its own webhook once you paste an API key, and the invoice or order is marked paid automatically.
Meanwhile the customer's page shows "Payment complete" and, if you set a success_url, a "Return to merchant" button. The button is a link that the customer may never press. Release the order when the webhook arrives or when the checkout's status reads completed, and never because the customer came back to your site.
What you see in the dashboard afterwards
The Overview page shows the wallet balance in USDC, the amount settled over the selected period, the number of payments and the number of checkouts completed. Order 1042 appears in the Checkouts list as Completed. Its page shows the amount received and the fee, with the payment and the address it was sent to listed underneath.
The USDC can be moved as soon as the payment completes. There is no payout schedule, no reserve and no payout minimum. When the account owner wants to send it elsewhere, the Withdraw button on the Overview page converts it to any supported token on any supported network, as described in withdrawing your balance.
What happens when a payment is not exact?
Customers send from their own wallets, so the amount and the timing are sometimes off.
| What the customer does | What happens |
|---|---|
| Pays slightly too little | Within your underpayment allowance, 0.5% of the total by default, the checkout still completes |
| Pays well short | The checkout becomes partial and the customer can send the rest to the same address |
| Leaves it part paid until it expires | The checkout becomes expired and is flagged underpaid. The USDC from the part payment is already in your wallet, and you either mark the checkout as resolved or refund from your own wallet |
| Pays more than 2% over | The checkout completes and is flagged overpaid. All of it settles to you |
| Pays after expiry | The payment is still recorded. If it covers the amount, the checkout completes and is flagged late |
| Sends a payment that cannot be processed | It is returned to the sender and does not count towards the checkout |
Checkout and payment statuses, explained covers every state, and underpaid crypto payments covers the most common of these cases.
Refunds, renewals and cashing out
Three jobs sit outside the four steps, and each follows from the money being in your wallet. You send a refund from that wallet to an address the customer gives you, on your own timing. A renewal is a new checkout, created each period by whatever bills the customer, such as a WHMCS or Blesta invoice. And to turn USDC into money in your bank account, you can use the dashboard's withdrawal to your bank, which converts your balance to fiat, or settle straight to a deposit address at an exchange that pays out in your currency and sell the USDC there.
Before your first real order, you can run the flow in three ways. The demo checkout shows every customer screen without money moving. Send test on a webhook in the Developers page delivers a sample checkout.completed event for $10 with the reference test. A checkout for $1, the smallest allowed, paid from your own wallet, exercises the whole path, including the webhook and the USDC arriving.
If the flow above suits your business, getting started in 15 minutes walks through sign-up and a first payment.
Frequently asked questions
How long does a payment take to reach my wallet?
Usually seconds to a few minutes after the customer sends it, depending on the network they paid on. In the sample payment in the CoinStack docs, 39 seconds separate detection and settlement for USDC on Base. There is no payout step after that. Once the payment is completed, the USDC is at your settlement address.
Do my customers need an account or a particular wallet?
No. The CoinStack checkout page asks for no sign-up and no wallet connection. The customer chooses a token and a network, then sends the exact amount to the address shown, from any wallet or straight from an exchange account.
Can I use CoinStack without writing code?
Yes. The official plugins for WHMCS, WooCommerce, Blesta and PrestaShop need one API key pasted into their settings. Without a plugin, you can create a checkout by hand in the dashboard and send its link to the customer. The API is for stores and apps that want checkouts created automatically.
Does the token my customer picks change what I receive?
No. Whatever the customer pays with, the payment is converted and you receive USDC on your settlement network, less the 0.8% fee.
Can I try the whole flow before going live?
Yes. The demo checkout shows the customer's side without any money moving, and Send test on a webhook delivers a sample checkout.completed event to your server. To see a payment settle end to end, create a $1 checkout and pay it from your own wallet. The USDC lands in your wallet less the fee, and you can withdraw it again.