Official verification and settlement implementation for the x402 v2 protocol,
built on the Python SDK (x402==2.16.0). The canonical production endpoint is
https://facilitator.acedata.cloud. The temporary validation candidate was
retired after the official-v2 production cutover completed in July 2026.
| Scheme | Network | CAIP-2 identifier | Asset |
|---|---|---|---|
| exact | Base mainnet | eip155:8453 |
Circle USDC |
| upto | Base mainnet | eip155:8453 |
Circle USDC through Permit2 |
| exact | SKALE Base | eip155:1187947933 |
Bridged USDC |
| exact | Solana mainnet | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
SPL USDC |
Solana devnet support exists behind configuration and is disabled by default. It is a testnet compatibility option, not a production rail.
GET /healthz: liveness and readiness probe.GET /supported: official facilitator kinds, extensions, and signer addresses.POST /verify: validate and reserve a v2 payment authorization.POST /settle: settle a verified authorization. This endpoint requiresX-Settlement-Token.GET /.well-known/x402: facilitator metadata.GET /discovery/resources: paginated CAIP-2 resource catalog.GET /list: compatibility redirect to discovery.
The official SDK handles protocol parsing, signature verification, simulation, and transaction construction. This service adds:
- PostgreSQL-backed authorization and settlement state;
- per-network PostgreSQL advisory locks across two replicas;
- prepared transaction persistence before broadcast;
- deterministic recovery and reconciliation;
- asset and recipient allowlists;
- authenticated settlement and replay protection.
Database settings:
PGSQL_HOST,PGSQL_PORT,PGSQL_USER,PGSQL_PASSWORDPGSQL_DATABASE_FACILITATOR
Core settings:
APP_ENV,APP_SECRET_KEY,ALLOWED_HOSTSX402_SETTLE_TOKENX402_FACILITATOR_PUBLIC_URLX402_SETTLEMENT_LEASE_SECONDSX402_PREPARED_MAX_AGE_SECONDSX402_TX_TIMEOUT_SECONDS
Each enabled rail requires its RPC URL, signer key/address, approved asset, and approved recipient. See docs/migration.md for the complete Base, SKALE, Solana, discovery, migration, cutover, and rollback configuration.
poetry install
poetry run python manage.py migrate
poetry run python manage.py runserver 0.0.0.0:8008Run validation:
poetry run pytest -q
poetry run ruff check .
poetry run ruff format --check .Local container:
docker compose build
docker compose upCompose loads the gitignored .env when present. It can still build without the
file in CI, but payment rails require their configured RPC, signer, asset, and
recipient values before runtime use.
The shared image runs as non-root UID/GID 10001 and serves ASGI with Uvicorn
on port 8000.
.github/workflows/ci.yaml: PR test, lint, and Docker build..github/workflows/deploy.yaml: manual production build and deployment frommainthroughdeploy/run.sh.
Production deployment uses a Recreate strategy to prevent old and official settlement semantics from overlapping. The runbook quiesces traffic, checks legacy records, applies migrations, deploys two replicas, starts reconciliation, and rolls back the Deployment and CronJob if validation fails.
See docs/migration.md for the completed official-v2 migration record and rollback constraints.