Understanding Flows
In WHITELABEL SDKs, payment flows and enrollment flows are separate. Payment is the process of completing a transaction. Enrollment is the process of saving a payment method (for example, a card) to a customer’s account for future use. This page explains both flows at a high level with diagrams and step sequences. Use the Quickstart guide and platform flow pages (Web, iOS, Android) for implementation details.
Payment flow
The SDK provides a unified payment experience: customers complete transactions using multiple payment methods within a single integration. The diagram below illustrates the main payment workflow.
Payment flow steps
- Merchant Server:
Create Customer→ WHITELABEL Server:Creates Customer - Merchant Client:
Initiate Checkout→ Merchant Server:Create Checkout session - Merchant Server:
Create Checkout session→ WHITELABEL Server:Creates Checkout session - Merchant Client:
Initiate Checkout→Initiate SDKto continue payment flow - Merchant Client:
Initiate SDKto continue payment flow → WHITELABEL SDK:Receive checkout session - WHITELABEL SDK:
Receive checkout session→List payment methods - WHITELABEL SDK:
List payment methods→ User selects payment methods - WHITELABEL SDK: User selects payment methods → Callback with the
one-time token - WHITELABEL SDK: Callback with the
one-time token→ Merchant Client: Receiveone-time token(single use) - Merchant Client: Receive
one-time token(single use) →Initiate payment - Merchant Client:
Initiate payment→Initiate SDKto continue payment flow - Merchant Client:
Initiate SDKto continue payment flow → WHITELABEL SDK:Continue with the payment flow - WHITELABEL SDK:
Continue with the payment flow→ Show screen for the user to complete payment - WHITELABEL SDK: Show screen for the user to complete payment → Display
payment result(optional) - Merchant Client:
Initiate payment→ Merchant Server:Create payment - Merchant Server:
Create payment→ WHITELABEL Server:Creates paymentin the payment provider
Payment flow using a vaulted token
If a customer has an enrolled payment method, they can use a vaulted token to pay without entering payment details again.
Vaulted token flow steps
- Merchant Client:
Initiate checkout→ Merchant Server:Create Customer - Merchant Server:
Create Customer→ WHITELABEL Server:Create Customer - Merchant Client:
Initiate SDKwith thecheckout session→ WHITELABEL SDK:Receive checkout session - WHITELABEL SDK:
Receive checkout session→List payment methods - WHITELABEL SDK:
List payment methods→ User selects payment methods - WHITELABEL SDK: User selects payment method → Callback with the
one-time token - WHITELABEL SDK: Callback with the
one-time token→ Merchant Client:Initiate payment - Merchant Client:
Initiate payment→ Merchant Server:Create payment - Merchant Server:
Create payment→ WHITELABEL Server:Creates paymentin the payment provider - Merchant Client: Show
payment result→ Merchant Server:Receive payment result - Merchant Server:
Receive payment result→ WHITELABEL Server: Providespayment result
Enrollment flow
Enrollment is the process of saving a payment method (e.g. a card) to a customer’s account so it can be used later (e.g. with a vaulted token). full-checkout supports enrollment; the diagram below describes the enrollment workflow.
Enrollment flow steps
- Merchant Server:
Create Customer→ WHITELABEL Server:Creates Customer - Merchant Client:
Add payment method→ Merchant Server:Create customer session - Merchant Server:
Create customer session→ WHITELABEL Server:Creates customer session - Merchant Client:
Display payment methods to enroll→ Merchant Server:Request available payment methods to enroll - Merchant Server:
Request available payment methods to enroll→ WHITELABEL Server:Returns available payment method - Merchant Client:
Display payment methods to enroll→ Merchant Client: User selects payment method to enroll - Merchant Client: User selects payment method to enroll → Merchant Client:
Initiate enrollment - Merchant Client:
Initiate enrollment→ Merchant Client:Initiate SDKto continue enrollment - Merchant Client:
Initiate SDKto continue enrollment → WHITELABEL SDK:Continue enrollment flow - WHITELABEL SDK:
Continue enrollment flow→ WHITELABEL SDK: Shows screens for the user to complete enrollment - Merchant Server: Receive
enrollment resultvia webhook → WHITELABEL Server: Receiveenrollment resultsfrom payment provider - WHITELABEL Server: Receive
enrollment resultsfrom payment provider → WHITELABEL SDK: Displayenrollment result(optional)
Headless SDK flow
The Headless SDK provides maximum flexibility by allowing you to manage the entire user interface while WHITELABEL handles the complex payment logic and security (like 3DS).
Headless flow steps
- Merchant Server:
Create Customer→ WHITELABEL Server:Creates Customer - Merchant Client:
Initiate Checkout→ Merchant Server:Create Checkout session - Merchant Client:
Collect Information→ User enters card/payment details in your custom UI. - Merchant Client:
Generate Token→ WHITELABEL SDK: CallgenerateToken(details)to receive aone-time token. - Merchant Client:
Process Payment→ Merchant Server: Sendone-time tokento your backend. - Merchant Server:
Create Payment→ WHITELABEL Server: Call Create Payment API. - Merchant Client:
Handle Actions→ If API response returnssdk_action_required: true, use the SDK to handle 3DS or other Payment Actions.