x402 Playground
NAME
x402.matija.eu — pay-per-request API using the x402 protocolSYNOPSIS
/ /payment-info /api/data /api/statusDESCRIPTION
This service gates API endpoints behind x402 micropayments. Requests without payment receive HTTP 402 with a PAYMENT-REQUIRED header. Browsers get an interactive paywall; programmatic clients get machine-readable payment instructions.ENDPOINTS
GET / This page. GET /payment-info Machine-readable JSON with the payment configuration: network, token, price, facilitator URL, and payment flow. GET /api/data [protected] Returns example JSON data. Costs 1 USDC on Polygon. Without payment you get HTTP 402 + payment instructions. GET /api/status [protected] Returns server status. Costs 1 USDC on Polygon.PAYMENT FLOW
1. Request a protected endpoint. 2. Receive HTTP 402 + PAYMENT-REQUIRED header (base64 JSON). 3. Sign a USDC transferWithAuthorization with your wallet. 4. Resend the request with the PAYMENT-SIGNATURE header. 5. The facilitator verifies + settles the payment on-chain. 6. Receive the protected resource. In a browser, steps 2–5 are handled by the built-in paywall UI. Just open a [protected] link above and pay with your wallet.CONFIGURATION
Protocol x402 v2 Network Polygon mainnet (eip155:137) Token USDC (0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359) Price 1 USDC per request Pay to 0x91FdcfCAdfA7E660c70D9641257542deD2a2d384 Facilitator https://facilitator.payai.networkSEE ALSO
x402 protocol https://docs.x402.org