Errors

Lib Lite result codes, error codes, and the OUT_LOCATION drop-off indicator — what each one means and how to respond.

This page is the reference for everything the SDK can hand back in a result Intent. Use it when triaging a customer complaint or debugging an integration.


The two error surfaces

The SDK reports failures at two levels:

LevelWhere it shows upHow to read it
Result codeThe int you get from result.getResultCode()Tells you what kind of failure / outcome occurred
Error codedata.getIntExtra(OUT_ERROR_CODE, -1) — populated only when the result code is LIBLITE_ERRORTells you the specific cause

You'll see one result code per launch. If — and only if — the result code is LIBLITE_ERROR, an error code accompanies it.


Result codes

ConstantWhen you'll see itExtras
LibLiteActivity.LIBLITE_PAYMENT_SUCCESSThe customer completed payment. Verify server-side.OUT_TX_REFERENCE, OUT_TX_TRACE_ID
LibLiteActivity.LIBLITE_PAYMENT_FAILEDA payment was attempted but failed (bank declined, network blip, etc.)OUT_TX_REFERENCE
LibLiteActivity.LIBLITE_USER_CANCELLEDCustomer aborted before completing the flowOUT_LOCATION
LibLiteActivity.LIBLITE_ERRORAn error occurred before the payment attemptOUT_ERROR_CODE, OUT_LOCATION
LibLiteActivity.LIBLITE_INVALID_CODEThe code you passed in is invalid (expired, used, malformed, wrong shape)(none)
LibLiteActivity.LIBLITE_REGISTRATION_SUCCESSPre-registration or manage-card completed successfullyOUT_SILENT_REGISTRATION

Error codes (OUT_ERROR_CODE)

ConstantDescriptionWhat to do
NETWORK_ERRORThe SDK couldn't reach the platformShow "no network" message; let the customer retry
EXCEPTION_OCCURREDAn unexpected internal exceptionLog OUT_LOCATION; raise a support ticket with the trace
PAYMENT_ERRORA payment-time error not surfaced as LIBLITE_PAYMENT_FAILEDTreat similarly to LIBLITE_PAYMENT_FAILED; have the customer retry
OTP_ERROROTP retrieval / validation failed during card registrationCustomer can re-request the OTP; check SMS permissions and hash setup
INVALID_CODE_PARAMETERIN_CODE extra was missing or emptyFix the calling code — IN_CODE is mandatory
INVALID_API_KEY_PARAMETERIN_API_KEY extra was missing or invalidGenerate a fresh key in the Portal; verify the system (LIVE vs TEST)
SECURE_CODE_NOT_SUPPORTEDThe card's BIN requires 3D Secure but isn't enabled for itCustomer needs a different card, or the BIN config needs platform support
PERMISSIONS_REJECTEDThe customer denied a required permission (camera, location, SMS)Prompt the customer to grant the permission in settings
REJECTED_TERMS_AND_CONDITIONSThe customer declined the Scan to Pay T&Cs during registrationCustomer can retry; T&Cs acceptance is mandatory
CODE_NOT_VARIABLE_AMOUNT(Misnamed historically) — code is a variable-amount code; Lib Lite requires fixed-amountGenerate a fixed-amount code on your backend

OUT_LOCATION — the drop-off indicator

Set on LIBLITE_USER_CANCELLED and LIBLITE_ERROR. It's an integer that identifies the screen / step where the customer cancelled or the error occurred:

Use caseWhat OUT_LOCATION is useful for
Funnel analyticsWhere customers drop off in the registration / payment flow
Support debugging"The customer says the app crashed" — OUT_LOCATION narrows it to a specific step
Cross-version comparisonsThe same locations are used across SDK versions, so you can trend cancellation rates

The exact value space changes per SDK release, but locations are stable across patches. For the current location map, ask your integration engineer — it's released alongside each SDK build.


Result-code triage cheat sheet

result code?
├── LIBLITE_PAYMENT_SUCCESS  → verify on backend, fulfil order
├── LIBLITE_PAYMENT_FAILED   → log txReference, show retry option
├── LIBLITE_USER_CANCELLED   → log OUT_LOCATION for funnel
├── LIBLITE_INVALID_CODE     → bug in your code-creation flow; investigate
├── LIBLITE_REGISTRATION_SUCCESS → customer ready to pay
└── LIBLITE_ERROR ─→ OUT_ERROR_CODE?
                    ├── NETWORK_ERROR           → retry, friendly message
                    ├── PERMISSIONS_REJECTED    → prompt to settings
                    ├── INVALID_CODE_PARAMETER  → integration bug
                    ├── INVALID_API_KEY_PARAMETER → integration bug
                    ├── CODE_NOT_VARIABLE_AMOUNT → backend bug (use fixed code)
                    ├── EXCEPTION_OCCURRED       → log & raise ticket
                    ├── OTP_ERROR               → retry OTP
                    ├── PAYMENT_ERROR           → retry payment
                    ├── SECURE_CODE_NOT_SUPPORTED → unsupported card
                    └── REJECTED_TERMS_AND_CONDITIONS → customer choice

What's next