Reference

API endpoints

Version 1 of Penni's public API at https://api.pennipay.eu: config, verify, settle, discovery and health.

All calls go to https://api.pennipay.eu. Calls that need a key authenticate with Authorization: Bearer <API key>. Bodies are JSON.

EndpointKeyWhat it does
GET /v1/sites/:id/config?path=yesPrice and ready-made x402 accepts for one path. Without path: every price rule in routes. Includes mode, ready, problems and blocked. Cacheable for 60 seconds, with ETags.
POST /v1/x402/verifyyesChecks a signed payment without moving money. Body: { x402Version, paymentPayload, paymentRequirements }. Free.
POST /v1/x402/settleyesSubmits the payment on-chain and returns the transaction. Same body. Costs €0.002 in credits when it succeeds on a mainnet.
GET /v1/x402/supportednoSchemes, networks and tokens the facilitator handles, and its extensions.
GET /v1/x402/discovery/resourcesnoThe x402 Bazaar catalog of opted-in sites. limit (1–100), offset, network, payTo.
GET /v1/x402/discovery/search?query=noSearches the catalog.
GET /v1/x402/discovery/price?url=noWhat one URL of an opted-in site costs, with its accepts.
GET /v1/healthno{ "ok": true } while the API is up.

Config response

FieldMeaning
modetest, live or mixed: see test and live.
ready, problemsWhether the site can take payments now, and if not, why: no wallet, no tokens, out of credits.
blockedOut of credits with the site set to block: answer 503.
matchWith ?path=: the matching rule's pattern, price and free.
acceptsThe payment options for the 402, ready to copy.
extensionsWith ?path=: the rule's discovery metadata, as bazaar.

Versioning

New fields and endpoints are added within /v1, so ignore fields you don't know. A breaking change ships as /v2, and /v1 keeps working next to it until we announce its end well in advance.