MediumPaymentsClosed
x402 Paywalled API
Build an API that charges per request with x402 on Pharos: a paid endpoint, a facilitator, and a client that pays and gets the data.
Points
100 +50 with video
Build on
What you'll build
An API that charges per request with x402 on Pharos Atlantic Testnet. It includes a paid endpoint that answers 402 Payment Required, a facilitator that verifies and settles payments, and a client that pays and gets the data. The Pharos x402 Skill can generate most of this for you.
Requirements
- 01Runs on Atlantic Testnet (eip155:688689), priced in test USDC.
- 02Has at least 2 paid routes at different prices and 1 free route, such as /health.
- 03Runs its own facilitator with /verify, /settle and /supported.
- 04Shows the full flow in the demo: a 402, then a signed payment, then a 200 with a PAYMENT-RESPONSE header and its tx hash, linked on the explorer.
- 05Rejects a bad or underpaid payment with another 402.
- 06Keeps private keys in env vars or a file, never in code or prompts.
Reviewers score against this list. Missing items can mean partial points.
Resources
x402 on Pharos: https://docs.pharos.xyz/developer-guide/x402
x402 on Atlantic Testnet: https://docs.pharos.xyz/developer-guide/x402/x402-atlantic-testnet
x402-pharos Skill: https://github.com/PharosNetwork/examples/tree/main/skills/x402-pharos
What to submit
- A proof link reviewers can open — a share link from ai.pharos.xyz, a tx hash on the explorer, or a deployed demo.
- A repo link if you wrote code.
- Optional: a video walking through the build for +50 points.