Prepare x402 Purchase Guard (free)
prepare_x402_purchase_guardFREE strict syntax and supported-v2-shape check for a raw base64/base64url PAYMENT-REQUIRED header. Returns a canonical challenge fingerprint and the policy fields required by the paid guard, without revealing the paid decision, contacting the target, reading a wallet or attempting payment.
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": {
"payment_required": "<payment_required>"
},
"name": "prepare_x402_purchase_guard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payment_required | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | No | ||
| error | No | ||
| price | No | No payment is required for this tool. | |
| charged | No | ||
| message | No | ||
| missing | No | ||
| settled | No | When present on an error, false means no settlement occurred. | |
| unknown | No | ||
| accepted | No | ||
| contract | No | ||
| paid_tool | No | ||
| retryable | No | ||
| error_code | No | ||
| status_code | No | ||
| did_you_mean | No | ||
| ready_to_buy | No | ||
| missing_checks | No | ||
| required_policy | No | ||
| wallet_accessed | No | ||
| challenge_sha256 | No | ||
| partial_evidence | No | ||
| challenge_hash_basis | No | ||
| target_network_called | No | ||
| ready_for_paid_analysis | No | ||
| target_payment_attempted | No |