Building with AI
Use Stables to add stablecoin payments, USDC and USDT payouts, virtual accounts, fiat off-ramps, and webhook reconciliation to AI agents and agentic commerce products.
Start with:
- AI agents for agent payment use cases and discovery surfaces.
- MCP to connect any MCP client to the hosted Stables server at
mcp.stables.money, by signing in with your Stables account, or with a sandbox API key. Nothing to install. For production keys, run the same server locally from an allowlisted machine. - Agent safety for human approval, KYC/KYB, entitlements, and compliance boundaries.
Paste the prompt below into Claude Code, Cursor, Codex or any other AI coding assistant. It will read the Stables docs, review your codebase, and help you get started with your integration.
# Stables API — AI Agent Integration Prompt
I'm integrating the **Stables API** into this project. Stables is a developer platform for stablecoin-backed payments — you create customers, give them payment routes, and move money in and out via transfers.
## Features
- **Customers.** The Customers API is how you register your end users with Stables and submit them for verification. A customer must be created and verified before any payment routes can be opened or transfers can be made on their behalf. Customers come in two types and the required information differs between them: *individuals* (people) and *businesses* (companies, with associated beneficial owners and directors). Follow the individuals or businesses compliance docs as appropriate.
- **Payment routes.** Stables Payment Routes provide your customers with dedicated, reusable fiat deposit details that automatically convert incoming funds into stablecoins and credit them to a specified wallet. Each payment route is tied to a single fiat currency, and a customer can have one or more depending on which currencies they need to receive in.
- **Transfers.** A transfer is the instruction to move money — between Stables customers, out to an external bank account, or onto a blockchain address. Transfers are async: you submit the instruction, then Stables processes it through the relevant rail and emits webhook events as the status changes (pending → processing → completed / failed). Rely on webhooks for the terminal state.
## What I want you to do
1. **Ask which payments I want to enable first.** Customers are always required, but the payments features are optional — ask me which of them I actually want wired up (payment routes, transfers, both, plus webhooks) and scope the rest of the work to that.
2. **Read the docs.** Start at the developer platform overview and read enough of it to understand auth, environments, and the features I picked before writing any code.
3. **Connect to the hosted Stables MCP server if you support MCP.** The endpoint is https://mcp.stables.money/mcp and it authenticates with my sandbox API key as a bearer token (Authorization: Bearer sti_test_...). Use it to explore the API and to test calls against the sandbox as you build. Never use a live key (sti_live_...) without asking me first; it moves real money.
4. **Review this codebase's stack** — framework, frontend/backend split, language, auth flow, how secrets are loaded, and any existing payments or webhook plumbing. Decide where the Stables integration fits and whether you need to add a backend layer (Stables calls must run server-side).
5. **Implement in order.** Always do customers first, then any payments features (payment routes, transfers) — payments depend on a verified customer existing.
6. **Wire up webhooks** for the resources you implemented so state changes flow back into the app.
7. **When done, summarise** what you built, what's still ambiguous, and what I need to do manually (credentials, env vars, registering the webhook URL).
**Ask clarifying questions** before coding if anything about the stack or where Stables fits in the user lifecycle is unclear.
---
## References
- Full docs - https://docs.stables.money/llms-full.txt
- Hosted MCP server - https://mcp.stables.money/mcp (sign in, or bearer token: your sandbox API key)
- AI agents - https://docs.stables.money/get-started/getting-started/quickstart/building-with-ai/ai-agents
- Agent safety - https://docs.stables.money/get-started/getting-started/quickstart/building-with-ai/agent-safety
- MCP - https://docs.stables.money/get-started/getting-started/quickstart/building-with-ai/mcp
- Developer platform overview — https://docs.stables.money/developer-platform/llms-full.txt
- Customer compliance — individuals — https://docs.stables.money/developer-platform/customer/compliance/individuals/llms-full.txt
- Customer compliance — businesses — https://docs.stables.money/developer-platform/customer/compliance/business/llms-full.txt
- Payment routes — https://docs.stables.money/developer-platform/payments/virtual-accounts/llms-full.txt
- Transfers — https://docs.stables.money/developer-platform/payments/transfers/llms-full.txt