Is your feature request related to a problem? Please describe.
The ApplePayButtonType enum in pay_ios is missing the .continue case, even though Apple added PKPaymentButtonType.continue in iOS 15. This is the recommended button when the user is enrolling/tokenizing a card for future use rather than completing an immediate purchase (e.g. saving a card on file, setting up a wallet/account for varied future charges).
Without .continue, developers building card-on-file or "add payment method" flows are forced to pick a button whose verb is misleading — buy, checkout, subscribe, etc. all imply something the user isn't actually doing at that step. The only honest fallback today is .plain, which drops the verb entirely.
Describe the solution you'd like
Expose PKPaymentButtonType.continue through the ApplePayButtonType enum. Since continue is a reserved keyword in Dart, the case would need a trailing underscore (or similar):
dart enum ApplePayButtonType { plain, buy, setUp, inStore, donate, checkout, book, subscribe, reload, addMoney, topUp, order, rent, support, contribute, tip, continue_, // new }
On the Swift side, map the new value to PKPaymentButtonType.continue behind an #available(iOS 15.0, *) guard, falling back to .plain on older OS versions:
swift case "continue": if #available(iOS 15.0, *) { return .continue } return .plain
The string sent across the platform channel would be "continue", with the Dart enum case named continue_ purely to avoid the keyword clash.
Describe alternatives you've considered
- Using
ApplePayButtonType.plain — works, but loses the descriptive call-to-action Apple designed for this exact flow.
- Using
ApplePayButtonType.subscribe — only honest when the downstream use is genuinely a fixed subscription with PKRecurringPaymentRequest. Misleading for general card-on-file enrollment.
- Rolling a custom
UiKitView wrapping PKPaymentButton directly — works around the gap but duplicates UI plumbing that pay_ios already provides for every other button type. Not a sustainable long-term answer.
Additional context
Is your feature request related to a problem? Please describe.
The
ApplePayButtonTypeenum inpay_iosis missing the.continuecase, even though Apple addedPKPaymentButtonType.continuein iOS 15. This is the recommended button when the user is enrolling/tokenizing a card for future use rather than completing an immediate purchase (e.g. saving a card on file, setting up a wallet/account for varied future charges).Without
.continue, developers building card-on-file or "add payment method" flows are forced to pick a button whose verb is misleading —buy,checkout,subscribe, etc. all imply something the user isn't actually doing at that step. The only honest fallback today is.plain, which drops the verb entirely.Describe the solution you'd like
Expose
PKPaymentButtonType.continuethrough theApplePayButtonTypeenum. Sincecontinueis a reserved keyword in Dart, the case would need a trailing underscore (or similar):
dart enum ApplePayButtonType { plain, buy, setUp, inStore, donate, checkout, book, subscribe, reload, addMoney, topUp, order, rent, support, contribute, tip, continue_, // new } On the Swift side, map the new value to
PKPaymentButtonType.continuebehind an#available(iOS 15.0, *)guard, falling back to.plainon older OS versions:
swift case "continue": if #available(iOS 15.0, *) { return .continue } return .plain The string sent across the platform channel would be
"continue", with the Dart enum case namedcontinue_purely to avoid the keyword clash.Describe alternatives you've considered
ApplePayButtonType.plain— works, but loses the descriptive call-to-action Apple designed for this exact flow.ApplePayButtonType.subscribe— only honest when the downstream use is genuinely a fixed subscription withPKRecurringPaymentRequest. Misleading for general card-on-file enrollment.UiKitViewwrappingPKPaymentButtondirectly — works around the gap but duplicates UI plumbing thatpay_iosalready provides for every other button type. Not a sustainable long-term answer.Additional context
.plain.PKPaymentButtonTypecase currently missing frompay_ios. After adding it, the enum will be at parity with the native API.