How To: Implement User Self-Custodial Wallet Payouts
How To: Implement User Self-Custodial Wallet Payouts
Developers can use this documentation to implement a payout from an end-user’s wallet to their bank account.
How To: Implement User Self-Custodial Wallet Payouts
Developers can use this documentation to implement a payout from an end-user’s wallet to their bank account.
This guide enables end-users to withdraw funds directly from their self-custodial crypto wallet to their bank account. You can implement this using either our React SDK for a pre-built UI or our API for a custom integration.
Supported chains: Solana, Ethereum, Base, Polygon, Arbitrum, Stellar
Stellar withdrawals support both USDC and token swaps (any Stellar asset swapped to USDC via the Stellar DEX, then converted to fiat).
End-user must have their own crypto wallet as the source of funds
Ability to connect and interact with user wallets (e.g., via Web3 provider)
User wallet must be able to sign and send blockchain transactions
Select either React SDK (pre-built UI) or API (custom UI) implementation
Choose your preferred implementation method:
Use our pre-built React component for the fastest implementation with a complete UI.
Add the CoinflowWithdraw component to your application:
Configure withdraw webhooks to receive notifications when users complete KYC or any withdraw events. View webhook reference
View all webhook activity from your merchant dashboard’s ‘Webhook Activity’ tab.
Build a custom UI with full control over the user experience.
Generate a session key for the withdrawer
Endpoint: GET /api/auth/session-key
To complete a payout/withdraw, every Withdrawer must complete verification before they can proceed with a payout through Coinflow. Withdrawers only need to KYC the first time they withdraw and do not need to KYC again for any subsequent withdrawals.
Choose your KYC implementation method:
Merchants who want to use Coinflow for KYC should call Register User.
Endpoint: POST /api/withdraw/kyc
Endpoint: POST /api/withdraw/kyc
Merchants who want to pass KYC data from their existing KYC provider can call our Register User via Document endpoint.
Merchants who want to share Sumsub data with Coinflow will need to enter a tri-party agreement with Sumsub and Coinflow. Reach out to the Coinflow team with your Sumsub client ID to get started.
Once this agreement has been signed, follow these steps:
Merchants must receive approval from the Coinflow Compliance team regarding approval of your KYC attestation program. Once you’ve receive approval, follow these implementation steps.
Call this endpoint after KYC to ensure the withdrawer’s verification.status = approved. They must be approved before they can proceed further!
Endpoint: GET /api/withdraw
Enable end-users to link their bank accounts or payment methods. Choose the appropriate endpoint based on the user’s location:
For U.S. Users - Add Bank Account
Endpoint: POST /api/withdraw/account
For U.S. Users - Add Debit Card (Push to Card)
Tokenize Debit Cards First
Before adding a debit card for payouts, you must tokenize it. Follow our Tokenize Debit Cards for Withdraws guide.
Endpoint: POST /api/withdraw/debit-card
For U.S. Users - Add Bank Account for USD Payouts
ACH, Same Day ACH or RTP (Real Time Payments) are available.
Endpoint: POST /api/withdraw/account
For EU Users - Add European Bank Account (IBAN)
For Euro (EUR) payouts via SEPA.
Endpoint: POST /api/withdraw/iban
For UK Users - Add UK Bank Account (IBAN with Sort Code)
For GBP payouts via UK Faster Payments.
Endpoint: POST /api/withdraw/iban
For Brazilian Users - Add PIX Account
For BRL (Brazilian Real) payouts via PIX.
Endpoint: POST /api/withdraw/pix
Display the quote for the withdraw by calling the Get Quote endpoint
Token Values by Environment:
4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDUEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1vEndpoint: GET /api/withdraw/quote
Call our Create a transaction endpoint, then have the user sign and send the transaction returned.
Getting the Account Token
When calling this endpoint, account should be the bankAccounts[0]['token'] or cards[0]['token'] value returned from calling our Get Withdrawer endpoint
Endpoint: POST /api/withdraw/transaction
Now that you’ve implemented user self-custodial wallet payouts, here’s what to do next: