Scenario
A user wants to sell Bitcoin or USDC and receive cash in their local bank account (e.g., Brazil PIX) immediately.Workflow
1. Generate Deposit Address
First, you need to generate a deposit address for the user to send their crypto. You can generate a Lightning invoice for Bitcoin or an on-chain address for other cryptocurrencies (e.g., USDC on Solana).Option A: Bitcoin (Lightning)
Generate a Lightning invoice for a specific amount.See the Lightning Deposit API reference for full details.
Option B: USDC (On-Chain)
Get a deposit address for a supported blockchain (e.g.,SOL-MAINNET-BETA).
See the Onchain Deposit API reference for full details.
2. Monitor for Deposit
Wait for the deposit to be confirmed. Bullring will send a webhook event when the funds are credited to the subaccount. For details on the event payload, see Deposit Events.3. Instant Withdrawal
Once the funds are available in the subaccount, trigger a withdrawal to the user’s local bank account.See the Withdraw Fiat API reference for full details.