Skip to main content
The attach flow lets a user share a real bank card with their agent. Once the card is attached, every single-use card the agent creates charges the user’s own card directly — no identity verification (KYC) and no balance to fund. That makes this the fastest path to production: if your users already have an eligible card in their pocket, there is nothing else to collect. Eligible cards are US-issued consumer Visa cards and consumer Mastercard cards from any country. Multi-use cards are the one exception to this path — they stay balance-funded, so they need the create card flow instead.

The flow you implement

Three steps, in order. Each page contains a paste-ready instruction block for your coding agent plus the underlying API calls.
1

User authentication

Connect the user to Agentcard from inside your own app. Your backend triggers a one-time code and receives the user’s user_id and connection tokens — no redirects, no hosted sign-in page. Implement user authentication →
2

Card attachment

Your backend asks Agentcard for a secure link; the user opens it and adds their card in about a minute (a one-time code from their bank plus a passkey). The card number is entered on the hosted page only — it never touches your servers. Implement card attachment →
3

MCP server

Point your agent at the Agentcard MCP server with the user’s connection token. The card tools load automatically — the agent creates single-use cards against the attached card with connected_card_id. Wire up the MCP server →

When to use which flow

Use attach when your users can pay with a card they already have — it skips KYC and wallet funding entirely. Use create card when you need balance-funded cards (multi-use cards, spend controlled by a prepaid balance) or when the user’s card isn’t eligible: an ineligible attach returns attach_ineligible, and the agent can switch flows by calling create_card — which may first require KYC and wallet funding. Everything works in test mode first — see Testing cards in staging for eligible test card numbers.