Ax402Docs
PLATFORM

Gateway & dashboard

Hosted gateway, domains, OpenAPI import

Gateway wrap is the fastest path to a paid API. You register an upstream base URL, define priced endpoints, and publish a gateway hostname. Buyers use x402-capable clients; Ax402 verifies payment and proxies to your origin.

Traffic flow

Buyer (x402 client)
    → your-gateway.example.com/v1/resource
    → 402 + payment requirements (unpaid)
    → pay + retry
    → 200 + upstream response (proxied)

Browser visits (educational page)

Opening a priced gateway URL directly in a browser (link, QR code, or address bar) shows a short Ax402-hosted HTML page when the request accepts text/html. The page explains that the URL uses x402 payment, how developers and agents can pay, and links to docs. It does not collect payment in the browser — use buyer SDKs, the React paywall, or your own x402 client.

API clients, scripts, and agents that send Accept: application/json or */* without text/html continue to receive the machine-readable 402 with the PAYMENT-REQUIRED header and JSON body.

For in-browser wallet payment inside your own site, use the React paywall.

Setup checklist

  • Create a seller account and verify email
  • Add an API with upstream base URL and pay-to wallet (optional discovery_guidance / contact email)
  • Create endpoints (method, path pattern, USDC price; optional request/response schemas)
  • Use the default platform subdomain or verify a custom domain
  • Confirm discovery docs: GET /openapi.json and GET /.well-known/x402.json on the gateway host
  • Test with an x402 buyer client against the gateway hostname

When to use gateway wrap

  • You already expose a REST API and want per-request billing
  • You prefer DNS + dashboard configuration over in-app payment code
  • Buyers are agents, scripts, or wallets — not card checkout flows

Buyer clients — how purchasers pay your gateway URLs. API discovery — AgentCash OpenAPI + x402 well-known manifests (public, unpaid). React paywall — in-app overlay for browser wallets; agents pay via buyer SDKs (see agent discovery on the page).

OpenAPI import

Upload OpenAPI 3.x or Swagger 2.0 in the dashboard (or ax402 openapi import) to bulk-create endpoints. Request/response schemas from the spec are persisted when present.

On this page