Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.0xarchive.io/llms.txt

Use this file to discover all available pages before exploring further.

Source OpenAPI: 0xArchive API 1.5.0; 116 paths; 90 component schemas. x402-protected endpoint for purchasing Build or Pro subscriptions with USDC on Base. Flow: 1. POST with { "tier": "build" } (no payment header) → Server returns 402 with payment details (amount, pay_to address, network) 2. Sign an EIP-712 TransferWithAuthorization (EIP-3009) on USDC Base for the specified amount 3. Build x402 v2 payment payload, base64-encode it, and retry with payment-signature header 4. Server verifies payment via facilitator → creates subscription → returns API key No API key required. Payment IS the authentication.

Route Metadata

FieldValue
MethodPOST
Path/v1/web3/subscribe
operationIdweb3Subscribe
TagWeb3 Authentication
FamilyWeb3 Auth
Deprecated or legacyno

Request Parameters

Header Parameters

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "web3Subscribe header parameters",
  "type": "object",
  "properties": {
    "payment-signature": {
      "description": "Base64-encoded x402 v2 payment payload containing the EIP-3009 signed USDC transfer authorization. Omit on first request to receive payment details.",
      "type": "string",
      "x-parameter-location": "header"
    }
  }
}

Request Body

application/json

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "web3Subscribe request body",
  "type": "object",
  "required": [
    "tier"
  ],
  "properties": {
    "tier": {
      "description": "Subscription tier to purchase",
      "type": "string",
      "enum": [
        "build",
        "pro"
      ],
      "example": "build"
    }
  }
}

Response Contracts

Status 200

Subscription created successfully (returned when valid payment-signature header is provided)

application/json

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "web3Subscribe response 200",
  "type": "object",
  "properties": {
    "api_key": {
      "description": "The generated API key for the new subscription",
      "type": "string",
      "example": "0xa_..."
    },
    "expires_at": {
      "description": "Subscription expiration date (30 days from purchase)",
      "type": "string",
      "format": "date-time"
    },
    "tier": {
      "description": "The subscription tier activated",
      "type": "string",
      "example": "build"
    },
    "tx_hash": {
      "description": "On-chain transaction hash for the USDC transfer (if settled)",
      "type": "string",
      "nullable": true
    },
    "wallet_address": {
      "description": "The wallet address associated with the subscription",
      "type": "string"
    }
  }
}

Status 402

Payment required. Response includes payment details: amount (micro-USDC), pay_to address, and network. Sign and retry with payment-signature header.

application/json

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "web3Subscribe response 402",
  "type": "object",
  "properties": {
    "payment": {
      "type": "object",
      "properties": {
        "amount": {
          "description": "Amount in micro-USDC (6 decimals)",
          "type": "string",
          "example": "49000000"
        },
        "network": {
          "description": "Blockchain network",
          "type": "string",
          "example": "base"
        },
        "pay_to": {
          "description": "Treasury address to send USDC to",
          "type": "string",
          "example": "0x..."
        }
      }
    }
  }
}

Status 429

Rate limit exceeded

application/json

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "web3Subscribe response 429",
  "description": "Error response",
  "type": "object",
  "properties": {
    "code": {
      "description": "HTTP status code",
      "type": "integer"
    },
    "error": {
      "description": "Error message",
      "type": "string"
    }
  }
}
OpenAPI example
{
  "code": 429,
  "error": "Rate limit exceeded"
}
Last modified on May 18, 2026