Ax402Docs
SDKS

Python

Sync/async control plane + exact buyer

Pydantic-typed control-plane client with sync and async variants. Buyer support is an optional extra. Package: ax402-sdk on PyPI.

Install

pip install ax402-sdk
pip install "ax402-sdk[buyer]"  # buyer + x402 signing deps

Buyer

Pay gateway URLs with EVM exact scheme. See Buyer clients .

from ax402_sdk.buyer import BuyerClient
result = BuyerClient.from_env().get("https://echo.staging.ax402.io/echo/get?test=1")
print(result.status_code, result.settlement)

Async

from ax402_sdk.buyer import AsyncBuyerClient, evm_signer_from_private_key
async with AsyncBuyerClient(evm_signer_from_private_key(key)) as client:
    result = await client.get("https://echo.staging.ax402.io/echo/get?test=1")

Batch-settlement is not registered in Python buyer — use TypeScript buyer or React paywall .

Control plane

from ax402_sdk import Ax402Client
client = Ax402Client.from_env()  # AX402_BASE_URL, AX402_API_KEY, AX402_JWT
apis = client.apis.list()
api = client.apis.create(name="My API", slug="myapi", upstream_base_url="https://api.example.com")
# Flat helpers (back-compat)
from ax402_sdk import list_apis, stats_overview

Resources: auth, keys, apis, endpoints, domains, openapi, stats, settlements, config. Core seller automation — JWT-only routes (MFA, billing, income) are TypeScript-only today.

Platform helpers

from ax402_sdk.platform.helpers import gateway_url, wrap_openapi
from ax402_sdk import SCOPE_PRESETS, usdc_to_atomic, build_usdc_accept

Agents

Pair with the MCP server or agent guide for automation recipes.

Tests

cd packages/python && pip install -e ".[dev]" && pytest

On this page