Skip to main content
Let a user pay for their own cards. You verify their phone once, create a link, and the user pays in their own browser. When your company’s cards are user-funded, the cards you create for that user then draw on that balance. Every endpoint here takes your platform token and names the user with user_id. To fund cards yourself, use the company wallet instead.
In production the user needs a verified identity first, or the request is refused with kyc_required. The response then carries a checkout_url. Send it to the user: Agentcard covers the provider fee, so send the exact amount the user should receive. Learn when the money lands from a fresh read of the funding session. The first funding needs a verified phone. Without one, the request is refused:
Send a phone code, verify it, then send the same request again. In sandbox no one pays. The test money lands right away, checkout_url is null, and the phone code is always 111111.

Cap what leaves a user’s balance

Spend limits are not open to every company yet. Until yours reaches them, all three requests answer:
Ask us to open them for your company. Nothing else about the user’s balance changes while they are closed, and a limit already set on a user keeps holding. Set how much can leave one user’s balance in a single movement, in any 24 hours and in any 30 days:
From then on, Agentcard counts every movement of money out of the user’s balance onto their cards against those limits. Money the user adds is spendable on their cards up to what the limits leave, and nothing beyond it moves. A withdrawal is paid out of money already moved onto their cards, which counted then, so it does not count again. A purchase that is refunded stops counting. Money past a limit waits in their balance and reaches their cards as the 24-hour and 30-day windows free up, so a user who adds $250 under a $100 daily limit can spend $100 today and the rest over the next days. The per-transaction limit is also held by the wallet provider that keeps the user’s balance, which refuses a larger transfer on its own. The daily and monthly limits are held by Agentcard alone, since the wallet provider judges one transfer at a time. Read wallet_provider_policy.status in the response to see whether the provider holds yours yet. Until it does, Agentcard never moves more in one transfer than the provider still allows, and retries every few minutes. The limits sit on the user’s balance, which is shared by every company the user is connected to. When two companies set limits on the same user, the user’s balance obeys the smaller figure of each limit. Each company reads back only its own figures, and stricter_limit_applies tells it whether a smaller one from elsewhere holds. Your limits are removed when the user disconnects from your company.