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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount_usd": "<amount_usd>"
},
"name": "purchase_credits"
}
}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 | |||