Quickstart
Take your first card payment with Coinflow’s pre-built UI SDK and send your first payout — both against the sandbox environment.
Take your first card payment with Coinflow’s pre-built UI SDK and send your first payout — both against the sandbox environment.
This guide walks through two end-to-end flows against the sandbox environment — a card checkout and a payout to a bank account.
Before you start: Make sure you’ve completed Account Setup and have your sandbox API key and merchant ID ready.
Prefer Postman? Import the Card Checkout + Merchant Payouts collection to run every request in this guide with pre-wired variables. Set apiKey, merchantId, and userId in the collection variables and you’re ready to go.
Three steps to take your first card payment:
CoinflowPurchase component — display the card form (client-side)Coinflow’s pre-built UI handles card capture, PCI-compliant tokenization, 3DS challenges, and fraud signals automatically. You don’t tokenize cards yourself unless you have your own PCI DSS AOC.
A session key is a short-lived JWT that ties the checkout to a specific payer. Generate it on your server using your internal user ID, then pass it to the front-end.
Session keys are valid for 24 hours. Refresh when expired.
The checkout JWT signs the cart payload (amount, customer email, chargeback-protection data) so the front-end can’t tamper with it. Generate it on your server right before rendering the checkout component.
Send key (from Step 1) and checkoutJwtToken (from Step 2) to your front-end.
Install the React SDK and render CoinflowPurchase with the two tokens. Coinflow handles the rest — card entry UI, validation, PCI-compliant tokenization, 3DS, fraud scoring, and settlement to your Coinflow Wallet.
That’s a payment. When onSuccess fires, funds have settled to your Coinflow Wallet. Coinflow’s chargeback protection and 3DS are layered in by default — see Adding Chargeback Protection and About 3D Secure to tune them.
Sandbox test cards: 5204247750001471 (Mastercard) or any card from the testing guide.
If you hold your own PCI DSS AOC and want a fully custom UI, you can tokenize and charge cards via the API directly without rendering the CoinflowPurchase component. Contact support@coinflowlabs.app to provision the tokenization credentials your requests need.
Tokenize the card:
Submit the payment with the returned token as card.cardToken:
Fetch full payment details any time:
Four steps to pay a user out from your Coinflow Wallet:
Generate a session key tied to your internal user ID. You’ll pass it into the bank-link URL in the next step.
Coinflow’s hosted UI handles KYC verification and bank/card linking end-to-end — you don’t have to build any of it. Drop the URL below into an iframe, replacing YOUR_MERCHANT_ID and SESSION_KEY_FROM_STEP_1 with your own values.
When the user completes linking, the iframe emits a postMessage with method: "accountLinked". Listen for it on your page so you know when to advance the flow. See Listen for Successful Account Link Messages for a complete example.
Production URL: swap sandbox.coinflow.cash for coinflow.cash when going live. See the full Bank Authentication UI guide for show-only-cards/show-only-banks options and iframe origin configuration.
After the user finishes linking, fetch the withdrawer record to retrieve the linked bank account’s token. You’ll pass this token into the payout request in Step 4.
The response includes bankAccounts[] (and/or cards[], ibans[], pixes[] depending on what the user linked). Grab bankAccounts[0].token — that’s the account identifier you’ll use next.
Send the payout from your Coinflow Wallet to the withdrawer’s linked bank account. This example sends $3.00 via the fastest available rail.
Use the withdrawalId to check status at any time:
That’s a payout. Funds are on their way to the withdrawer’s bank account. The asap speed uses RTP for instant delivery where available, falling back to Same-Day ACH. Learn about payout speeds →
Test card numbers, bank accounts, and edge cases for sandbox testing.
Receive real-time notifications when payments and payouts change status.
Add fraud scoring and chargeback coverage to card payments.
Understand RTP, Same-Day ACH, and standard ACH options and fees.