Quote a payment
quotePrices a payment of a given USD amount in a chosen token, returning the cost so agents can preview x402 API charges before paying.
Instructions
Prices a payment of a given USD amount in a given token (default: the configured pay-with token, or USDG).
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": {
"usd": "<usd>"
},
"name": "quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| usd | Yes | Amount the API should receive, in dollars, e.g. "0.05" | |
| token | No | Token to pay with (0x…). Omit for the default. |