Skip to main content
The API returns a standard HTTP status and a structured JSON body on every failure. The status carries the HTTP meaning. The body says what failed and on which field.

Status codes

Error body

Branch on code and details[].code, not on message text. Treat unknown codes as generic failures.

Payment provider rate limits

When a payment provider rejects a call for rate limiting, the API returns 429 with the provider in meta:
Retry with bounded exponential backoff. For Lago’s own request limits, see Rate limits.