Reference

Errors

HTTP status codes from Penni's API, and the error codes the Node.js middleware reports.

Penni's own checks answer with an HTTP status and { "error": "…" }. Results from the facilitator itself (isValid, success and their reasons) pass through unchanged.

API status codes

StatusMeaning
400The body is not valid JSON, or paymentRequirements is missing.
401Missing or invalid API key, or a key for another site.
402Out of credits. No settlement was attempted. Never for test payments.
403Site paused, payTo is not the site's wallet, or the token is not accepted for this site.
409This Solana transaction was already settled; a payment counts once.
429Daily limit of free test settlements reached. Resets at 00:00 UTC.
502, 503The facilitator could not be reached, or doesn't serve that chain. Safe to retry verify; for settle, check the transaction first.

Common payment reasons

ReasonWhat happened
insufficient_fundsThe payer doesn't hold enough of the token.
invalid_payment_requirementsThe payment was signed for another price, token, wallet or network, for example after a price change.
settlement_pendingCardano only: confirmations aren't in yet. Send the same settle body again.

Node.js middleware codes

The middleware reports every problem to onError as a PenniError with a code:

CodeMeaningResponse
invalid_paymentThe payment header isn't a payment402
requirements_mismatchSigned for another price, token, wallet or network402 with the current price
verify_failedThe facilitator refused the payment402
settle_failedSettlement failed on-chain402
gateway_rejectedPenni refused for a reason on your side (key, paused site, credits, test limit)onUnavailable
config_rejectedWrong site ID or API keyonUnavailable
config_unavailable, facilitator_unavailablePenni unreachable, timed out or 5xxonUnavailable
not_readyPriced path without payment options, or blocked while out of creditswhenNotReady or the dashboard setting
hook_failedYour onPaid threw; the payment still succeedednone