The core objects behind a stablecoin API, how they relate, which IDs to store in your ledger, and 8 data-model mistakes that break payout integrations.
A stablecoin API is built from about eight objects. A customer is the verified person or business. Bank accounts and wallets are where money goes or sits. A quote locks the rate and fees. A payout or payin executes that quote, a virtual account collects repeat deposits, and webhook events report every change. Get those relationships right and the integration code stays small.
Key takeaways
The integration guide walks through the calls in order. This page covers the layer under the calls: what each object means, how they link, and what your own database should keep.
The core objects are the environment, customer, bank account, wallet, quote, payout, payin, virtual account, and webhook event.
| Object | What it represents | How long it lives | Example ID at BlindPay |
|---|---|---|---|
| Instance (environment) | An isolated sandbox or production space. Nothing crosses between them | Permanent | in_... |
| Customer | The verified individual or business that sends or receives money. Passes KYC or KYB | Permanent | re_... |
| Bank account | A fiat destination for payouts: rail, account details, holder name. Can belong to a third party | Until deleted | ba_... |
| Blockchain wallet | An external address the customer controls, on a specific network | Until deleted | bw_... |
| Managed wallet | A stablecoin balance the provider holds for the customer | Permanent | bl_... |
| Quote | A locked rate, fee split, and amount for one payment | Minutes | qu_... (payout), pq_... (payin) |
| Payout | Stablecoins out, local currency into a bank account | Permanent record | po_... |
| Payin | Local currency in, stablecoins out to a wallet | Permanent record | pi_... |
| Virtual account | A reusable bank account in the customer's name for repeat deposits | Until closed | va_... |
| Webhook endpoint and event | Your URL, and the messages sent to it on each state change | Endpoint permanent, events replayable | we_... |
Less common objects follow the same pattern: transfers between wallets, bills to pay (payables), off-ramp wallets that pay out on deposit, and partner fees. If you understand the ten above, you can read any of them.
Every object hangs off a customer inside one environment, and every money movement points back to a quote.
Picture a tree. The instance is the root. Customers sit under it. Each customer owns its destinations and sources: many bank accounts, many wallets, and usually one or a few virtual accounts. A virtual account points at the wallet where converted stablecoins land.
Money movements sit beside the tree, not inside it. A payout quote references a customer's bank account plus the network and token that fund it. The payout references that quote and the wallet the stablecoins come from. A payin references its payin quote and the destination wallet. Webhook events reference whichever object changed.
Three cardinality rules save the most bugs:
Store every provider ID next to the record it maps to, plus the references your finance team will ask for later.
| Your record | What to store | Why |
|---|---|---|
| User or business | Customer ID, KYC status | Every payment needs the customer; status gates what they can do |
| Payee | Bank account ID, rail, last four digits | Lets you reuse the destination without resending details |
| Wallet | Wallet ID, address, network | The same address on two networks is two different wallets |
| Payment | Quote ID, payout or payin ID, your idempotency key, status, amounts in minor units, token, network | The core of reconciliation |
| Rail reference | SWIFT UETR, Fedwire IMAD, or bank reference when the rail returns one | What the recipient's bank asks for when a payment goes missing |
| Onchain reference | Transaction hash | Proves the stablecoin leg happened |
| Webhook log | Message ID, event type, received time, processed time | Deduplication and audit |
Amounts deserve their own rule. Store integers in minor units, the way the API sends them. A request_amount of 66600 in USD means $666.00. A float will eventually round a cent the wrong way, and finance will find it at month end.
A quote request names the destination, amount, and funding token; the payout request names the quote. The example below is generic and illustrative. Field names differ by provider.
Three details in that exchange matter. expires_at is a timestamp you read, not a window you assume. The Idempotency-Key header, described in an IETF draft, lets you retry the POST without paying twice; our idempotency guide covers the edge cases. And the payout comes back as processing, not completed. The final answer arrives by webhook.
Each object has a small state machine, and your code should mirror it rather than invent its own.
| Object | Common states | Terminal states | Watch for |
|---|---|---|---|
| Customer | verifying, pending review | approved, rejected | Approved with an open information request |
| Virtual account | pending review, bank review | approved, rejected | Rail details are empty until approval |
| Quote | active | expired, used | Expiry before the sender confirms |
| Payout | processing, on hold | completed, failed, refunded | A failed payout is not automatically refunded |
| Payin | processing, on hold | completed, failed, refunded | A refunded payin means the deposit went back to the sender |
Model "on hold" as pending, not as an error. SWIFT and USD payouts often pass through a review hold as a standard step, so most users will see it at least once.
Build it in the same order money moves. Seven steps:
created, then request the quote and the payout.These eight show up in nearly every first integration, and each has a one-line fix.
| Mistake | What breaks | Fix |
|---|---|---|
| Treating the customer as your login user | Duplicate KYC, payments split across "customers" for one company | One customer per legal party; many logins can act for it |
| Registering only your direct clients when you pay on behalf of others | Compliance gaps in nested flows | Register each end customer as its own customer when the provider requires it |
| Storing the bank account on the payee profile only | Third-party payouts fail to map | Bank account belongs to the paying customer, with holder name stored separately |
| Storing amounts as floats | Cent-level drift at reconciliation | Integers in minor units, converted only for display |
| Caching or reusing quotes | Expired or rejected payouts | New quote per payment, executed immediately |
| Generating a new idempotency key on each retry | Duplicate payouts after a timeout | One key per intended payment, saved before the first call |
| Applying webhooks in arrival order | A late event moves a completed payout back to processing | Forward-only transitions, dedupe by message ID |
| Counting linked events twice | One bill payment shows as two payments | Correlate linked records (for example a payable and its payout) by ID and count once |
BlindPay's API uses these same objects with prefixed IDs, so a log line tells you what you are looking at. The docs come in two flavors: Abstracted, for teams that think in bank rails (virtual accounts, payins, payouts), and Advanced, for teams that work with wallets, approvals, and chains directly. Both describe the same API. Official SDKs for Node.js, Python, Go, PHP, and Swift are generated from one OpenAPI 3.1 spec, so the object shapes match across languages. The customers reference and the webhook event list are good first reads.
Draw your current schema next to the table in this article. For each payment row, check that you store the quote ID, the payout or payin ID, your idempotency key, and the amount in minor units. If any of those is missing, add the column before your first production payout, not after the first reconciliation break.
Seven places blockchain payments beat bank rails: contractor payroll, remittances, B2B suppliers, marketplaces, 24/7 treasury, bill pay, and PSP payouts.
AP2, ACP, and x402 each verify that an AI agent had permission to spend. Here is what every protocol covers, who backs it, and the reconciliation gap none of them close.
Seven stablecoin payment platforms compared for US fintechs in 2026: what makes an API production-ready, how each provider handles compliance, settlement speed against ACH, and how to run the evaluation.