Pre-registration
Optional flow to register a card before the first purchase — for a faster first checkout when you're confident the customer will pay.
Pre-registration is an optional Lib Lite flow that registers a card on the customer's Scan to Pay profile before any transaction. The next purchase then completes faster because the card is already on file.
Use sparingly. EFT Corporation recommends against using pre-registration in most cases — it adds an extra step to the customer journey and most apps don't need it. Use only if you have a specific UX reason (e.g. a "set up wallet" screen during onboarding).
For the standard flow, see Payments.
When pre-registration helps
| Scenario | Worth using pre-registration? |
|---|---|
| One-off checkout in your app | No — use Payments directly |
| Onboarding flow with explicit "add payment method" step | Yes |
| Subscription / recurring billing setup | Yes |
| Returning customer (already has a card on file) | No — they'll be silently registered on first purchase anyway |
Invoking pre-registration
Intent intent = new Intent(this, LibLitePreRegActivity.class);
intent.putExtra(LibLiteActivity.IN_API_KEY, "YOUR_API_KEY");
intent.putExtra(LibLiteActivity.IN_SYSTEM, "LIVE"); // or "TEST"
// Optional:
intent.putExtra(LibLiteActivity.IN_SUGGESTED_MSISDN, "27832006283");
libLiteActivityLauncher.launch(intent);Note: no IN_CODE — pre-registration doesn't involve a transaction.
Extras passed in
| Extra | Type | Required | Description |
|---|---|---|---|
IN_API_KEY | String | yes | Your Lib Lite API token |
IN_SYSTEM | String | yes | LIVE or TEST |
IN_SUGGESTED_MSISDN | String | optional | Pre-fills MSISDN on the registration screen |
Result handling
Same ActivityResultLauncher pattern as the other activities. The expected result code is LIBLITE_REGISTRATION_SUCCESS:
private void handleLibLiteResult(int resultCode, Intent data) {
if (resultCode == LibLiteActivity.LIBLITE_REGISTRATION_SUCCESS) {
boolean silent = data.getBooleanExtra(LibLiteActivity.OUT_SILENT_REGISTRATION, false);
if (silent) {
// Customer already had a card — no UI was shown
} else {
// Customer registered a new card via the UI
}
} else if (resultCode == LibLiteActivity.LIBLITE_USER_CANCELLED) {
int location = data.getIntExtra(LibLiteActivity.OUT_LOCATION, -1);
// Customer cancelled. location tells you where.
} else if (resultCode == LibLiteActivity.LIBLITE_ERROR) {
int errorCode = data.getIntExtra(LibLiteActivity.OUT_ERROR_CODE, -1);
int location = data.getIntExtra(LibLiteActivity.OUT_LOCATION, -1);
handleError(errorCode, location);
}
}Result codes
| Result code | Meaning | Extras |
|---|---|---|
LIBLITE_REGISTRATION_SUCCESS | Customer is registered with a usable card on file | OUT_SILENT_REGISTRATION |
LIBLITE_USER_CANCELLED | Customer cancelled the pre-registration | OUT_LOCATION |
LIBLITE_ERROR | An error occurred | OUT_ERROR_CODE, OUT_LOCATION |
OUT_SILENT_REGISTRATION semantics:
true— the customer's MSISDN already had a card linked; no UI was shownfalse— the customer interacted with the registration UI
In both cases, the customer is now ready to pay without additional registration steps.
What's next
- Take a payment → Payments
- Let customers manage cards later → Manage Card
- Result codes → Errors
Updated 2 days ago
