x402 Payment Preflight Decision
x402_payment_preflight_decisionOffline, read-only preflight check of an x402 v2 PAYMENT-REQUIRED against declared intent before paying. No network calls, signing, settlement, or execution. Returns deterministic PAY (consistent), REVIEW (material change vs previous_snapshot), or DO_NOT_PAY (intent mismatch). USE WHEN: verifying x402 payment requirements before payment. DO NOT USE WHEN: executing, signing, settling, checking balances, or assessing safety. PAY means consistency only, not a safety guarantee.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"intent": {
"seller": "STRAELO",
"service": "Straelo Relay",
"resource": "https://relay.straelo.com/x402-payment-preflight-decision",
"expected_amount": "0.005",
"amount_tolerance": "0"
},
"payment_required": {
"accepts": [
{
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0x267ead21c0a5c1bf7e44cb357641556edc52d232",
"amount": "5000",
"scheme": "exact",
"network": "eip155:8453"
}
],
"resource": {
"url": "https://relay.straelo.com/x402-payment-preflight-decision",
"serviceName": "Straelo Relay"
},
"x402Version": 2
}
},
"name": "x402_payment_preflight_decision"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| intent | Yes | Buyer-declared payment policy: expected seller label, service, resource URL, and optional payment constraints (asset, network, destination, amount, tolerance) used to evaluate consistency against the observed x402 challenge. | |
| payment_required | Yes | Observed x402 v2 PAYMENT-REQUIRED challenge decoded as JSON. | |
| previous_snapshot | No | Optional prior snapshot for stateless material-change detection against a prior result. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| changes | Yes | Material changes between current result and previous_snapshot; any change drives REVIEW when no mismatch exists. | |
| matched | Yes | Intent fields that matched the observed x402 payment requirement. | |
| coverage | Yes | Scope of the offline comparison: what is and is not evaluated by this preflight. | |
| decision | Yes | Deterministic preflight payment decision: PAY when intent matches the observed requirement and no material change; REVIEW when consistent but materially changed from previous_snapshot; DO_NOT_PAY when any intent field mismatches the observed requirement. | |
| evidence | Yes | Derived solely from the supplied intent and payment_required; contains the parsed payment requirement, seller label, and resource domain. | |
| snapshot | Yes | Reusable stateless comparison state for detecting material changes on a subsequent call. | |
| assessment | Yes | Consistency decision only; never a safety rating. | |
| mismatched | Yes | Intent fields that mismatched the observed x402 payment requirement; any mismatch drives DO_NOT_PAY. | |
| reason_codes | Yes | Machine-readable codes explaining the decision; mismatch codes when DO_NOT_PAY, change codes when REVIEW. | |
| checks_skipped | Yes | Checks skipped because the corresponding expected field was not declared in intent. | |
| external_calls | Yes | Always empty in this offline MVP. | |
| checks_performed | Yes | Consistency checks actually executed for this request. | |
| payment_fingerprint | Yes | SHA-256 of canonical material payment fields. |