# Avasis x402 Authorization Check (Base)

> Avasis x402 Authorization Check (Base) is a paid API for AI agents from agents.avasis.ai, paid per call via x402, $0.02/call, status down (last checked 2026-11-24).

Validates an EIP-3009 x402 payment authorization on Base (chain 8453) before signing, checking quote fields, nonce, expiry, domain separator, token authenticity, and payer balance.

## Facts

- Endpoint: GET https://agents.avasis.ai/v1/base/authorization-check?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: down
- Last checked: 2026-11-24
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/avasis-x402-authorization-check-base-d63f77cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0LaVXoZscVLtnMXVNITyj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability avasis-x402-authorization-check-base-d63f77cd
```

Example prompt: Before I sign this x402 payment, can you check whether this EIP-3009 authorization is safe? The payer is 0xABC...123, recipient (payTo) is 0x6264191d6dd5427435b5e829077842e130ef1fc8, value is 20000, nonce is 0xDEAD...BEEF, validBefore is 1750000000, and the quote says payTo 0x6264191d6dd5427435b5e829077842e130ef1fc8, amount 20000, asset 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913, network base.

## When to prefer this

Use this endpoint whenever an AI agent or wallet is about to sign an EIP-3009 (TransferWithAuthorization / ReceiveWithAuthorization) as part of an x402 payment flow on Base, and needs an independent pre-signing safety check. It is specifically designed for the x402 HTTP payment protocol, checking all the fields an attacker could manipulate (payTo, amount, asset, network, nonce, expiry, domain separator, look-alike tokens). Prefer this over manual field comparison when the agent cannot independently verify on-chain state like DOMAIN_SEPARATOR, nonce usage, or USDC canonicality.

## Known failure modes

- Missing required fields (from, to, value, validBefore, nonce) returns 4xx — not charged
- Malformed hex addresses or values return validation error — not charged
- RPC call to Base fails: reads.rpc error, partial results returned
- Token contract is not deployed: is_contract false, verdict likely BLOCK
- validBefore already passed: verdict BLOCK with expiry reason
- Nonce already used on-chain: verdict BLOCK with nonce reason
- payTo mismatch with quote: verdict BLOCK
- Non-canonical USDC detected: verdict CAUTION or BLOCK
- Insufficient payer balance: check fails, included in reasons
- 5xx server errors — not charged

## How this service works

x402 authorization check on Base (chain 8453, $0.02): the EIP-3009 authorization you will sign (from, to, value, validAfter, validBefore, nonce) + its 402 quote (payTo, amount, asset, network) -> SIGN/CAUTION/BLOCK: payTo / amount / asset / chain match, nonce unused, not expired, EIP-712 domain verified on-chain, look-alike USDC, balance, decoy >= $1, the digest you sign. Phrases: should I sign this, x402 authorization check, eip-3009, decoy quote. GET or POST JSON. Never charged on 4xx/5xx.

## Output

A JSON object with a verdict field (SIGN/CAUTION/BLOCK), a headline summary, per-field match results (payTo, amount, asset, network), nonce usage status, expiry validity, EIP-712 domain separator match against on-chain data, canonical USDC confirmation, payer balance coverage, and the EIP-712 struct hash and digest the wallet will actually sign.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "from",
      "to",
      "value",
      "validBefore",
      "nonce"
     ],
     "properties": {
      "to": {
       "type": "string",
       "description": "the recipient (authorization.to; must equal the quote's payTo) (0x + 40 hex)"
      },
      "from": {
       "type": "string",
       "description": "the payer: the wallet that signs (authorization.from) (0x + 40 hex)"
      },
      "asset": {
       "type": "string",
       "description": "the quote's accepts[].asset (token contract)"
      },
      "chain": {
       "type": "string",
       "description": "optional; must be base / 8453 on this route"
      },
      "nonce": {
       "type": "string",
       "description": "authorization.nonce: 32 random bytes (0x + 64 hex), one per payment"
      },
      "payTo": {
       "type": "string",
       "description": "the quote's accepts[].payTo: sets matches.pay_to (BLOCK on mismatch)"
      },
      "value": {
       "type": "string",
       "description": "authorization.value in atomic units (USDC has 6 decimals: 20000 = $0.02)"
      },
      "amount": {
       "type": "string",
       "description": "the quote's accepts[].amount (v2) / maxAmountRequired (v1), atomic units: sets matches.amount"
      },
      "network": {
       "type": "string",
       "description": "the quote's accepts[].network: base / eip155:8453 or ethereum / eip155:1"
      },
      "domainName": {
       "type": "string",
       "description": "optional domain.name of the typed data (checked against the token's on-chain DOMAIN_SEPARATOR)"
      },
      "maxTimeout": {
       "type": "integer",
       "minimum": 1,
       "description": "the quote's accepts[].maxTimeoutSeconds: flags a validBefore longer than the seller asked for"
      },
      "validAfter": {
       "type": "string",
       "description": "authorization.validAfter, unix seconds (default 0)"
      },
      "primaryType": {
       "type": "string",
       "description": "TransferWithAuthorization or ReceiveWithAuthorization (default TransferWithAuthorization, the x402 ex
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "kind": "authorization-check",
  "rail": "x402-authorization-check-1",
  "chain": "base",
  "payer": {
   "sufficient": true,
   "balance_raw": "16718740",
   "balance_units": "16.71874"
  },
  "quote": {
   "asset": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
   "given": true,
   "pay_to": "0x6264191d6dd5427435b5e829077842e130ef1fc8",
   "matches": {
    "asset": true,
    "amount": true,
    "pay_to": true,
    "network": true
   },
   "network": "base",
   "amount_raw": "20000",
   "max_timeout_s": 120
  },
  "reads": {
   "rpc": "fixture",
   "calls": 10,
   "elapsed_ms": 5
  },
  "token": {
   "name": "USD Coin",
   "symbol": "USDC",
   "address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
   "version": "2",
   "decimals": 6,
   "is_contract": true,
   "canonical_usdc": true,
   "domain_separator_onchain": "0x02fa7265e7c5d81118673727957699e4d68f74cd74b7db77da710fe8a2c7834f"
  },
  "digest": {
   "note": "eip712_digest = keccak256(0x1901 || domainSeparator || structHash): what eth_signTypedData_v4 signs; compare it with your wallet's prompt",
   "struct_hash": "0x242f86ef909386979cd3fc1238cf25ad012e338444e5917a2f4dd32c1e1f829a",
   "eip712_digest": "0xa5eb1a2bb1b6283c2e0b10f6fe4e68449fb7b157ae8956dc5fd00e35cfdcb420"
  },
  "domain": {
   "name": "USD Coin",
   "version": "2",
   "chain_id": 8453,
   "expected": {
    "name": "USD Coin",
    "version": "2",
    "chain_id": 8453,
    "separator": "0x02fa7265e7c5d81118673727957699e4d68f74cd74b7db77da710fe8a2c7834f"
   },
   "matches_onchain": true,
   "separator_computed": "0x02fa7265e7c5d81118673727957699e4d68f74cd74b7db77da710fe8a2c7834f",
   "verifying_contract": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
  },
  "pay_to": {
   "address": "0x6264191d6dd5427435b5e829077842e130ef1fc8",
   "is_contract": false
  },
  "verdict": {
   "sign": true,
   "level": "SIGN",
   "reasons": [],
   "checks_ok": [
    "payTo matches",
    "amount matches",
    "asset matches",
    "network base matches",
    "nonce unused",
    "valid for 110 s",
    "domain separator verified on-chain",
    "canonical USDC",
    "balance 16.71874 covers 0.02"
   ]
  },
  "chain_id": 8453,
  "headline": "SIGN on Base: payTo matches, amount matches, asset matches, network base matches, nonce unused, valid for 110 s, domain separator verified on-chain, canonical USDC, balance 16.71874 covers 0.02",
  "typed_data": {
   "types": {
    "EIP712Domain": [
     {
      "name": "name",
      "type": "s
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/avasis-x402-authorization-check-base-d63f77cd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agents.avasis.ai](https://www.zero.xyz/host/agents.avasis.ai/llms.txt)
