x402 Requirement Drift Diff

Detects changes to the scheme, network, asset, atomic amount, receiver, resource, or advertised extensions in two caller-supplied requirements. It performs no payment, signature, or network operation.

Use when

  • An agent must compare x402 terms before retrying a payment.
  • A seller response may have changed its amount, receiver, network, or resource.

Do not use when

  • A payment must be signed, verified, settled, or transferred.
  • Either requirement cannot be normalized into the published schema.

Invocation contract

HTTP
/v1/tools/x402-requirement-drift-diff
Version
0.1.0
Mode
lookup
Idempotency
not required
Retention
Both normalized requirement snapshots are compared in memory and are not retained.
Tested with
x402 v2 requirement snapshots, CAIP-2 networks

Positive and negative examples

{
  "input": {
    "before": {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "USDC",
      "amount_atomic": "1000",
      "pay_to": "0x1111111111111111111111111111111111111111",
      "resource": "https://api.example.invalid/job",
      "extensions": [
        "payment-identifier"
      ]
    },
    "after": {
      "scheme": "exact",
      "network": "eip155:8453",
      "asset": "USDC",
      "amount_atomic": "2000",
      "pay_to": "0x1111111111111111111111111111111111111111",
      "resource": "https://api.example.invalid/job",
      "extensions": [
        "payment-identifier"
      ]
    }
  },
  "output": {
    "changed": true,
    "changed_fields": [
      "amount_atomic"
    ],
    "before_fingerprint": "sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "after_fingerprint": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "commercial_terms_changed": true,
    "retry_binding_changed": false
  },
  "negative": [
    {
      "scenario": "A payment must be signed, verified, settled, or transferred.",
      "expected_error": "INVALID_INPUT",
      "charged": false
    }
  ]
}

Deterministic errors

CodeRetryChargedRecovery
INVALID_INPUTfalsefalseCorrect the request to match input_schema.
TOOL_PAUSEDtruefalseWait for the operator to resume the tool.
RATE_LIMITEDtruefalseRetry after the response Retry-After interval.
DEPENDENCY_UNAVAILABLEtruefalseRetry with the same idempotency identity.

Full machine manifest

The HTTP, OpenAPI, MCP, llms.txt, and ARD descriptions are generated from this same registry record.

Open JSON manifest →