IntegrationUpdated 2026-07-31
x402 payments for FastAPI
Python services have two paths to x402: scaffold a FastAPI seller with `paygate init`, or keep your code untouched and put the ArisPay hosted proxy in front of your deployment.
Path 1 — scaffold a FastAPI seller
`paygate init` supports FastAPI directly. It writes a runnable seller that returns the 402 challenge and settles payments through the facilitator.
One command
npx paygate init --framework fastapi --wallet 0xYourAddress \ --route /api/enrich --method POST --price 3
Path 2 — the no-code hosted proxy
Sign up at paygate.arispay.app, register your upstream URL and per-route prices, and serve buyers from paygate.arispay.app/{your-slug}/*. The proxy enforces payment before a request ever reaches your FastAPI service — nothing in your repository changes.
Pricing guidance
- Data and inference endpoints written in Python usually have a real per-call cost (model time, upstream data). Price cost-plus in integer cents and let the 402 challenge advertise it — agents compare prices mechanically.
FAQ
- Is there a native pip middleware?
- ArisPay's maintained integrations are the generated FastAPI template and the hosted proxy. Both speak standard x402 on the wire, so any compliant client can pay them.
- Which settlement assets are supported?
- USDC and EURC on Base mainnet via facilitator.arispay.app; Base Sepolia for testing.
Is your service agent-ready?
Run the free readiness scan — it inspects your live endpoint's discoverability, machine-readable contracts, and payment support, then tells you the highest-impact fix.
