You are integrating BlindPay payouts funded from customers' own blockchain wallets (not managed wallets) into my application, covering EVM chains, Solana, and Stellar.
Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt (read the blockchain wallets page and the per-chain payout guides: EVM, Solana, Stellar)
- The OpenAPI spec: curl https://api.blindpay.com/doc
Build the flow:
1. Register the wallet: for EVM, fetch the challenge with GET /v1/instances/{instance_id}/customers/{customer_id}/blockchain-wallets/sign-message, have the user sign it in their wallet, then POST /v1/instances/{instance_id}/customers/{customer_id}/blockchain-wallets to get the bw_ ID. Handle the direct-address registration path where the docs allow it.
2. Quote: POST /v1/instances/{instance_id}/quotes with bank_account_id, network, and token. For EVM the response includes a contract object (address, abi, functionName "approve", blindpayContractAddress, amount, network): use it verbatim to build the ERC-20 approve transaction for the user's wallet. Never hardcode contract addresses.
3. Authorize on-chain, per chain: EVM sends the approve transaction; Stellar authorizes and signs the XDR, executed via POST /v1/instances/{instance_id}/payouts/stellar; Solana uses token delegation per the docs.
4. Execute: POST /v1/instances/{instance_id}/payouts/evm (or /stellar) with quote_id and sender_wallet_address, before the quote's expires_at. Because the on-chain step takes time, build the timing carefully: request the quote, get the authorization confirmed, and execute immediately; if the quote expired while waiting for the transaction, re-quote and reuse the existing allowance when it covers the new amount.
5. Track payout.new/update/complete webhooks (Svix-verified) and surface on-chain failure separately from payout failure in my UI.
Constraints:
- API keys stay server-side; wallet signing happens client-side only.
- Test on a development instance with USDB on testnets (base_sepolia or solana_devnet) end to end, including a deliberately expired quote.
Deliverables: wallet registration flow (sign-message UX included), the per-chain authorization module, quote-execute orchestration with the expiry race handled, and webhook handlers.