---
title: "Start Build or Pro access via x402 USDC payment"
method: POST
path: "/v1/web3/subscribe"
tags: ["Web3 Authentication"]
---

# Start Build or Pro access via x402 USDC payment

`POST /v1/web3/subscribe`

## Request

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

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.

## Headers

- `payment-signature` string

## Request body

- Web3SubscribeRequest
  - `tier` 'build' | 'pro', required: Subscription tier to purchase

## Response `200`

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

- Web3SubscribeResponse
  - `api_key` string: The generated API key for the new subscription
  - `tier` string: The subscription tier activated
  - `expires_at` string, date-time: Subscription expiration date (30 days from purchase)
  - `wallet_address` string: The wallet address associated with the subscription
  - `tx_hash` string, nullable: On-chain transaction hash for the USDC transfer (if settled)

## Other responses

- `402`: Payment required. Response includes payment details: amount (micro-USDC), pay_to address, and network. Sign and retry with payment-signature header.
- `403`: The existing wallet account is disabled. No facilitator verification or settlement is attempted.
- `429`: Rate limit, concurrency limit or monthly credits exceeded. See `error_code`.
- `default`: Any other error. The body is an `ErrorResponse`; branch on `error_code`. A 503 (`upstream_unavailable`) carries `Retry-After`.

---

[API](https://skmtc.dev/0xarchive/apis/0xarchive-api-2.md) · [All operations](https://skmtc.dev/0xarchive/apis/0xarchive-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/0xarchive/apis/0xarchive-api-2/revisions/27076f55595f?raw)
