SDK integration
Use Ax402 SDKs when you need programmatic control — CI pipelines, custom admin UIs, agent workflows, or in-process buyer logic. SDKs talk to the control plane API; payment protocol signing uses x402 foundation libraries.
Control plane vs buyer
- Control plane — manage APIs, endpoints, domains, keys, and stats (seller automation)
- Buyer — pay wrapped gateway URLs from your app or script
TypeScript quick start
import { Ax402Client } from "@axlabs/ax402-sdk";
const client = new Ax402Client({
baseUrl: process.env.AX402_BASE_URL!,
apiKey: process.env.AX402_API_KEY!,
});
const apis = await client.apis.list();Authentication
- Dashboard sessions use HTTP-only cookies (browser)
- Automation uses scoped API keys via Authorization or X-API-Key
- Keys support fine-grained scopes — see TypeScript scope presets
Language guides
TypeScript
Full dashboard parity + buyer module.
Go
Resources package + buyer client.
Python
Pydantic models, httpx, async support.
Automation tools
CLI for shell scripts and MCP server for AI agents share the same API surface as the SDKs.
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