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
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
loginorapplySession. - Your
ApiContextProvider. Every API read in this flow, including polling and BaaS account creation, uses a fresh proof. - Android: a foreground
Activity. The library'sWalletOnboardingActivityis merged into your manifest. - iOS: a visible
UIViewControllerthat is not already presenting another controller. - One SDK instance kept alive for the whole flow.
Start
val result = sdk.walletOnboarding.start(activity, provider)let result = try await sdk.startWalletOnboarding(
presenting: viewController,
provider: 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)
}
}switch result {
case .complete:
showWallet()
case .needs(let step):
// AIS or PIS still required. Offer "Continue later".
offerResume(step)
case .griffin(let state):
// state.mode: .start, .resume, .verify, .pending or .retry
showRegistrationState(state)
}| Result | Typical cause | Next action |
|---|---|---|
Complete | All steps confirmed | Show the wallet |
Needs(AIS) or Needs(PIS) | The form sent finished but the server did not confirm within about 30 seconds | Offer to continue; use the recovery guide to select the method |
Griffin(state) with start | The Griffin form opened but no registration was confirmed within the window | Offer to resume; resumeRegistration reopens Griffin |
Griffin(state) with pending | Registration under review | Show a waiting message; resume later |
Griffin(state) with resume | The consumer saved a draft | Offer to continue |
Griffin(state) with verify | Identity verification outstanding | Offer to continue |
Griffin(state) with retry | Registration errored or declined | Explain and offer retry |
Handle errors
| Kind | Meaning | Handling |
|---|---|---|
CANCELLED | The consumer closed the form | Return to your screen; offer to try again |
ONBOARDING_FAILED | A form reported failure; the next form was not opened | Show an error; allow retry |
VALIDATION (Android) | The device WebView lacks document-start script injection or the web message listener | Fall back to a custom WebView adapter or show an unsupported-device message |
UNAUTHORIZED | Session expired or invalid | Sign in again |
DEVICE_COMPROMISED | Device check failed | Stop the flow |
| Other API errors | Propagate as thrown errors; the step is not counted as complete | Retry when retryable |
A malformed or mismatched form message is ignored and the form stays open.
What happens inside the call
- The SDK reads AIS consents, the latest registration, PIS consents and wallet accounts.
- It opens the form for the first incomplete step, injecting the current session.
- The consumer completes the form, including any bank or identity-provider pages.
- The form sends
finished. The SDK polls the API for up to about 30 seconds. - On a confirmed change the SDK opens the next form, or creates the BaaS account before PIS if none exists.
- 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)throwsVALIDATION; 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.
clearreplaces 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)let progress = try await sdk.walletOnboarding.progress(provider: 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.