purchase_credits
Buy a one-time credit top-up, charging a card on file or falling back to checkout.
Charges the default payment method on file when one exists and returns the new balance. Otherwise returns a secure hosted checkout link so the purchase can complete interactively. Errors clearly when self-service billing is not enabled on this deployment, or when the requested amount falls outside the allowed range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount_usd | Yes | Amount of credits to buy, in whole US dollars. | |
| idempotency_key | No | Optional caller-supplied key that makes a retried purchase request safe to resend without buying credits twice. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||