circle_x402_pay
Pay an x402-priced HTTP endpoint using USDC from a Circle wallet and fetch the response atomically, with a configurable price cap.
Instructions
Pay an x402-priced HTTP endpoint using USDC from a Circle wallet, then return the response body. The server negotiates price, pays atomically, and fetches the content in one step. Use max_price_usdc as a safety cap — the call fails if the endpoint quotes higher.
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": {
"wallet_id": "<wallet_id>",
"endpoint_url": "<endpoint_url>",
"max_price_usdc": "<max_price_usdc>"
},
"name": "circle_x402_pay"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet_id | Yes | Circle wallet ID to pay from | |
| endpoint_url | Yes | The x402-priced HTTP endpoint URL to call | |
| max_price_usdc | Yes | Refuse if the endpoint quotes more than this price in USDC | |
| method | No | HTTP method for the paid request | GET |
| body | No | Request body for POST calls (JSON string) |