Paying and running out of units · FAQ
My AI agent says payment is required or I'm out of units. What do I do?
On the self-serve platform, a payment error carries a payment link: a person opens it and pays, or waits for a usage window to refill, then the agent retries.
- Units ran out: REST answers
402 payment_requiredwith anupgrade_urland aLinkheader withrel="payment"; a platform MCP server answers a payment error with the same link (error page). - An Agent usage window is used up and no credits remain: REST answers
429 usage_limit_reachedwith the refill time, aRetry-Afterheader and anupgrade_urlto buy credits; MCP answers a payment error with the same members. - The spending cap is reached:
402 payment_requiredwith the reasonspending_cap_reached, until the period ends or the cap is raised.
Once a person has paid, the agent polls GET /v1/account/payment-links/{id} about every 5 seconds until the status is completed, then retries.
The agent cannot pay by itself (can an agent pay?); credits top up automatically only if a person turned on auto top-up. Whether an assistant must reconnect after paying is not published. See handling a 402 and credits.
On the Casafari MCP server, Request limit reached for this product. is different: see quota versus units.