Activate the wallet
Guides

Activate the wallet

Run activation when walletOnboarding.progress is incomplete. First check pendingProgress and recover any saved operation using Resume activation after a restart. The SDK presents the required forms and confirms each step with the API. A wallet can exist before PIS is finished, so do not use retrieve as the readiness check.

Activation at a glance

mermaid
flowchart TD
  accTitle: New wallet activation
  accDescr: The SDK selects the outstanding stage and checks server state.
  Bank["Consumer + hosted forms<br/>Link bank account (AIS)"] --> Identity["Consumer + hosted forms<br/>Complete identity/account checks (Griffin)"]
  Identity --> Wallet["SDK + API<br/>Create BaaS account"]
  Wallet --> Consent["Consumer + hosted forms<br/>Approve bank payments (PIS)"]

The SDK skips completed stages; bank or identity checks can remain pending. BaaS account creation is an SDK API call before PIS, rather than another form for your app to build. Returning from a form does not confirm completion. Recover a saved target first after an interrupted flow.

Prerequisites

  • A session from login or applySession.
  • Your ApiContextProvider. Every API read in this flow, including polling and BaaS account creation, uses a fresh proof.
  • Android: a foreground Activity. The library's WalletOnboardingActivity is merged into your manifest.
  • iOS: a visible UIViewController that is not already presenting another controller.
  • One SDK instance kept alive for the whole flow.

Start

val result = sdk.walletOnboarding.start(activity, provider)

The call stays open across steps. A finished step shows a loading overlay until the next form loads. The presentation closes when the flow returns or fails.

Handle the result

when (result) {
    WalletOnboardingProgress.Complete -> showWallet()
    is WalletOnboardingProgress.Needs -> {
        // AIS or PIS still required. Offer "Continue later".
        offerResume(result.step)
    }
    is WalletOnboardingProgress.Griffin -> {
        // state.mode: START, RESUME, VERIFY, PENDING or RETRY
        showRegistrationState(result.state)
    }
}
ResultTypical causeNext action
CompleteAll steps confirmedShow the wallet
Needs(AIS) or Needs(PIS)The form sent finished but the server did not confirm within about 30 secondsOffer to continue; use the recovery guide to select the method
Griffin(state) with startThe Griffin form opened but no registration was confirmed within the windowOffer to resume; resumeRegistration reopens Griffin
Griffin(state) with pendingRegistration under reviewShow a waiting message; resume later
Griffin(state) with resumeThe consumer saved a draftOffer to continue
Griffin(state) with verifyIdentity verification outstandingOffer to continue
Griffin(state) with retryRegistration errored or declinedExplain and offer retry

Handle errors

KindMeaningHandling
CANCELLEDThe consumer closed the formReturn to your screen; offer to try again
ONBOARDING_FAILEDA form reported failure; the next form was not openedShow an error; allow retry
VALIDATION (Android)The device WebView lacks document-start script injection or the web message listenerFall back to a custom WebView adapter or show an unsupported-device message
UNAUTHORIZEDSession expired or invalidSign in again
DEVICE_COMPROMISEDDevice check failedStop the flow
Other API errorsPropagate as thrown errors; the step is not counted as completeRetry when retryable

A malformed or mismatched form message is ignored and the form stays open.

What happens inside the call

  1. The SDK reads AIS consents, the latest registration, PIS consents and wallet accounts.
  2. It opens the form for the first incomplete step, injecting the current session.
  3. The consumer completes the form, including any bank or identity-provider pages.
  4. The form sends finished. The SDK polls the API for up to about 30 seconds.
  5. On a confirmed change the SDK opens the next form, or creates the BaaS account before PIS if none exists.
  6. The call returns Complete, or the step still needed.

Concurrent start calls on one instance are serialised. If the session changes or is cleared mid-flow, the previous session's API work is invalidated and the SDK re-checks the session before opening another form.

Android specifics

  • Camera. The Griffin form may need the camera for identity verification. The SDK requests Android camera permission when the page asks for it and grants the WebView video capture only. Image uploads without capture open the system file picker. A denied permission leaves the form open so it can offer another method. An external HTTPS verification page also asks the user to confirm access for that origin.
  • WebView features. The SDK-owned flow needs document-start script injection and the web message listener. Without them start(activity, provider) throws VALIDATION; the custom adapter path remains available.

iOS specifics

  • The WebView uses a non-persistent data store shared across the steps of the current wallet session. clear replaces it.
  • Pass a view controller that is on screen and not presenting anything else.

Read-only status check

progress(provider) performs the same reads as start without opening a form. Use it to decide whether to show an activation prompt.

val progress = sdk.walletOnboarding.progress(provider)

Verify the activation journey

Follow the stages in order: link the bank (AIS), complete Griffin identity checks, create the BaaS account, then approve payment consent (PIS). The SDK chooses the outstanding step and confirms it against server state; the form's return alone is not confirmation.

For an interrupted flow, restore the session and check the saved target first. Record real bank/identity return behaviour with approved fixtures in the acceptance CSV. The committed form origin remains the development host; production routing still needs confirmation.