Skip to main content

Gateway

The Gateway turns an API you already run into paid, agent-payable x402 endpoints without any code change on your side. You register a service (your upstream API + how to authenticate to it), then add charge endpoints (the routes agents can pay for).

:::tip Where to list your API Open the Gateway dashboard and sign in. Click New service, point it at your API, add endpoints with prices, then toggle Make public to list it in the marketplace. No code changes on your side. :::

Who can use it

Anyone can sign in to the Gateway dashboard and create services. Each account can create up to 5 services, and each service can have up to 50 endpoints. Payments for your services settle to the address you set in Settings (per account), so you receive USDC directly.

How it works

  1. You create a service that points at your upstream base URL and holds your upstream credentials (stored encrypted).
  2. You add charge endpoints, each mapping an incoming path to an upstream path with a price in USDC.
  3. The platform advertises the HTTP 402 challenge, verifies the agent's payment, forwards the call to your upstream with your injected auth, and settles on-chain only when your upstream returns a success.

Because the platform owns verification and settlement, an agent cannot get your data for free by sending a junk payment header. A call is only forwarded after the payment verifies, and payment only settles after your upstream returns a 2xx.

URLs

Each service is reachable at:

https://api.xdcai.tech/x402/connect/<serviceId>/<endpoint-path>

The serviceId looks like gw_1a2b3c... and is shown on the service page next to the x402 label. Your upstream base URL is shown next to the API label.

Enabling and disabling

You can disable a whole service or an individual endpoint from the service page. A disabled service returns 503; a disabled endpoint returns 404. The configuration is kept, so you can re-enable at any time.

Making a service public

Services are private by default (reachable by URL). Toggle Make public on the service page to list it in the public marketplace, where agents discover it through the catalog and the CLI/MCP marketplace_list. Usage (calls + volume) is tracked per endpoint and shown alongside the listing.

Supported networks

Payments settle in USDC on the XDC network. Set your enabled networks in the dashboard Settings.

NetworkChain IDUse
XDC Mainnet50Production - real USDC.
XDC Apothem51Testnet - free test USDC for trying things out.

Fund and receive on the XDC network only. USDC sent to the same address on another chain (e.g. Ethereum) may be lost.

See Service JSON for the exact shape used by the create form and the Import JSON button.