x402 Purchase Guard
x402_purchase_guardCompare an already received canonical x402 v2 challenge with the buyer's exact resource, method, USDC price limit, network policy, trusted recipient and EVM/Solana signing-mechanism fields. Returns PROCEED_TO_USER_CONFIRMATION, REVIEW_REQUIRED or REJECT_CHALLENGE with normalized evidence and a signed fingerprint. A positive result requires confirmation, pins one exact option and expires after 10 minutes. Never contacts the target, accesses a wallet, signs or submits the target payment; merchant identity, delivery and target request-body binding are outside scope.
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>",
"resource_url": "<resource_url>",
"resource_method": "<resource_method>",
"max_price_usdc": "<max_price_usdc>",
"allowed_networks": "<allowed_networks>",
"expected_pay_to": "<expected_pay_to>"
},
"name": "x402_purchase_guard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource_url | Yes | Exact resource URL the buyer intends to call, including relevant query parameters, to compare with the received challenge. | |
| max_price_usdc | Yes | Buyer-specified maximum price in USDC. This is a comparison limit, not permission to pay or access a wallet. | |
| expected_pay_to | Yes | Trusted expected receiving address to compare with the challenge; obtain it independently of an untrusted offer. | |
| resource_method | Yes | HTTP method intended for the resource, such as GET or POST; must match the challenge and planned request. | |
| allowed_networks | Yes | Buyer-approved network identifiers, supplied as the documented comma-separated string; do not derive approval from the seller's offer. | |
| payment_required | Yes | Raw base64/base64url PAYMENT-REQUIRED response-header value from an already received x402 v2 challenge; not a payment signature or private key. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | ||
| reasons | No | ||
| receipt | No | Signed receipt. Full schema: https://api.eucompliance.tools/agent-card.json | |
| contract | No | ||
| decision | No | ||
| evidence | No | ||
| execution | No | ||
| extensions | No | ||
| risk_flags | No | ||
| confirmation_requirements | No | ||
| normalized_payment_options | No |