Skip to main content

xenarch_check_gate

Check if a URL or domain has an x402 payment gate. Input:
ParameterTypeDescription
urlstringURL or domain to check. Accepts https://example.com/article or example.com.
Output (gated):
{
  "gated": true,
  "gate_id": "7f3a1b2c-9d4e-4a8b-b6f1-2c3d4e5f6a7b",
  "price_usd": "0.003",
  "splitter": "0xC6D3a6B6fcCD6319432CDB72819cf317E88662ae",
  "collector": "0xabc123...publisher_wallet",
  "network": "base",
  "asset": "USDC",
  "protocol": "x402"
}
Output (not gated):
{
  "gated": false,
  "message": "No Xenarch gate found for example.com"
}

xenarch_pay

Execute a USDC micropayment on Base L2 to access gated content. Input:
ParameterTypeRequiredDescription
urlstringYesURL or domain to pay for. Must have an active gate.
amountstringNoOverride amount in USD (e.g., "0.01"). Defaults to gate price.
Output:
{
  "success": true,
  "tx_hash": "0xdef456...abc789",
  "block_number": 28451023,
  "amount_usd": "0.003",
  "url": "example.com",
  "access_token": "eyJhbGciOiJIUzI1NiJ9...",
  "expires_at": "2026-04-10T15:05:00Z",
  "wallet": "0x123...your_wallet"
}
Flow:
  1. Checks for active gate (calls xenarch_check_gate internally)
  2. Verifies USDC balance
  3. Approves USDC on the splitter contract
  4. Calls split(collector, amount) on-chain
  5. Submits tx hash to the verify endpoint
  6. Returns access token

xenarch_get_history

List past USDC micropayments made by this wallet. Input:
ParameterTypeRequiredDescription
domainstringNoFilter by domain (e.g., "example.com"). Omit for all.
limitnumberNoMax records (1-100, default 10).
Output:
{
  "payments": [
    {
      "domain": "example.com",
      "amount_usd": "0.003",
      "tx_hash": "0xdef456...abc789",
      "paid_at": "2026-04-10T14:35:00Z"
    }
  ],
  "total_spent_usd": "0.003000",
  "count": 1,
  "wallet": "0x123...your_wallet"
}