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:
| Level | Where it shows up | How to read it |
|---|---|---|
| Result code | The int you get from result.getResultCode() | Tells you what kind of failure / outcome occurred |
| Error code | data.getIntExtra(OUT_ERROR_CODE, -1) — populated only when the result code is LIBLITE_ERROR | Tells 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
| Constant | When you'll see it | Extras |
|---|---|---|
LibLiteActivity.LIBLITE_PAYMENT_SUCCESS | The customer completed payment. Verify server-side. | OUT_TX_REFERENCE, OUT_TX_TRACE_ID |
LibLiteActivity.LIBLITE_PAYMENT_FAILED | A payment was attempted but failed (bank declined, network blip, etc.) | OUT_TX_REFERENCE |
LibLiteActivity.LIBLITE_USER_CANCELLED | Customer aborted before completing the flow | OUT_LOCATION |
LibLiteActivity.LIBLITE_ERROR | An error occurred before the payment attempt | OUT_ERROR_CODE, OUT_LOCATION |
LibLiteActivity.LIBLITE_INVALID_CODE | The code you passed in is invalid (expired, used, malformed, wrong shape) | (none) |
LibLiteActivity.LIBLITE_REGISTRATION_SUCCESS | Pre-registration or manage-card completed successfully | OUT_SILENT_REGISTRATION |
Error codes (OUT_ERROR_CODE)
OUT_ERROR_CODE)| Constant | Description | What to do |
|---|---|---|
NETWORK_ERROR | The SDK couldn't reach the platform | Show "no network" message; let the customer retry |
EXCEPTION_OCCURRED | An unexpected internal exception | Log OUT_LOCATION; raise a support ticket with the trace |
PAYMENT_ERROR | A payment-time error not surfaced as LIBLITE_PAYMENT_FAILED | Treat similarly to LIBLITE_PAYMENT_FAILED; have the customer retry |
OTP_ERROR | OTP retrieval / validation failed during card registration | Customer can re-request the OTP; check SMS permissions and hash setup |
INVALID_CODE_PARAMETER | IN_CODE extra was missing or empty | Fix the calling code — IN_CODE is mandatory |
INVALID_API_KEY_PARAMETER | IN_API_KEY extra was missing or invalid | Generate a fresh key in the Portal; verify the system (LIVE vs TEST) |
SECURE_CODE_NOT_SUPPORTED | The card's BIN requires 3D Secure but isn't enabled for it | Customer needs a different card, or the BIN config needs platform support |
PERMISSIONS_REJECTED | The customer denied a required permission (camera, location, SMS) | Prompt the customer to grant the permission in settings |
REJECTED_TERMS_AND_CONDITIONS | The customer declined the Scan to Pay T&Cs during registration | Customer can retry; T&Cs acceptance is mandatory |
CODE_NOT_VARIABLE_AMOUNT | (Misnamed historically) — code is a variable-amount code; Lib Lite requires fixed-amount | Generate a fixed-amount code on your backend |
OUT_LOCATION — the drop-off indicator
OUT_LOCATION — the drop-off indicatorSet 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 case | What OUT_LOCATION is useful for |
|---|---|
| Funnel analytics | Where 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 comparisons | The 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
- Test card numbers that produce specific errors → Sandbox and test cards
- Confirm a transaction's true outcome → Webhooks / Querying transactions
- Bank decline codes (when
LIBLITE_PAYMENT_FAILED) → ISO response codes - Support escalation → Support
Updated 2 days ago
