You are integrating BlindPay transfers into my application: moving stablecoins from a managed wallet (bl_) to any destination address, including cross-chain.
Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt (read the transfer quotes, transfers, wallets, and supported chains pages)
- The OpenAPI spec: curl https://api.blindpay.com/doc
Build the flow:
1. Check the source: GET /v1/instances/{instance_id}/customers/{customer_id}/wallets/{wallet_id}/balance before quoting, and reject transfers that would exceed it with a clear client-side error.
2. Quote: POST /v1/instances/{instance_id}/transfer-quotes with amount_reference sender or receiver. The rate is fixed 1:1; still read expires_at from the response and execute promptly rather than assuming a window.
3. Execute: POST /v1/instances/{instance_id}/transfers against the quote, persist the tr_ ID, and drive state from transfer.new and transfer.complete webhooks with Svix verification.
4. Route validation, encoded as checks before quoting: transfers are same-network by default; only USDC can cross chains, via Circle CCTP v2 between Ethereum, Polygon, Base, and Arbitrum; USDT transfers are restricted to Polygon. Map the API errors cross_chain_transfers_only_support_usdc and cctp_route_not_supported to friendly messages, but validate up front so users rarely see them.
5. Build an address-confirmation step: show chain, token, and destination address with a checksum display before executing; transfers to wrong addresses are irreversible.
Constraints:
- Amounts are integers in minor units; API keys stay server-side.
- Develop on a development instance with USDB on testnets; swap to USDC/USDT mainnets only at production cutover.
- Never initiate the same transfer twice: key on my own transaction ID and check for an existing tr_ before creating.
Deliverables: transfer service with route validation, the confirmation UI step, webhook handlers, and tests covering same-chain, valid CCTP cross-chain, and rejected-route cases.