Buy prepaid ad credit
buy_ad_creditBuys prepaid ad credit at a fixed price: amount_usd in USDC, 1 USDC = $1.00 of credit (for example 5, 10, 25, 50, 100). The first call returns isError with the x402 PaymentRequired object; call again with the signed payment. Without an API key the paid result carries api_key: the key of a new account whose balance is the credit, shown once. With an API key the credit is added to that account. Orders placed with the key are then paid from the balance, with no further payment.
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": "buy_ad_credit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | The API key of the account (can_live_...). Optional when this MCP connection sends it as the Authorization: Bearer header. | |
| amount_usd | Yes | Whole dollars ("25") or two decimals ("25.00"). | |
| idempotency_key | No | Only to REPEAT an earlier call of this tool (a lost answer, a payment still confirming): the idempotency_key that call returned. Leave it out for a new call; the server then makes a random one and returns it. | |
| payment_signature | No | The x402 PaymentPayload for the requirement an earlier call of this tool returned, as base64-encoded JSON (the value of an HTTP PAYMENT-SIGNATURE header). An x402-aware MCP client sends the payload in _meta["x402/payment"] instead and leaves this out. |