inspect_payment_response
Decode and validate an x402 PAYMENT-RESPONSE, surfacing success, payer, network, and amount, and optionally recompute on-chain balance changes to confirm payTo equals the advertised amount.
Instructions
Decode and validate an x402 PAYMENT-RESPONSE, surfacing success, settlement id, payer, network, and amount. Optionally recomputes the on-chain truth: pass rpcUrl + expectedPayTo for a sui:* network (queries sui_getTransactionBlock balanceChanges), or observedBalanceChanges + expectedPayTo for any chain, and it confirms the net balance change to payTo equals the advertised atomic amount (the "recomputed, not trust-the-operator" check). Provide the response via raw (JSON/base64) or json.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "inspect_payment_response"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | PAYMENT-RESPONSE as a JSON string or base64-encoded JSON. | |
| json | No | PAYMENT-RESPONSE as an object. | |
| rpcUrl | No | Optional. Chain RPC URL; used for the on-chain net-balance check on sui:* networks. | |
| expectedAsset | No | Optional. Asset/coin type to filter on (defaults to 0x2::sui::SUI for Sui). | |
| expectedPayTo | No | Optional. The recipient address to sum net balance change for. | |
| expectedAmount | No | Optional. Expected atomic amount; defaults to the response amount. | |
| observedBalanceChanges | No | Optional. A balanceChanges array (any chain) to recompute net-to-payTo from, instead of an RPC call. |