Payment methods
Every method goes through the same two calls, checkout.paymentElement(for:listener:) and element.submit(), as in getting started. One guide per method says what differs: the SPM product and project setup it needs (products, entitlements, URL schemes, dashboard configuration), what its element renders, what submit() does, and its failure modes.
| Method | Product | Project setup | Element |
|---|---|---|---|
| Card (Purse vault) | PurseHeadlessCheckout | none | Secure card form, your Pay button |
| Apple Pay | PurseCheckoutApplePay | In-App Payments entitlement, a merchant identifier | PKPaymentButton, self-submitting |
| PayPal | PurseCheckoutPayPal | not documented yet | Branded button, self-submitting |
| Klarna | PurseCheckoutKlarna | a URL scheme, and an appReturnURL per element | Native widget, your Pay button |
| Redirection methods | PurseHeadlessCheckout | a RedirectPresenter and its RedirectPolicy | Nothing, your Pay button; the PSP page is the step |
| Gift cards and co-payment | PurseHeadlessCheckout | none | Your own PAN and CVV fields |
| Saved cards and accounts | PurseHeadlessCheckout (+ PurseCheckoutPayPal for PayPal accounts) | A wallet session in the client session | CVV field when required, else nothing |
Pin one version for every product: they release together.
paymentMethods lists methods only. Saved cards and saved PayPal accounts are on paymentTokens, saved gift cards on savedSecondaryTokens. A method list built from paymentMethods alone silently misses every saved instrument.
Linking a product is not installing it
Your Swift packages decide what the app can render; the client session decides what is offered. A partner activated in your Purse dashboard is offered to the app whether or not its product is linked. iOS has no ServiceLoader, so linking is not enough either: each partner product must be installed once, before you build a checkout.
PluginRegistry.shared.install(ApplePayModule(configuration: ApplePayConfiguration(
merchantIdentifier: "merchant.com.example.store",
merchantName: "Example Store"
)))
PluginRegistry.shared.install(PayPalModule())
PluginRegistry.shared.install(KlarnaModule())
Card and redirection methods are built in and never installed. Without the matching install(_:), the method is still listed, paymentElement(for:) returns an element that fails on submit, and the outcome is PaymentOutcome.failed with METHOD_NOT_IMPLEMENTED:
no plugin registered for paypal-wallet — install the partner product that provides it
Add the product and install its module, or hide the method in this build, scoped to the checkout instance:
let checkout = try PurseHeadlessCheckout(
widgetData: widgetData,
disabledMethods: [MethodKey(partner: .paypal, method: .wallet)]
)
What the iOS SDK renders
Cards vaulted by Purse, three native partner SDKs (Apple Pay, PayPal, Klarna) and every method in redirection mode. PSP-hosted card forms that live in a browser have no native counterpart. The full comparison with the web SDK is the Supported payment methods table.