Security model
Concepts

Security model

Use this consumer storage and cleanup scope when implementing sign-out and account switching. POS uses separate terminal keys and a retained financial journal.

What the SDK stores on the device

DataAndroidiOSRemoved by
Consumer session (tokens)Encrypted fileKeychainclear, session replacement, device compromise
Local device identityEncrypted fileKeychainNot removed by ordinary clear
Firebase registration tokenIn-memory valueIn-memory valueNot reset by ordinary clear; replaced by a later token update
Pending wallet operationApp-private file excluded from backupKeychainCompletion, explicit cancellation, clear, consumer switch; invalid records are discarded
Wallet-form WebView storageWeb Storage for the form originNon-persistent data storeclear, consumer switch, device compromise
Consumer payment keysProtected Android storageAPI-scoped Keychain account-key vaultSuccessful clear or consumer-change cleanup; compromise cleanup attempts deletion; Android password change also deletes keys
Active payment presentationHCE stateSeparately retained Bluetooth clientAndroid payments.stop(); iOS await bleClient.stop(). iOS backgrounding also cancels exchange
Registration OTP sessionIn memory onlyIn memory onlycreateUser, clearRegistration, process death, device compromise

Cleanup can fail. Do not assume all rows were cleared after an exception; see Sign out and switch consumers.

Data boundaries

  • Your developer private key, public key and certificate stay outside the SDK. It receives the developer ID, nonce and signature for each request.
  • Consumer tokens are stored by the SDK. login does not return them; applySession accepts the token your app already holds.
  • Core public errors use safe messages rather than backend response bodies.
  • Keep secrets out of logs. ApiContext formatting omits the signature; CreateUserRequest formatting prints only the username. Consumer payer/key descriptions redact sensitive material.
  • Never put tokens, OTPs or signatures in hosted-form URLs. The session reaches the form through WebView injection.

Developer key handling

The signing key belongs to your app. Use the installed Android Keystore alias or iOS Keychain tag supplied by your approved provisioning/import process. The minimal repository apps import development files through system pickers; the original complete development starters package credentials in assets or the app bundle. Follow the key path for your chosen example. Import the private key before signing. The SDK receives the resulting signature, not the key.

Delete temporary PEM and DER copies from writable staging or application storage when they are no longer needed. This cleanup does not remove credentials embedded in the distributed app package. A bundled private key remains extractable even after import into Keystore or Keychain.

clear and DEVICE_COMPROMISED do not delete the developer key; your app is responsible for removing superseded key-store entries during credential rotation. Keep development and production keys separate. See Developer key setup and Key rotation.

Device security

The SDK checks for root and jailbreak indicators before login, session installation, token updates and every API attempt, and again before returning results. On detection the operation fails with non-retryable DEVICE_COMPROMISED, the SDK attempts cleanup of its own session and keys, and later protected calls keep refusing. A storage error can stop later cleanup steps; an error does not prove every record was deleted. These are local heuristics, not attestation. See Device security.

Transport

API and hosted-login base URLs must use HTTPS. The registered application callback may use an approved custom scheme, such as myapp://wollette-callback; match it across the app, SDK configuration and login service. Protected API clients do not follow HTTP redirects. Hosted-form messages are accepted only from the form's main frame on the SDK's form origin, and only the active step's callback is recognised.

Your responsibilities

  • Protect the developer private key and the developer id.
  • Protect your own session if you use applySession, and renew it.
  • Stop the flow and show a device error on DEVICE_COMPROMISED; do not retry login in a loop.
  • Call clear on sign-out.
  • Request the camera permission flow correctly on Android when identity verification needs it (the SDK prompts; your app's manifest inherits the permission).
  • Keep key files, PEM and DER artefacts out of source control.
  • Supply credentials through your approved provisioning process; use controlled build storage when packaging development credentials. Never print private keys in application or build logs.

Consumer Bluetooth cleanup

On iOS, clear() deletes consumer account keys first, then clears forms, pending wallet state and the session. A deletion failure can stop later steps. Stop and await the separately constructed Bluetooth client before calling clear.

A successful iOS password change invalidates the current session but does not perform this full cleanup. Your app can stop Bluetooth and call clear explicitly. Keep developer keys, consumer account keys and POS terminal keys distinct.