The on-ramp API flow step by step: verify the customer, pick the wallet, quote, create the payin, show deposit instructions, and handle webhooks.
A crypto on-ramp integration follows six steps: verify the customer, choose the wallet that receives the stablecoins, request a quote, create the payment and show the payer deposit instructions, handle webhooks until the payment settles, and reconcile. The quote locks the rate and fees. Webhooks, not polling, tell you when the fiat landed.
This guide covers the on-ramp direction: fiat in, stablecoins out. For the payout direction, see integrating a stablecoin API. Examples use BlindPay's API on a development instance. Field names are real, but check the payins docs for the current shape before you ship.
failed and refunded mean different things for your ledger.Your backend talks to the on-ramp API. The provider talks to the banks and the blockchain. Events come back to you.
Three objects carry the whole flow: a customer (who is paying in), a wallet (where the stablecoins land), and a payin (one deposit, created from a quote). Everything else is detail on those three.
Every payin belongs to a verified customer. On BlindPay that takes two calls.
POST /v1/e/instances/{instance_id}/tos, send the customer to it, and keep the tos_id it returns.POST /v1/instances/{instance_id}/customers with the tos_id, type (individual or business), and the KYC or KYB fields.Then wait. KYC Standard for individuals is automated and takes about 60 seconds. KYB for businesses and KYC Enhanced for high-risk countries are manual reviews of 3 hours to 1 business day. A customer.update webhook tells you when kyc_status changes. Don't request quotes until it reads approved. How to automate KYC and KYB covers the data you need to collect.
Pick the destination before you quote, because the quote needs its ID.
| Destination | ID | Custody | When to use it |
|---|---|---|---|
| External blockchain wallet | bw_... | The customer holds the keys | The customer already has a wallet, or you never want to hold funds |
| Managed wallet (beta) | bl_... | BlindPay custodies the balance | You want a balance without running wallet infrastructure |
| Virtual account | Settles to a linked wallet | Depends on the linked wallet | US payers send ACH or wire to a dedicated account number |
An external wallet is registered once per address. On EVM networks the customer can sign a message so BlindPay recovers the address from the signature. On Stellar, Solana, and Tron you submit the address directly, so validate it twice: a stablecoin sent to the wrong address can't be recovered. The network is read from the wallet record, so you never pass a network on the quote.
The payin quote locks the numbers. Send it the amount, the rail, the token, who pays the fee, and the destination.
Four fields cause most bugs:
request_amount is an integer in minor units. 100000 is R$1,000.00. For MXN, COP, and ARS it must also be a whole currency unit (a multiple of 100).currency_type says which side the amount is in. On a payin quote, sender means fiat. On a payout quote it means stablecoin. Same field, opposite meaning.cover_fees decides who pays: false takes the fee out of the stablecoins delivered, true adds it to the fiat the payer sends.payer_rules names who may pay. Pix needs the allowed CPF or CNPJ tax IDs, Transfers 3.0 needs a CUIT or CUIL, and PSE needs the payer's name, document, email, phone, and bank code.The response returns sender_amount, receiver_amount, the market rate (commercial_quotation), the rate with fees (blindpay_quotation), each fee line, and expires_at in epoch milliseconds. You have 5 minutes. Stablecoin API quotes explained covers fee direction and units in depth.
Create the payin from the quote, then show the payer what their rail needs.
The path says evm for every method, including Pix, SPEI, PSE, and Transfers. The name is historical; it doesn't restrict the network. The response fills only the field for your rail:
| Payment method | Show the payer |
|---|---|
| ACH, wire | blindpay_bank_details plus the memo_code to include in the transfer |
| Pix | pix_code, as copyable text or a QR code |
| SPEI | The clabe to transfer to |
| Transfers 3.0 | The account (CVU, CBU, or alias) in tracking_transaction.transfers_instruction |
| PSE | The payment link in tracking_transaction.pse_instruction |
If the customer has an approved virtual account, ACH and wire deposits go to that dedicated account and the memo code is ignored. RTP is the exception: it always uses the memo-code path.
A created payin can't be cancelled. If the payer never pays, it fails after the rail's waiting window. Send the idempotency key on every create, so a network retry can't produce two payins. The header follows the IETF Idempotency-Key draft, and why idempotency keys matter covers the failure it prevents.
Three events cover a payin's life:
payin.new when the payin is created, including deposits into a virtual account.payin.update at intermediate steps, such as an arrival check or manual review.payin.complete when it finishes: delivered, refunded, or failed.Every call is signed with svix-id, svix-timestamp, and svix-signature headers. Verify the signature on the exact raw bytes, before you parse the JSON, following Svix's verification guide. The svix-id stays the same across redeliveries of one event, so it's your deduplication key. Events can arrive out of order, so store a status only if it moves the payment forward, and never overwrite completed, failed, or refunded. Stablecoin API webhooks has the code-level detail.
Treat webhooks as the fast path and a daily job as the truth.
The payin's top-level status is the source of truth: processing, on_hold, completed, failed, or refunded. Four tracking_* objects (tracking_transaction, tracking_payment, tracking_complete, tracking_partner_fee) expose a finer step for status screens. Each day, list payins with GET /v1/instances/{instance_id}/payins and compare them with your ledger: amounts, statuses, fees. Match on the payin ID, not the transaction hash, because a transaction replaced during a gas spike can land under a different hash.
These show up in the first week of production:
refunded means the deposit went back to the sender. Fiat refunds wait on the bank network and can carry fees. failed needs a look before you tell the customer anything.Development instances run the whole flow without real money. Payins complete automatically about 30 seconds after creation and deliver USDB, a test stablecoin, on testnets such as Sepolia, Base Sepolia, Polygon Amoy, Stellar testnet, and Solana devnet.
Force the outcomes you can't wait for in real life: a payin for 666.00 fails and one for 777.00 is refunded. Run both through your webhook handler and ledger. Two things the sandbox can't show you: Tron has no testnet, and real deposits arrive on real rail timing. Plan one small supervised payin per rail in production. Sandbox vs production lists the rest.
BlindPay's docs come in two flavors over the same API, the same keys, and the same webhooks.
Choose Abstracted if your users never see a wallet address. Choose Advanced if your product is a wallet, or if your users pick the network. You can switch at any time; nothing about your account changes.
AI coding agents are good at this kind of work, if they get the API's rules up front. BlindPay ships three surfaces for them:
@blindpay/mcp) that exposes the API as tools for Claude Code, Codex, Cursor, and other MCP clients.evm path).A prompt that works: "Using the BlindPay API on a development instance, build a payin flow for Pix: create a customer, register a Solana wallet, request a payin quote with cover_fees: false, create the payin, render the Pix code, and handle payin.* webhooks with Svix signature verification and deduplication on svix-id. Write tests for completed, failed (666.00), and refunded (777.00)." The build with AI page has the setup.
Get a development instance, run one Pix or ACH payin end to end, and force a failure and a refund. If your handler and ledger stay correct through all three, you're ready for the production checklist. If you're still choosing a provider, read business vs consumer crypto on-ramps and crypto on-ramp fees explained first.
This article is general information, not legal, tax, or financial advice. API fields and behavior change; the BlindPay docs are the reference.
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.
How to choose a stablecoin payment provider in 2026: the four provider types, a comparison of 10 options, and the questions that decide the fit.