PrimerPaymentMethodSelectionScope manages the payment method list, selection, and vaulted payment methods.
Declaration
Properties
State
| Property | Type | Description |
|---|---|---|
state | AsyncStream<PrimerPaymentMethodSelectionState> | Stream of selection state changes |
dismissalMechanism | [DismissalMechanism] | Supported dismissal methods |
selectedVaultedPaymentMethod | VaultedPaymentMethod? | Currently selected vaulted method |
Customization
| Property | Type | Description |
|---|---|---|
screen | PaymentMethodSelectionScreenComponent? | Full screen replacement. Signature: (PrimerPaymentMethodSelectionScope) -> any View |
paymentMethodItem | PaymentMethodItemComponent? | Custom payment method row. Signature: (CheckoutPaymentMethod) -> any View |
categoryHeader | CategoryHeaderComponent? | Custom section header. Signature: (String) -> any View |
emptyStateView | Component? | Shown when no methods are available |
Methods
| Method | Description |
|---|---|
onPaymentMethodSelected(paymentMethod:) | Select a payment method to proceed |
cancel() | Cancel the selection |
payWithVaultedPaymentMethod() | Pay with the selected vaulted method |
payWithVaultedPaymentMethodAndCvv(_ cvv: String) | Pay with vaulted method using CVV |
updateCvvInput(_ cvv: String) | Update CVV input for vaulted method |
showAllVaultedPaymentMethods() | Expand the vaulted methods list |
showOtherWaysToPay() | Show additional payment methods |
PrimerPaymentMethodSelectionState
| Property | Type | Description |
|---|---|---|
paymentMethods | [CheckoutPaymentMethod] | All available payment methods |
isLoading | Bool | Loading state |
selectedPaymentMethod | CheckoutPaymentMethod? | Currently selected method |
filteredPaymentMethods | [CheckoutPaymentMethod] | Methods matching search query |
error | String? | Error message |
requiresCvvInput | Bool | Whether selected vault method needs CVV |
isCvvValid | Bool | CVV validation state |
See also
Display saved methods
Work with vaulted payment methods
Layout customization
Customize the checkout layout