verify_receipt
Checks a seller’s signed x402 receipt for signature validity and, when provided, verifies signer, request, response hash, and on-chain settlement without signing or paying.
Instructions
Read only. Check a seller's signed x402 receipt (the X-Agent402-Receipt header value) for anyone holding one: the signature always; and, when given, the signer (expectedSigner, or the key the seller publishes at sellerUrl GET /), the request (method, url, requestBody), the response body (responseBody or responseBodySha256), and the settlement transaction on chain (when an RPC is configured). Says what was not checked. Never signs or pays.
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": {
"receipt": "<receipt>"
},
"name": "verify_receipt"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | URL of the paid request, to check it is the one the receipt covers. | |
| method | No | HTTP method of the paid request, to check it is the one the receipt covers. | |
| receipt | Yes | The X-Agent402-Receipt header value, as received. | |
| sellerUrl | No | https URL of the seller; its published receipt key is read from GET / on that origin. | |
| requestBody | No | Body of the paid request, to check its hash. | |
| responseBody | No | Body of the paid response, to check its hash. | |
| expectedSigner | No | Seller receipt signing key (base58) you expect. | |
| responseBodySha256 | No | SHA-256 (hex) of the paid response body, instead of responseBody. |