decode_payment_required
verify the recipient. Call this first when a 402 response arrives and you cannot read the payment-required header. Returns the decoded x402 v2 challenge: scheme, network, asset, atomic amount, payee, resource and timeout. Pure decoding: no network call, no signature, no verdict — use evaluate_mcp_payment when you want a decision. Fails closed with a named error if the header is malformed or not base64.
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": {
"header": "<header>"
},
"name": "decode_payment_required"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| header | Yes | The raw base64 value of the payment-required header |