Web3 Authentication

Start Build or Pro access via x402 USDC payment

x402-protected endpoint for purchasing 30-day Build or Pro access with USDC on Base. Unknown wallets receive an account and API key only after successful payment settlement. Existing disabled wallets are rejected before facilitator verification or settlement.

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 and settles payment via the facilitator → grants access → returns API key

No API key required. Payment establishes paid wallet access.

post/v1/web3/subscribe

Request

  • Base URL: https://api.0xarchive.io
  • URL: https://api.0xarchive.io/v1/web3/subscribe
  • Auth: none required

Headers

payment-signaturestring

Base64-encoded x402 v2 payment payload containing the EIP-3009 signed USDC transfer authorization. Omit on first request to receive payment details.

Request body

tier'build' | 'pro' required

Subscription tier to purchase

Example request

{
  "tier": "build"
}

Response

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

api_keystring

The generated API key for the new subscription

tierstring

The subscription tier activated

expires_atstring date-time

Subscription expiration date (30 days from purchase)

wallet_addressstring

The wallet address associated with the subscription

tx_hashstring nullable

On-chain transaction hash for the USDC transfer (if settled)

Example response

{
  "api_key": "0xa_...",
  "tier": "build"
}

Changes

No recorded changes to this operation across all 1 revision of this API.