purchase
Execute a paid tool by providing a valid x402 payment header. Returns the tool result and a signed receipt with transaction hash. Use this to purchase any paid tool in one atomic call.
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": {
"tool_name": "<tool_name>",
"arguments": "<arguments>",
"x_payment": "<x_payment>"
},
"name": "purchase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | Yes | Arguments for the tool | |
| tool_name | Yes | Name of the paid tool to execute | |
| x_payment | Yes | Base64-encoded x402 payment header (X-PAYMENT) |