x402 payment gateway

Wrap any API.
Charge perrequestcall.

Ax402 sits between your upstream and the internet. Configure routes, prices, and domains — the protocol handles payment challenges and on-chain settlement.

Explore gateway wrap, SDK integration, CLI, MCP, and plugins.

gateway.your-api.comlive
GET/v1/data
402Payment Required
{
  "accepts": [{
    "scheme": "exact",
    "network": "base-sepolia",
    "amount": "1000"
  }]
}
buyer pays
200OK — upstream proxied

X-Payment-Verified: true

Endpoint

/v1/data

Price

0.001 USDC

Integration

Two ways to ship paid APIs

Most sellers start with gateway wrap. Teams building custom products or agent workflows use the SDK, CLI, or MCP server alongside — or instead of — the hosted gateway.

Path A

Wrap your API

Point Ax402 at an existing upstream URL. Buyers hit your gateway hostname, pay via x402, and traffic is proxied with verified credentials. No code changes to your API.

  • Dashboard onboarding
  • Custom domains + DNS
  • OpenAPI import
Gateway wrap guide
Path B

Integrate the SDK

Keep your app and add x402 in-process — issue payment requirements, verify settlements, and automate the control plane from TypeScript, Go, or Python.

  • Control-plane CRUD
  • CLI + MCP for agents
  • Buyer client for paying URLs
SDK integration guide

Full index: documentation hub

Workflow

From upstream URL to paid API

01

Register your upstream

Add your API base URL, optional upstream auth, and a default subdomain on the Ax402 platform.

02

Price each route

Define endpoints, HTTP methods, and x402 accept options — scheme, network, asset, and amount per call.

03

Publish the gateway

Verify a custom domain or use the provided subdomain. Traffic hits the gateway, not your origin directly.

04

Buyers pay, you serve

Unpaid requests get HTTP 402 with payment requirements. After settlement, the gateway proxies to upstream.

Capabilities

Everything in one control plane

Route-level pricing

Attach x402 accept options to individual endpoints. Mix free health checks with paid data routes on the same API.

Endpoints

GET/health
Free
GET/v1/data
0.001 USDC
POST/v1/query
0.005 USDC

Per-route x402 accept options on one API

Custom domains

Use the platform subdomain or bring your own hostname. DNS TXT verification keeps ownership clear.

Platform subdomain

myapi.ax402.io

active

Custom domain

api.yourcompany.com

TXTax402-verify=8f3k…verified

Upstream credentials

Store bearer tokens and API keys encrypted. The gateway injects auth on proxied requests — buyers never see your secrets.

Buyer request

GET /v1/data

Authorization: —

inject

Upstream

GET /data

X-API-Key: ••••••••

Encrypted at rest — never exposed to buyers

OpenAPI import

Upload a spec to bulk-create endpoints instead of configuring each path by hand.

openapi.yaml

paths:
  /users:
    get: ...
  /reports:
    post: ...
GET /usersimported
POST /reportsimported
GET /healthimported

Scoped API keys

Automate with SDK or CLI using keys limited to the scopes you choose — read stats, write endpoints, manage domains.

API key

ax402_live_7xK…m2P

Preset: apiManager

apis:readendpoints:writedomains:readstats:read

Least-privilege automation for SDK, CLI, and MCP

Settlement visibility

Track 402 challenges, paid requests, and on-chain settlements per API from the control plane dashboard.

402 issued

1,284

Paid

892

Settled

887

Last 30 days · base-sepolia

Ready to monetize your API?

Create a seller account, verify your email, and publish your first wrapped endpoint in minutes.

Create free account