pay_per_call
Complete a PER-CALL coin payment. After a paid tool returns a 402 with pay_per_call_offers,
pay one offer on-chain from your own wallet, then call this with the 402's endpoint and
request_body, the chosen offer's scheme and payment_id, and your payment txid. The
gateway verifies the payment landed and returns the tool's real result. (Alternative to a
prepaid session — use this when you'd rather pay each call directly in a specific coin.)
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": {
"endpoint": "<endpoint>",
"request_body": "<request_body>",
"scheme": "<scheme>",
"payment_id": "<payment_id>",
"txid": "<txid>"
},
"name": "pay_per_call"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| txid | Yes | ||
| scheme | Yes | ||
| endpoint | Yes | ||
| payment_id | Yes | ||
| request_body | Yes |