You are integrating BlindPay virtual accounts into my application: each customer gets a dedicated US bank account (routing and account number) whose deposits settle automatically as USDC/USDT to a linked blockchain wallet.
Before writing code, read these sources and follow them over any prior knowledge:
- https://blindpay.com/docs/llms.txt (read the virtual accounts pages, customers, blockchain wallets, and webhooks)
- The OpenAPI spec: curl https://api.blindpay.com/doc
Build the flow:
1. Create the customer and wait for KYC/KYB approval (customer.update webhook). Business customers need owners and the KYB document set.
2. Register the settlement blockchain wallet for the customer.
3. Make sure the compliance fields virtual accounts require are set on the customer (account_purpose, source_of_wealth, and the business fields for KYB), updating via PUT /v1/instances/{instance_id}/customers/{customer_id} if needed.
4. Create the virtual account: POST /v1/instances/{instance_id}/customers/{customer_id}/virtual-accounts with banking_partner, token, and blockchain_wallet_id.
5. Handle the two-stage review lifecycle (pending_review, verifying, approved or rejected) through virtualAccount.new and virtualAccount.complete webhooks; only show account details to the customer once approved.
6. Record deposit settlements via wallet.inbound webhooks and reconcile fees: deposits under $100 accrue to the monthly invoice (billing_fee_amount), larger ones are charged at transaction time (transaction_fee_amount).
Constraints:
- API keys stay server-side; verify Svix webhook signatures on every event.
- On a development instance virtual accounts skip review and go straight to approved, so also code the rejected path deliberately.
- Persist va_, re_, and bw_ IDs on my own records.
Deliverables: virtual account service, webhook handlers for the account lifecycle and inbound deposits, and a summary of which compliance fields my onboarding form must collect for individuals versus businesses.