PrimerKlarnaScope manages the Klarna multi-step payment flow: category selection, authorization, and finalization.
Declaration
Properties
| Property | Type | Description |
|---|---|---|
state | AsyncStream<PrimerKlarnaState> | Stream of Klarna state changes |
presentationContext | PresentationContext | .direct or .fromPaymentSelection |
dismissalMechanism | [DismissalMechanism] | Supported dismissal methods |
paymentView | UIView? | Klarna’s native payment view |
Customization
| Property | Type | Description |
|---|---|---|
screen | KlarnaScreenComponent? | Full screen replacement. Signature: (any PrimerKlarnaScope) -> any View |
authorizeButton | KlarnaButtonComponent? | Custom authorize button. Signature: (any PrimerKlarnaScope) -> any View |
finalizeButton | KlarnaButtonComponent? | Custom finalize button. Signature: (any PrimerKlarnaScope) -> any View |
Methods
| Method | Description |
|---|---|
selectPaymentCategory(_ categoryId: String) | Select a Klarna payment category |
authorizePayment() | Start the authorization step |
finalizePayment() | Complete the finalization step |
onBack() | Navigate back |
cancel() | Cancel the Klarna flow |
PrimerKlarnaState
Flow
| Property | Type | Description |
|---|---|---|
step | Step | Current step in the flow |
categories | [KlarnaPaymentCategory] | Available Klarna categories |
selectedCategoryId | String? | Currently selected category |
See also
Scopes overview
All available scopes