User Self-Custodial Wallet Payouts

Developers can use this documentation to implement a payout from an end-user's wallet to their bank account.

🚀 User-Initiated Payout Guide

Enable fiat payouts for your users from their self-custodial crypto wallets with either API integration or our pre-built UI component.


⚙️ API Implementation

Follow these steps to enable crypto-to-fiat payouts directly from users' wallets:

1. KYC/KYB Verification

2. Set Up Payout Destinations

🚧 Required: Bank Authentication

Merchants MUST implement Bank Authentication if adding payouts to bank accounts.

This is a requirement per Approvely's AML policies and is a requirement prior to go live.

Configure payout methods by region:

3. Display Withdraw Quotes

  • Get Quote
    Use the correct USDC token address depending on the chain and environment:

Solana

  • Sandbox: 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
  • Prod: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v

Ethereum

  • Sandbox: 0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238
  • Prod: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

Base

  • Sandbox: 0x036CbD53842c5426634e7929541eC2318f3dCF7e
  • Prod: 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Polygon

  • Sandbox: 0x41e94eb019c0762f9bfcf9fb1e58725bfb0e7582
  • Prod: 0x3c499c542cef5e3811e1192ce70d8cc03d5c3359

Arbitrum

  • Sandbox: 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
  • Prod: 0xaf88d065e77c8cC2239327C5EDb3A432268e5831

4. Initiate Payouts

5. Sign and Send Transactions

  • Complete the payout flow by having the user sign and submit the transaction on-chain.

6. (Optional) View Withdrawer History


💻 Pre-built UI Implementation

UI SDK Docs →

Approvely provides a React component to simplify integration:

1. Install the Package

npm i @coinflowlabs/react@latest

 

2. 🧩 Implement CoinflowWithdraw Component

Use Rapid's pre-built React component to quickly enable user-initiated payouts.

<CoinflowWithdraw  
  wallet={wallet} // The user's wallet.
  merchantId={"YOUR_MERCHANT_ID"} // Your registered merchant ID  
  env={"sandbox"} // Use "prod" in production  
  onSuccess={(...args) => console.log('Withdraw Success', args)} // Callback on success  
  blockchain={"solana"} // Replace with your blockchain (e.g., "ethereum", "polygon")  
  connection={connection} // Required only for Solana; omit for other chains  
  email={"[email protected]"} // User's email address  
  origins={["https://foo.com", "https://bar.com"]} // Optional: Allowed iframe ancestor URLs  
/>

 


Testing the Payout Flow

Simulate the payout process to ensure everything works as expected:

  • KYC/KYB the end user.
  • Link a bank account or debit card to the end user’s profile.
  • Send testnet USDC to the user’s wallet using our faucet.
  • Withdraw the funds to the user’s linked bank account or debit card.
  • Verify the successful withdraw in your Merchant Admin Dashboard.