Loading...
Mobile SDKiOS

Alternate flows

Skip steps in the checkout flow using hints, save a bank selection for returning users, and implement a two-step picker-then-payment flow.


Standalone institution picker

Some use cases (e.g. a wallet top-up) benefit from letting the user pick a bank once and reusing that selection for future payments. Use institution(for:hints:) to run the bank picker independently of a payment.

// Let user pick their bank
let result = await checkout.institution(for: .EUR)

if case .institutionSelected(let institution) = result {
    // Store institution for later use
    self.savedInstitution = institution
}

On the next payment, pass the saved institution as a hint to skip the picker entirely:

let result = await checkout.payment(with: intent, hints: .useInstitution(savedInstitution))

Hints

Both payment(with:hints:) and institution(for:hints:) accept an optional CheckoutHints value to skip steps in the flow, making it quicker for users to complete a payment.

// Skip country selection - open directly on a specific country's banks
let result = await checkout.payment(with: intent, hints: .useDefaultCountry(Country(.poland)))
let result = await checkout.payment(with: intent, hints: .useDefaultCountry(Country("GB")))

// Skip institution selection entirely - use a previously chosen bank
let result = await checkout.payment(with: intent, hints: .useInstitution(savedInstitution))

// No hints - full flow including country and institution selection
let result = await checkout.payment(with: intent, hints: .none)
// or just omit the parameter:
let result = await checkout.payment(with: intent)

Country accepts any ISO 3166 alpha-2 code or a Locale.Region value.

Agreement clause

Whenever .useInstitution() hint is used, the user is taken directly to payment creation, skipping the view that displays terms and conditions. In this case you must display Volt's agreement clause before the user initiates a payment.

The SDK provides the text as a ready-to-use AttributedString:

Text(VoltCheckout.AgreementClause.attributedText)
    .multilineTextAlignment(.center)
    .tint(.accentColor)

The text includes tappable links to Volt's Terms and Conditions and Privacy Policy. Display it near your payment button.

Two-step flow: picker then payment

If your UI needs to show the selected bank before the user confirms payment, use institution first, then payment:

@State var selectedInstitution: Institution?

// Step 1: let the user pick a bank (no payment created)
func selectBank() async {
    let result = await checkout.institution(for: .EUR, hints: .useDefaultCountry(Country(.germany)))
    if case .institutionSelected(let inst) = result {
        selectedInstitution = inst
    }
}

// Step 2: when the user taps Pay, skip straight to authorisation
func pay() async {
    guard let institution = selectedInstitution else { return }

    let result = await checkout.payment(with: intent, hints: .useInstitution(institution))

    switch result {
    case .paymentCreated(let id, let status, _):
        handlePayment(id: id, status: status)
    case nil:
        break
    default:
        break
    }
}

The same VoltCheckout instance handles both calls. You do not need two instances.

How is this guide?

Last updated on

On this page