GETTING STARTED
SDK integration
Control plane and buyer clients in your codebase
Use Ax402 SDKs when you need programmatic control — CI pipelines, custom admin UIs, agent workflows, or in-process buyer logic. Control-plane SDKs talk to AX402_BASE_URL; buyer SDKs pay gateway hostnames with an EVM wallet.
Packages live in github.com/AxLabs/ax402-sdks.
Control plane vs buyer
- Control plane — manage APIs, endpoints, domains, keys, stats (seller automation). Auth: API key or JWT.
- Buyer — pay wrapped gateway URLs from your app, agent, or script. Auth:
AX402_EVM_PRIVATE_KEYor browser wallet.
- Buyer — pay wrapped gateway URLs from your app, agent, or script. Auth:
Buyer quick start
Example gateway URL: https://my-api.ax402.io/v1/foo. Full guide: Buyer clients.
TypeScript
import { buyerClientFromEnv } from "@ax402/sdk/buyer";
const client = await buyerClientFromEnv();
const { response } = await client.pay({ url: "https://my-api.ax402.io/v1/foo" });Control plane quick start
import { Ax402Client } from "@ax402/sdk";
const client = new Ax402Client({
baseUrl: process.env.AX402_BASE_URL!,
apiKey: process.env.AX402_API_KEY!,
});
const apis = await client.apis.list();Go: ax402.NewClient. Python: Ax402Client.from_env().
Language guides
Buyer clientsPay gateway URLs — all languages.TypeScriptFull control plane + batch buyer.GoCore automation + buyer.PythonSync/async + buyer.React paywallBrowser SPA paywall overlay.
Automation tools
@ax402/cli and @ax402/mcp-server share the control-plane surface. Buyer: ax402 pay url and MCP ax402_pay_url.
When to use SDK integration
- You embed seller or buyer logic in an existing application
- You run infrastructure-as-code or CI that provisions APIs and endpoints
- You build agents that both manage the platform and pay gateway URLs