user_id, read the number at the checkout, and close the card when it’s done.
To let your agent create cards itself, see the MCP server.
Your credential decides the mode: sandbox credentials issue test cards no real merchant accepts, production credentials issue real ones.
The user has to be connected first, or created by your company with POST /api/v2/users. In production they also need to pass identity verification.
The card object
The card object never carries the number or CVC. Read the credentials for those.
Fund a card
Your company’s funding setting decides where the money comes from. It applies to every card and can’t be set per card, so sendingfunds_source answers 400 funds_source_not_supported. GET /api/v2/company_wallet returns it as default_funds_source.
Check what your company can spend with the company wallet. Fund a user’s own balance with
POST /api/v2/wallet/fund. Sandbox company-funded cards skip identity verification, so test the kyc_required answer in production.
Use your company’s token
Every endpoint here takes your platform token and names the user withuser_id. A user’s connection token is refused:
Retry safely
Send anIdempotency-Key on every create. A retry with the same key collects the same card and spends once. In sandbox, a card funded from a user’s balance ignores the key, so each retry creates another test card.
A company-funded card can take up to a minute to fund. Past that, the create answers 202 with funding_in_progress. Wait retry_after_seconds, then send the same request with the same key to collect the card. After a timeout, retry with the same key too, so you never issue a second card.