Settlement & Receipt Binding

After the client executes the route (swap + pay), the x402 payment receipt (the header the client sends on retry) MUST embed the AAR binding:

{
  "receipt": {
    "type": "x402-aar/v0.1",
    "offerId": "0xabc123...",
    "quoteId": "0xdef456...",
    "chain": "base",
    "asset": "0xa0b86991...",
    "amountOut": "2500",
    "payTo": "0xMerchantTreasuryOrSplitter",
    "txHash": "0x...",
    "blockNumber": 12345678,
    "settlementProof": "0x...", 
    "payer": "0xBuyerAddress"
  }
}

The merchant’s verifier checks on‑chain (or via a trusted light client/facilitator) that:

  1. txHash effects match asset, amountOut, and payTo.

  2. Event logs (or calldata) link back to the facilitator’s quote (e.g., quoteId emitted).

  3. amountOut ≥ constraints.minOut if provided.

  4. deadlineTs not violated; slippage within bounds.

Last updated