Skip to main content
The Lago API uses standard HTTP response codes to clearly indicate the result of each API request:
  • 2xx: Success - The request was processed successfully.
  • 4xx: Client Error - There was an issue with the request, such as missing parameters, invalid input, or unauthorized access.
  • 5xx: Server Error - An error occurred on Lago’s side while processing the request.
For some 4xx errors, the response body will include additional information to help you understand and resolve the specific problem.

Error fields

status
number
required
The HTTP status code.
error
string
required
A generic error message.
code
string
A generic error code representing the type of error.
provider.code
string
The code of the payment provider that caused the error when applicable.
error_details
object
An object containing the error details. It usually maps the field names that caused the error to an array of error messages/codes.For specific errors, such as a payment provider error, the error_details may include other fields.

Error codes

bad_request_error

Examples:
  • coupons_must_be_an_array
  • subscriptions_must_be_an_object

unauthorized_error

Examples:
  • Unauthorized
  • expired_jwt_token

forbidden_error

Examples:
  • feature_unavailable
  • feature_not_available
  • [mode]_action_not_allowed_for_[resource_name]

not_found_error

Examples:
  • invoice_not_found
  • customer_not_found
  • subscription_not_found
  • billing_entity_not_found
  • plan_not_found
  • add_on_not_found
  • coupon_not_found
  • tax_not_found
  • feature_not_found
  • privilege_not_found
  • billable_metric_not_found
  • webhook_endpoint_not_found
  • api_log_not_found
  • activity_log_not_found
  • payment_not_found
  • payment_receipt_not_found
  • fee_not_found
  • event_not_found
  • credit_note_not_found
  • wallet_not_found
  • wallet_transaction_not_found
  • lifetime_usage_not_found
  • alert_not_found
  • entitlement_not_found

method_not_allowed_error

Examples:
  • feature_not_supported
  • invalid_type_or_status
  • credit_note_voided
  • no_voidable_amount
  • invoices_not_overdue
  • invoices_have_different_currencies
  • invoices_not_ready_for_payment_processing
  • premium_integration_missing
  • metadata_on_draft_invoice
  • payment_status_update_on_draft_invoice
  • not_voidable
  • is_draft
  • invalid_status
  • last_admin
  • cannot_revoke_own_membership
  • enabled_authentication_methods_required
  • signup_disabled
  • plan_overlapping
  • wallet_not_active
  • is_succeeded
  • no_active_subscription
  • status_not_voided
  • invoice_not_finalized
  • invoice_payment_already_succeeded
  • invoice_due_date_in_future
  • invoice_dispute_lost
  • payment_processor_is_currently_handling_payment
  • invoiced_fee
  • eu_tax_not_applicable
  • not_disputable
  • only_one_limitation_type_per_coupon_allowed

validation_errors

provider_error

third_party_error

stripe_required_error

too_many_provider_requests_error

This error is returned when a downstream payment or tax provider rate-limits Lago. It is distinct from the platform rate limit below.

rate_limited

Returned when you exceed the REST API rate limit for your organization. The response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. See Rate limits for the limits and retry guidance.

internal_server_error

health_check_error