AUTHORIZED, CAPTURED, VOIDED, and REFUNDED describe the payment lifecycle and are documented separately.
Read an error
Errors raised by lite’s services return anerrors array and a request_id. Errors raised by the API gateway in front of them, such as a missing API key or an unknown path, use other shapes: see Errors from the API gateway.
documentation_url, routing_attempts, error_id, business_id, and entity_id are not currently returned. retry_after_seconds is returned with RATE_LIMIT_EXCEEDED on payouts: wait that many seconds before you retry.Errors from the API gateway
lite’s API gateway checks every request before it reaches a service. Its errors don’t use theerrors array, so read the status first:
correlationId from the body, or the X-Correlation-Id response header, when you contact lite support.
Validation errors
Field-level validation returnsMISSING_REQUIRED_FIELD or INVALID_FIELD_VALUE. MISSING_REQUIRED_FIELD is used only for fields that must be present, such as device. Every other failed rule, including most missing fields, returns INVALID_FIELD_VALUE. For example, a POST /payments without amount and with currency: "USD" returns:
field is the property path in camelCase, such as captureOptions.captureMode for capture_options.capture_mode. Branch on code and field, never on message. Fix every field listed before you resubmit the request.
HTTP status codes
The HTTP status identifies the general class of failure. Use the errorcode for application logic.
Error categories
Every error belongs to a category. Use it as a fallback when your integration receives a code it does not recognize.Error codes
These are the error codes the payment, checkout session, payment link and instrument services return. Settlement and payout codes are in the Account Settlement API reference.Declines
A declined card isn’t an API error.POST /payments returns 202, and the payment then moves to FAILED. The issuer’s answer is on the authorize operation: call GET /payments/{payment_id}?include=operations and read its response code and message, or take it from the payment.failed webhook. Only a void returns a decline as an error (422 DECLINED).
connector_response_code is the gateway’s result code: for MPGS, its gatewayCode, such as DECLINED, INSUFFICIENT_FUNDS or EXPIRED_CARD. lite doesn’t mark a decline as temporary or permanent: reason is Authorization declined for a decline and another message for a technical failure. To tell a decline from a failed 3D Secure, see Why a payment failed.
Retry failed requests
Branch oncode. For an unknown code, use category to identify the type of problem and retriable to determine whether a retry may succeed. Never branch on message.
A retriable: true response permits a controlled retry. It does not confirm that the original payment operation failed. For payment operations, retrieve the payment status before retrying or creating another payment attempt. This prevents duplicate authorizations, captures, voids, or refunds.
Use exponential backoff and cap the number of attempts. Stop retrying when the operation reaches a final state or when the retry limit is reached.
A retriable: false response requires a change before another attempt, such as correcting the request, using another payment instrument, or waiting for a valid workflow state.
Log the request_id for every failed request and include it when contacting lite support.
Retries and idempotency. A retry of POST /payments with the same x-idempotency-key within 120 seconds gets the first response again, even if that was an error. After 120 seconds the key is forgotten. After a 5xx or a timeout on POST /payments, call GET /payments?order_id=<reference>: if a payment is there, follow it, and if not, retry with a new x-idempotency-key. Always send order.reference: while a payment for that reference exists and isn’t FAILED, EXPIRED, VOIDED or AUTHORIZATION_REVERSED, lite returns it instead of charging again. To check a payment before retrying, call GET /payments/{payment_id}, or GET /payments?order_id=<reference> when you don’t have its id. See Retries and duplicate requests.
Errors by API
Find the errors each lite API can return. Open an example to see the response body. Themessage text can vary, so branch on code. Values such as <request-id> and <status> are generated at runtime.
Common errors
These responses are shared by several APIs. Each endpoint section identifies the shared responses that apply.The API key lacks the permission for this operation
The API key lacks the permission for this operation
FORBIDDEN · Retriable: NoThe API key is missing or invalid
The API key is missing or invalid
errors arrayreason.The request contains an unknown field
The request contains an unknown field
INVALID_REQUEST instead. camelCase keys are accepted.HTTP 400 Bad Request · INVALID_FIELD_VALUE · Retriable: NoA required request field is missing
A required request field is missing
MISSING_REQUIRED_FIELD · Retriable: NoA request field fails validation
A request field fails validation
INVALID_FIELD_VALUE · Retriable: NoAn unhandled failure occurs
An unhandled failure occurs
INTERNAL_ERROR · Retriable: YesPayments
Authorize a payment
POST /payments
Also returned: the common errors, such as a missing permission, an unknown field, field validation, and internal errors.
The instrument ID is empty or is not a valid UUID
The instrument ID is empty or is not a valid UUID
INVALID_REQUEST · Retriable: NoThe amount or currency is invalid
The amount or currency is invalid
INVALID_REQUEST · Retriable: NoThe terminal ID is missing for a merchant-initiated POS payment
The terminal ID is missing for a merchant-initiated POS payment
INVALID_REQUEST · Retriable: NoThe payment token does not exist or was deleted
The payment token does not exist or was deleted
TOKEN_NOT_FOUND · Retriable: NoThe payment token has expired
The payment token has expired
EXPIRED_TOKEN · Retriable: NoThe payment token is not active
The payment token is not active
INVALID_TOKEN · Retriable: Nolite cannot resolve the payment instrument
lite cannot resolve the payment instrument
INVALID_TOKEN · Retriable: NoA request with the same order reference is already being processed
A request with the same order reference is already being processed
DUPLICATE_REQUEST · Retriable: after 60 secondsYou sent the same order.reference less than 60 seconds after an earlier attempt that left no live payment, for example one that failed. retriable is false because an immediate retry gets the same error: lite holds each order.reference for 60 seconds after an attempt. After that, retry with the same reference.The payment instrument lookup times out
The payment instrument lookup times out
PROVIDER_TIMEOUT · Retriable: YesThe payment instrument lookup fails because of a connection error
The payment instrument lookup fails because of a connection error
PROVIDER_CONNECTION_ERROR · Retriable: Yeslite cannot start the payment operation
lite cannot start the payment operation
WORKFLOW_SUBMISSION_FAILED · Retriable: YesThe original idempotent request is still processing when the wait period ends
The original idempotent request is still processing when the wait period ends
INTERNAL_ERROR · Retriable: YesAn unexpected error occurs while resolving the payment instrument
An unexpected error occurs while resolving the payment instrument
INTERNAL_ERROR · Retriable: YesCapture a payment
POST /payments/:paymentId/capture
Also returned: the common errors, such as a missing permission, an unknown field, field validation, and internal errors.
Every capture 400 uses INVALID_REQUEST, so check what’s left before you send. An unknown payment ID returns 404 PAYMENT_NOT_FOUND instead.
The capture amount is zero or negative while building the request
The capture amount is zero or negative while building the request
INVALID_REQUEST · Retriable: NoThe payment is not found
The payment is not found
PAYMENT_NOT_FOUND · Retriable: NoThe payment is not in a capturable state
The payment is not in a capturable state
INVALID_STATE · Retriable: NoNo amount remains available for capture
No amount remains available for capture
INVALID_REQUEST · Retriable: NoThe resolved capture amount is zero or negative
The resolved capture amount is zero or negative
INVALID_REQUEST · Retriable: NoThe requested amount exceeds the remaining capturable amount
The requested amount exceeds the remaining capturable amount
INVALID_REQUEST · Retriable: Nolite cannot start the payment operation
lite cannot start the payment operation
WORKFLOW_SUBMISSION_FAILED · Retriable: YesVoid a payment
POST /payments/:paymentId/void
Also returned: the common errors, such as a missing permission, an unknown field, field validation, and internal errors.
The void request fails validation
The void request fails validation
INVALID_REQUEST · Retriable: NoThe merchant is not allowed to void the payment
The merchant is not allowed to void the payment
FORBIDDEN · Retriable: NoThe payment is not found
The payment is not found
PAYMENT_NOT_FOUND · Retriable: NoThe payment has already been voided, captured, or is otherwise in the wrong state
The payment has already been voided, captured, or is otherwise in the wrong state
INVALID_STATE · Retriable: NoThe transaction is rejected for fraud
The transaction is rejected for fraud
FRAUD_DETECTED · Retriable: NoThe transaction is rejected by risk controls
The transaction is rejected by risk controls
RISK_DECLINED · Retriable: No3D Secure authentication fails
3D Secure authentication fails
AUTHENTICATION_FAILED · Retriable: NoThe 3D Secure service times out
The 3D Secure service times out
AUTHENTICATION_UNAVAILABLE · Retriable: YesAn upstream service cannot be reached
An upstream service cannot be reached
PROVIDER_CONNECTION_ERROR · Retriable: YesAn unexpected error occurs while voiding the payment
An unexpected error occurs while voiding the payment
INTERNAL_ERROR · Retriable: Yeslite cannot submit or process the void request
lite cannot submit or process the void request
WORKFLOW_SUBMISSION_FAILED · Retriable: YesRefund a payment
POST /payments/:paymentId/refund
Also returned: the common errors, such as a missing permission, an unknown field, field validation, and internal errors.
Every refund 400 uses INVALID_REQUEST, so check what’s left before you send. An unknown payment ID returns 404 PAYMENT_NOT_FOUND instead.
lite cannot load the payment state
lite cannot load the payment state
WORKFLOW_SUBMISSION_FAILED · Retriable: YesThe payment is not found
The payment is not found
PAYMENT_NOT_FOUND · Retriable: NoThe payment does not exist or has not been captured
The payment does not exist or has not been captured
INVALID_REQUEST · Retriable: NoThe payment state does not contain the card brand required for the balance check
The payment state does not contain the card brand required for the balance check
INVALID_REQUEST · Retriable: NoThe payment is not in a refundable state
The payment is not in a refundable state
INVALID_STATE · Retriable: NoNo amount remains available for refund
No amount remains available for refund
INVALID_REQUEST · Retriable: NoThe refund amount is zero or negative
The refund amount is zero or negative
INVALID_REQUEST · Retriable: NoThe refund amount exceeds the remaining refundable amount
The refund amount exceeds the remaining refundable amount
INVALID_REQUEST · Retriable: Nolite cannot start the payment operation
lite cannot start the payment operation
WORKFLOW_SUBMISSION_FAILED · Retriable: YesRetrieve a payment
GET /payments/:paymentId
This endpoint can also return the shared missing-merchant and internal errors.
The payment is not found
The payment is not found
PAYMENT_NOT_FOUND · Retriable: NoList payments
GET /payments
This endpoint can also return the shared missing-merchant and internal errors.
All query validation failures return 400 INVALID_FIELD_VALUE with retriable: false.
page or page_size is not a positive integer
page or page_size is not a positive integer
INVALID_FIELD_VALUE · Retriable: Nopage_size is greater than 100
page_size is greater than 100
INVALID_FIELD_VALUE · Retriable: Nostatus is unsupported
status is unsupported
INVALID_FIELD_VALUE · Retriable: Nopayment_method is unsupported
payment_method is unsupported
INVALID_FIELD_VALUE · Retriable: Nofrom_date is invalid
from_date is invalid
INVALID_FIELD_VALUE · Retriable: Noto_date is invalid
to_date is invalid
INVALID_FIELD_VALUE · Retriable: Nofrom_date is later than to_date
from_date is later than to_date
INVALID_FIELD_VALUE · Retriable: NoPayment Links
Manage Payment Links
/payment-links
Also returned: missing authentication context, field validation, and internal errors.
POST /: mode and max_uses are inconsistent
POST /: mode and max_uses are inconsistent
INVALID_REQUEST · Retriable: NoPATCH /:id: the requested status transition is not allowed
PATCH /:id: the requested status transition is not allowed
INVALID_REQUEST · Retriable: NoPATCH /:id: the link has already been used
PATCH /:id: the link has already been used
INVALID_REQUEST · Retriable: NoPOST /: merchant_reference_id already exists
POST /: merchant_reference_id already exists
DUPLICATE_REQUEST · Retriable: NoGET /:id, PATCH /:id, or GET /:id/consumptions: the link does not exist or belongs to another merchant
GET /:id, PATCH /:id, or GET /:id/consumptions: the link does not exist or belongs to another merchant
ENTITY_NOT_FOUND · Retriable: NoOpen a Payment Link
GET /pay/:token
This is a customer-facing route.
When a payment-link status URL is configured, errors redirect to that page with one of these query values:
The link does not exist
The link does not exist
ENTITY_NOT_FOUND · Retriable: NoThe link can't take another payment
The link can't take another payment
INVALID_STATE · Retriable: Nolite cannot create the checkout session
lite cannot create the checkout session
PROVIDER_CONNECTION_ERROR · Retriable: YesThe link is expired, paid, disabled, or has reached its usage limit
The link is expired, paid, disabled, or has reached its usage limit
INVALID_STATE · Retriable: NoThe message names the reason, for example Payment link has expired, Payment link is not active or Payment link is no longer available. Don’t retry: the link can’t take a payment.The consumption record cannot be created
The consumption record cannot be created
INTERNAL_ERROR · Retriable: YesInstruments
/instruments
Also returned: missing authentication context, malformed request, field validation, and internal errors.
Create an instrument
POST /instruments
Field-level validation can return several errors in one response. Missing fields use MISSING_REQUIRED_FIELD; other constraints use INVALID_FIELD_VALUE.
Field validation fails
Field validation fails
MISSING_REQUIRED_FIELD or INVALID_FIELD_VALUE · Retriable: NoThe payment method is unsupported
The payment method is unsupported
INVALID_REQUEST · Retriable: NoApple Pay data is not valid JSON
Apple Pay data is not valid JSON
INVALID_REQUEST · Retriable: NoThe payment token cannot be decrypted
The payment token cannot be decrypted
INVALID_REQUEST · Retriable: Nolite cannot process the Apple Pay data
lite cannot process the Apple Pay data
INVALID_REQUEST · Retriable: NoCard details are missing
Card details are missing
INVALID_REQUEST · Retriable: Nolite cannot tokenize or save the instrument
lite cannot tokenize or save the instrument
INTERNAL_ERROR · Retriable: Yeslite cannot create the instrument
lite cannot create the instrument
INTERNAL_ERROR · Retriable: Yesfuture_usage returns the existing instrument with HTTP 201. It is not returned as an error.
List instruments
GET /instruments
The lookup input fails validation
The lookup input fails validation
400 MISSING_REQUIRED_FIELD or 400 INVALID_FIELD_VALUERetriable: NoField validation can return one error per invalid field:
lite cannot list instruments
lite cannot list instruments
INTERNAL_ERROR · Retriable: YesRetrieve an instrument
GET /instruments/:id
The instrument is not found
The instrument is not found
ENTITY_NOT_FOUND · Retriable: NoThe instrument belongs to another merchant
The instrument belongs to another merchant
ENTITY_ACCESS_DENIED · Retriable: Nolite cannot retrieve the instrument
lite cannot retrieve the instrument
INTERNAL_ERROR · Retriable: YesUpdate an instrument
PUT /instruments/action
instrument_id or action_type fails validation
instrument_id or action_type fails validation
400 MISSING_REQUIRED_FIELD or 400 INVALID_FIELD_VALUERetriable: NoField validation can return one error per invalid field:
The instrument is not found
The instrument is not found
ENTITY_NOT_FOUND · Retriable: NoThe requested action is not publicly supported
The requested action is not publicly supported
INVALID_REQUEST · Retriable: NoThe action is not allowed in the instrument's current state
The action is not allowed in the instrument's current state
INVALID_STATE · Retriable: Nolite cannot update the instrument
lite cannot update the instrument
INTERNAL_ERROR · Retriable: Yes