Free Preview
Expose one useful row before payment so humans and agents can inspect value.
HTTP 402 for API builders
A small Node server that shows the paid API shape agents expect: preview, 402 response, discovery, feed filters, and a production verifier swap point.
$ curl -i /v1/paid/data
HTTP/1.1 402 Payment Required
payment-required: eyJ4NDAyVmVyc2lvbiI6Mi...
{"error":"payment_required"}
$ curl -H 'X-Payment: demo-paid' /v1/paid/data
{"paid":true,"count":3}
Expose one useful row before payment so humans and agents can inspect value.
Return a structured payment requirement with route, price, network, and asset details.
Wrap JSON feeds with score, tag, repository, opportunity, and effort-score filters.
git clone https://github.com/go165/x402-paid-api-starter.git
cd x402-paid-api-starter
cp .env.example .env
npm test
npm start