Manage card

Launch the Lib Lite card-management flow standalone — let customers add or remove cards without making a purchase.

The manage-card flow lets a customer add, view, or delete cards on their Scan to Pay profile from inside your app — without going through a checkout. Use it when you want a "My cards" section in your app's profile or settings area.

For payments themselves, see Payments.


Invoking the manage-card activity

Intent intent = new Intent(this, LibLiteWalletActivity.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);

Extras passed in

ExtraTypeRequiredDescription
IN_API_KEYStringyesYour Lib Lite API token from the Portal
IN_SYSTEMStringyesLIVE or TEST
IN_SUGGESTED_MSISDNStringoptionalPre-fills the MSISDN on the registration screen

Note: no IN_CODE — the manage-card flow doesn't involve a transaction.


Result handling

The same ActivityResultLauncher you use for payments will also receive manage-card results. Use the result code to disambiguate:

private void handleLibLiteResult(int resultCode, Intent data) {
    if (resultCode == LibLiteActivity.LIBLITE_REGISTRATION_SUCCESS) {
        boolean silent = data.getBooleanExtra(LibLiteActivity.OUT_SILENT_REGISTRATION, false);
        // Customer finished — silent: they were already registered, no UI was shown
        //                   non-silent: they interacted with the wallet UI
        handleWalletFinished(silent);

    } else if (resultCode == LibLiteActivity.LIBLITE_USER_CANCELLED) {
        int location = data.getIntExtra(LibLiteActivity.OUT_LOCATION, -1);
        // Customer closed the wallet without finishing

    } 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 codeMeaningExtras
LIBLITE_REGISTRATION_SUCCESSCustomer finished using the walletOUT_SILENT_REGISTRATION
LIBLITE_USER_CANCELLEDCustomer closed the walletOUT_LOCATION
LIBLITE_ERRORAn error occurredOUT_ERROR_CODE, OUT_LOCATION
📘

Note on OUT_SILENT_REGISTRATION: true means the customer's MSISDN was already registered with a valid card on file and the SDK returned without showing any UI. false means the customer interacted with the UI to add / remove cards.

For the full error reference, see Errors.


What's next

  • Take a paymentPayments
  • Pre-register a card before the first purchasePre-registration
  • Card-management is also available via APICard provisioning (for wallet providers; not typically used by merchants)