Save a card, once
A person has to do this step: the agent asks for a link and hands it over.Buy a pack
idempotencyKey to retry the same purchase: it is charged at most once, even days later. A different pack under a used key is refused (409 idempotency_key_reused). Leave the key out and the SDK makes one per call.
Check the balance
When a purchase is refused
Nothing is charged in any of these.
If Stripe doesn’t answer, you get
503 payment_status_unknown with the idempotency_key to retry with: the card may have been charged, and retrying with that key never charges twice.
From an AI agent
The Rial MCP server exposes the same flow as tools:get_credit_balance, buy_credits and setup_credit_payment_method. buy_credits is marked as spending, so clients like ChatGPT ask before charging.