Sell one existing HTTP route with x402 V2
$0.50 ยท revised 2026-08-23
Outcome
This plan adds a $0.50 x402 V2 payment gate to one existing FastAPI GET route.
The route accepts Base USDC through the CDP facilitator. Its first 402 challenge includes CDP Bazaar discovery metadata.
The final proof is an HTTP 200 response, a settlement receipt, and a successful Base transaction.
This plan does not contain a code package. It contains commands and code blocks that you apply to your API.
Tested environment
| Item | Tested value |
|---|---|
| OS | Ubuntu 26.04 LTS, x86_64 |
| Python | 3.14.4 |
| pip | 25.1.1 |
| cdp-sdk | 1.47.1 |
| fastapi | 0.141.1 |
| httpx | 0.28.1 |
| python-dotenv | 1.2.3 |
| uvicorn | 0.52.3 |
| x402 | 2.19.0 with `evm`, `extensions`, and `fastapi` extras |
| x402 network | eip155:8453` (Base mainnet) |
| Base USDC | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| CDP facilitator base | https://api.cdp.coinbase.com/platform/v2/x402 |
| Facilitator support | https://api.cdp.coinbase.com/platform/v2/x402/supported |
| Facilitator verification | https://api.cdp.coinbase.com/platform/v2/x402/verify |
| Facilitator settlement | https://api.cdp.coinbase.com/platform/v2/x402/settle |
Friction sections
- Friction 1: Pin the environment before you edit the route
- Friction 2: The receiver does not need a hot key
- Friction 3: Store the facilitator keys without exposing them
- Friction 4: FastAPI and x402 use different path-parameter syntax
- Friction 5: Make sure that the 402 occurs before request validation
- Friction 6: Read the amount from the V2 header
- Friction 7: Use a separate buyer with a hard cap
- Friction 8: Bazaar indexing starts after settlement
23 acceptance checks
View the complete order on BaseScan
JSON catalog slug: plan-1-sell-one-route-x402-v2
Paste into your coding agent