X402 payment facilitator for AI API billing with Solana USDC and Base USDC support.
FacilitatorX402 is an early-stage Python project in the AI payments / x402 ecosystem, focused on ai-payments, base, payment-protocol, solana. It currently has 4 GitHub stars and 1 forks, and sits alongside related tools like tdm-integration-kit, tdm-sdk, TDM-Agent-Integration-Kit.
Ace Data Cloud runs Facilitator X402 as the production settlement engine behind the X402 payment protocol. The service is publicly available at https://facilitator.acedata.cloud and ties into the wider Ace Data Cloud platform at https://platform.acedata.cloud.
x402 is an open protocol that brings stablecoin payments to plain HTTP by reviving status code 402 Payment Required:
Web-scale applications and AI agents need instant, programmable settlement. Legacy payment flows are slow and require pre-established credentials. x402 embeds payment in the request–response cycle, enabling trust-minimized pay-per-request experiences with the reach of the public internet.
paymentRequirements.TransferWithAuthorization payload and sends it back.
POST /verify checks payload integrity and signature, enforces caps/validity, and persists the nonce for replay protection.POST /settle re-validates the stored authorization, invokes transferWithAuthorization, waits for the receipt, and marks the record as settled./ serves a facilitator overview for humans, while /healthz exposes a JSON probe for L7 load balancers..github/workflows/deploy.yaml builds & deploys to Kubernetes using deploy/run.sh and the manifests under deploy/production/.Environment variables govern runtime behaviour (see the supplied .env).
| Variable | Description | Required | Default |
|---|---|---|---|
APP_ENV |
Environment (local, production, …) | No | local |
APP_SECRET_KEY |
Django secret key | Yes | — |
PGSQL_HOST, PGSQL_PORT, PGSQL_USER, PGSQL_PASSWORD, PGSQL_DATABASE_FACILITATOR |
PostgreSQL connection info | Yes | — |
X402_RPC_URL |
RPC endpoint used for settlement transactions | Yes | — |
X402_SIGNER_PRIVATE_KEY |
Private key used to sign settlements | Yes | — |
X402_SIGNER_ADDRESS |
Optional explicit signer address | No | derived from key |
X402_GAS_LIMIT |
Gas limit applied to settlements | No | 250000 |
X402_TX_TIMEOUT_SECONDS |
Timeout (seconds) waiting for receipts | No | 120 |
X402_MAX_FEE_PER_GAS_WEI |
Max fee per gas (EIP-1559) | No | 0 (use legacy gas price) |
X402_MAX_PRIORITY_FEE_PER_GAS_WEI |
Priority fee per gas (EIP-1559) | No | 0 |
Callers are responsible for restricting pay_to, asset, and network values in payloads to approved destinations.
# install dependencies
pip install -r <(poetry export -f requirements.txt --without-hashes)
# or
poetry install
# apply migrations
python manage.py migrate
# start locally
python manage.py runserver 0.0.0.0:8008
docker-compose build && docker-compose up runs the service with uvicorn core.asgi:application --host 0.0.0.0 --port 8000.deploy/production. Use deploy/run.sh during CI/CD to substitute the build number and apply..github/workflows/deploy.yaml handles build → push → rollout to the Ace Data Cloud cluster.POST /verify
Content-Type: application/json
{
"paymentPayload": { ... },
"paymentRequirements": { ... }
}
Response:
{ "isValid": true, "invalidReason": null, "payer": "0x..." }
POST /settle
Response on success:
{
"success": true,
"transaction": "0xabc123...",
"network": "base",
"payer": "0x..."
}
Failures return success: false with errorReason explaining validation failures, replay detection, RPC timeouts, or on-chain reverts.
FacilitatorBackend/
├── core/
├── x402f/
├── deploy/
├── Dockerfile
├── docker-compose.yaml
├── pyproject.toml
└── README.md
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
Open contract-facing SDK for payable routes and gateway-backed integrations. Thin public surface for authorize, checkout, and session flows.
Developer integration tools for adding TDM payments to AI agents, apps, and workflows. CLI, MCP server, and copy-paste examples
Production-ready x402 facilitator server.
Rust SDK for the x402 payment protocol.
Accept payments from AI agents. Open-source. Your data, your domain, your rules. Free forever.
A production-ready payment settlement service for the x402 protocol. Built with Elysia and Node.js, it verifies cryptographic payment signatures and settles transactions on-chain for EVM, SVM (Solana), and Starknet networks.
Golang implementation of an x402 payment facilitator
x402 payment facilitator — verifies and settles EIP-3009 USDC micropayments on Base, Arbitrum, and Ethereum.