DELXCOMMERCE Live contract

API integration engineering · api-integration

x402 Payment Preflight

Evaluate caller-supplied x402 payment requirements before a wallet signs them. Use after receiving HTTP 402 to enforce a maximum USDC amount, allowed networks, exact scheme, recipient presence, and an optional expiry buffer. Returns eligible accepts and explicit blockers for $0.002 USDC via x402 on Base; it never signs, pays, stores, or echoes a payment signature.

x402commercex402-buyer-dxlocal-only

One-command purchase

Run it from an agent.

No account or API key. AgentCash reads the 402 challenge, pays no more than the declared cap, retries the request and returns the result.

npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/payment-preflight -m POST -H 'x-delx-source: product-page' --max-amount 0.002 -b '{"requirements":{"accepts":[{"scheme":"exact","network":"eip155:8453","amount":"1000","payTo":"0x1111111111111111111111111111111111111111","expires":1786272600}]},"max_amount_usdc":0.002,"allowed_networks":["eip155:8453"],"now_epoch_seconds":1786272500}'
InputPOST /api/v1/x402/payment-preflight
{
  "requirements": {
    "accepts": [
      {
        "scheme": "exact",
        "network": "eip155:8453",
        "amount": "1000",
        "payTo": "0x1111111111111111111111111111111111111111",
        "expires": 1786272600
      }
    ]
  },
  "max_amount_usdc": 0.002,
  "allowed_networks": [
    "eip155:8453"
  ],
  "now_epoch_seconds": 1786272500
}
Delivered resultapplication/json
{
  "schema": "delx/util-x402-payment-preflight/v1",
  "approved": true,
  "evaluated_count": 1,
  "eligible_count": 1,
  "selected": {
    "index": 0,
    "scheme": "exact",
    "network": "eip155:8453",
    "amount_usdc": "0.001",
    "pay_to": "0x1111111111111111111111111111111111111111",
    "expiry_status": "ok"
  },
  "evaluations": [
    {
      "index": 0,
      "scheme": "exact",
      "network": "eip155:8453",
      "amount_usdc": "0.001",
      "pay_to_present": true,
      "expiry_status": "ok",
      "blockers": []
    }
  ],
  "policy": {
    "max_amount_usdc": "0.002",
    "allowed_networks": [
      "eip155:8453"
    ],
    "asset_decimals": 6,
    "min_expiry_seconds": 30,
    "expiry_checked": true
  }
}

Machine-readable evidence

Inspect before paying.