Build stablecoin payins with AI agents: API, MCP server, Agent Skills, and CLI
Build stablecoin payins with AI coding agents using BlindPay's API, MCP server, Agent Skills, and CLI. Setup in 6 steps, a task map, and guardrails.
BlindPay offers a REST API with an OpenAPI spec, a hosted MCP server, Agent Skills, and a CLI. An AI coding agent can use them to create customers, wallets, payin quotes, payins, virtual accounts, and webhook endpoints, and to read back structured results. Start on a development instance, and keep a human in the loop for money movement.
This guide is about payins: fiat in, stablecoins out. For the manual version of the same flow, read the integration quickstart. For the payout and FX angle, see how AI agents get live FX quotes through MCP.
Key takeaways
- BlindPay gives agents four surfaces: the REST API, the MCP server, Agent Skills, and the CLI. They sit on the same API.
- The hosted MCP server uses sign-in and instance selection, so no API key goes into the client.
- API keys have full access to an instance. For read-only access, use the read-only MCP URL.
- Development instances run payins with test money.
66600forces a failure and77700a refund, so an agent can practice the unhappy paths. - The server does not block a write call on its own. Put the confirmation step in your prompt or app.
Why do AI agents need structured payment APIs?
Agents work best when an API returns predictable fields and clear errors. A payin has exact rules: amounts are integers in minor units, a quote expires in 5 minutes, and a created payin cannot be canceled. An agent that guesses at those rules writes code that fails in production.
Structured surfaces remove the guessing. The MCP server hands the agent the call order, amount units, and the steps a person must do in the dashboard. Agent Skills teach rails and fees. The CLI returns JSON. Together they make generated payin code more likely to be correct on the first pass. Agents also need a way to see payments after the fact, which is why the same surfaces cover listing and retrieving payins.
What does each surface do?
The four surfaces cover different working styles. Pick by where the agent runs and what it needs to do.
| Surface | Best for | Example payin task | Guardrail |
|---|---|---|---|
| REST API and OpenAPI 3.1 spec | Code the agent writes into your backend, app builders | Generate a typed client from https://api.blindpay.com/doc and write the payin route | Key stays server side, never in client code |
| MCP server | An agent that acts during a chat or coding session | Call PostV1InstancesPayinQuotes, show fees, then PostV1InstancesPayinsEvm after you confirm | Sign in to a development instance; use /mcp/readonly to look only |
| Agent Skills | Better generated code in Codex, Claude Code, Cursor | Build a webhook handler that follows BlindPay's conventions | Review the generated diff |
| CLI | Shell sessions, scripts, CI | blindpay payin_quotes create, then blindpay payins create --quote-id qu_... | Development key stored as a CI secret |
The MCP server's tools are generated from the public API, and each carries read-only or destructive annotations. The payin tools include PostV1InstancesPayinQuotes, PostV1InstancesPayinsEvm, GetV1InstancesPayins, and GetV1InstancesPayinsById. Related tools cover customers (PostV1InstancesCustomers), blockchain wallets (PostV1InstancesCustomersBlockchainWallets), virtual accounts (PostV1InstancesCustomersVirtualAccounts), and webhook endpoints (PostV1InstancesWebhookEndpoints). The full list is in the MCP tools reference.
The CLI installs with npm install -g @blindpay/cli and is configured with blindpay config set --api-key <your-api-key> --instance-id <your-instance-id>. Every command takes --json, blindpay schema returns the field definitions, and exit codes are 0, 1, and 2. See the CLI announcement for the command list.
What can an agent safely do?
An agent can safely do anything that reads or that happens on a development instance. It should not move production money without a person approving the exact amount and recipient.
| Task | Safe by default? | Why |
|---|---|---|
| Read payins, customers, wallets, webhook endpoints | Yes | Read tools; also served at the read-only URL |
| Look up rails and required bank fields | Yes | Reference data tools |
| Write payin code, webhook handlers, and tests | Yes, with review | Output is code you read before it runs |
| Create customers, quotes, and payins on development | Yes | USDB test token, no real money |
| Create a virtual account on production | Needs a person | Triggers real compliance and bank review |
| Create a payin on production | Needs a person | Confirm the amount and the destination wallet first |
| Register a production webhook or change settings | Needs a person | Affects how real events reach your systems |
Payins are the lower-risk direction, because the payer moves the fiat, but a wrong destination wallet still matters. BlindPay cannot recover stablecoins delivered to a wrong address. Treat the wallet address like a payment instruction and have a person confirm it.
How do I set it up?
Follow these six steps. They work in Claude Code, Codex, Cursor, VS Code, and other MCP clients.
- Create a development instance. Do this in the BlindPay dashboard. Customers are approved automatically and payins complete about 30 seconds after creation.
- Connect the MCP server. In Claude Code run
claude mcp add --transport http blindpay https://mcp.blindpay.com/mcp. In Codex runcodex mcp add blindpay --url https://mcp.blindpay.com/mcp. Sign in and pick the development instance. For hosts that run only local servers, or for CI, usenpx -y @blindpay/mcpwithBLINDPAY_API_KEYandBLINDPAY_INSTANCE_IDset. - Add Agent Skills. Run
npx skills add blindpaylabs/skills. - Give the agent the payin prompt. The payins integration prompt encodes the gotchas, and the connect an AI agent prompt covers the MCP setup. A task prompt that works: "Using the BlindPay tools on my development instance, create a customer, register a testnet wallet, create a payin quote for 10000 with cover_fees true, create the payin, and write a webhook handler that verifies the Svix signature and deduplicates on svix-id."
- Have it test failures. Ask for a failed payin (
request_amount66600) and a refunded one (77700), and for tests proving the ledger is correct in both. The case list is in the payin sandbox testing checklist. - Review before production. Read the diff, confirm signature verification and idempotency, and switch to production keys yourself.
The full per-platform table, including Lovable, v0, Bolt, and Replit, is in the Build with AI docs.
What guardrails should I add?
Add guardrails at four levels: keys, environment, approval, and review.
- Scoped access, with what exists today. API keys carry full read and write access to one instance, and a read-only key type is not yet available. So give an agent a development key only, and use
https://mcp.blindpay.com/mcp/readonlywhen it should just observe. - Sandbox first. Do all building on a development instance. Switching to production means a new instance, a new API key, and a new webhook endpoint.
- Human approval for money movement. The MCP server does not block a call itself. Tools carry annotations, so clients that support them can ask before any non-read call, and the server tells the agent to confirm amounts and recipients on production. Keep a confirmation step in your own prompt as well.
- Secrets hygiene. Keep keys in environment variables or secrets, never in prompts or client code. If a key leaks, delete it and create a new one, which revokes it immediately.
- Idempotency. Have the agent send an
Idempotency-Keyon every create call, so a retried tool call cannot create two payins. The behavior is covered in idempotency keys in a stablecoin API. - Disconnect when done. You can disconnect an agent from Settings, then Connected apps, in the dashboard.
Respect the development rate limit too: 40 requests per minute per instance, which a looping agent can hit.
What should the agent build for webhooks?
Ask it for the same handler you would write by hand: verify the svix-id, svix-timestamp, and svix-signature headers on the raw body, deduplicate on svix-id, read status from the payload, and never move a terminal payin backwards. The design is in payin webhooks, idempotency, and reconciliation. The MCP server also exposes every webhook event and its payload schema as resources under blindpay://webhooks/events, so the agent can check payload shapes without guessing.
Where does BlindPay fit?
BlindPay offers the REST API with an OpenAPI 3.1 spec, official SDKs for Node.js, Python, Go, PHP, and Swift, a hosted MCP server with a read-only endpoint, a local @blindpay/mcp package, Agent Skills, the CLI, and prebuilt quickstart prompts. BlindPay describes itself as AI-native stablecoin infrastructure, and these are the documented surfaces behind that description. Details are on the MCP page.
For where agent payment protocols fit, see AP2, ACP, and x402 compared. If you are new to the payin model, begin with what a stablecoin payin API is. BlindPay's fees are shown in the quote before you create a payin. See /pricing.
Sources
- BlindPay docs, Build with AI (checked on 2026-10-30)
- BlindPay docs, BlindPay MCP tools reference (checked on 2026-10-30)
- BlindPay, CLI announcement (checked on 2026-10-30)
- Model Context Protocol, introduction (checked on 2026-10-30)
This article is for general information only and is not legal, tax, or financial advice.
FAQ
More stablecoins articles
See all stablecoins articlesFull-stack stablecoin platform vs payout API: which layer does your product need?
Issuance, wallets, cards, orchestration, or local payouts? Map your job to the right layer of the stablecoin stack, with BlindPay and Bridge as examples.
Stablecoin API vs traditional cross-border rails: a plain-English guide for payments teams
A stablecoin API moves money across borders using dollar-pegged tokens like USDC instead of correspondent banks. How the flow works, what no pre-funding means, and a side-by-side table against SWIFT.
Neobank stablecoin stack by layer: BlindPay, Bridge, Circle, Fireblocks, Paxos, and BVNK
Which stablecoin provider fits each neobank layer: BlindPay for accounts in and local payouts, plus Bridge, Circle, Fireblocks, Paxos, and BVNK.