Add Pay by Bank support#6238
Conversation
StripePaymentsPublic API+ @objc get
+ get
+ get
+ @objc convenience public init(payByBank: StripePayments.STPPaymentMethodPayByBankParams, billingDetails: StripePayments.STPPaymentMethodBillingDetails?, metadata: [Swift.String : Swift.String]?)
+ @objc deinit
+ @objc deinit
+ @objc override dynamic public init()
+ @objc override dynamic public var description: Swift.String {
+ @objc public class func decodedObject(fromAPIResponse response: [Swift.AnyHashable : Any]?) -> Self?
+ @objc public class func propertyNamesToFormFieldNamesMapping() -> [Swift.String : Swift.String]
+ @objc public class func rootObjectName() -> Swift.String?
+ @objc public var additionalAPIParameters: [Swift.AnyHashable : Any]
+ @objc public var allResponseFields: [Swift.AnyHashable : Any] {
+ @objc public var bank: Swift.String?
+ @objc public var payByBank: StripePayments.STPPaymentMethodPayByBank? {
+ @objc public var payByBank: StripePayments.STPPaymentMethodPayByBankParams?
+ case payByBank
+ }
+ }
+ }
+@objc @_hasMissingDesignatedInitializers public class STPPaymentMethodPayByBank : ObjectiveC.NSObject {
+@objc @_inheritsConvenienceInitializers public class STPPaymentMethodPayByBankParams : ObjectiveC.NSObject, StripePayments.STPFormEncodable {
+}
+}If you are adding a new public API consider the following:
If you are modifying or removing a public API:
If you confirm these APIs need to be added/updated and have undergone necessary review, add the label ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with |
Updated version bump to MINOR and added new features.
Removed duplicate section for pending release and updated version bump.
| // Skip unknown and wero (private preview, not yet recognized by /v1/elements/sessions) | ||
| guard type != .unknown, type != .wero else { return partialResult } | ||
| // Skip unknown, wero, and pay_by_bank (private preview, not yet recognized by /v1/elements/sessions) | ||
| guard type != .unknown, type != .wero, type != .payByBank else { return partialResult } |
There was a problem hiding this comment.
nit: Let's make a list of PMs that should be excluded here now that we have more than 1.
| } | ||
| }, | ||
| { | ||
| "type": "pay_by_bank", |
There was a problem hiding this comment.
do we actually need this entry in the form specs? I don't think we should use LUXE specs for new LPMs.
There was a problem hiding this comment.
This LPM has no input fields, so either we have this entry in the form specs or we add a case in PaymentSheetFormFactory.make that just returns an empty FormElement; otherwise, we hit the stpAssertionFailure that it's missing form specs. I don't see any other LPMs returning the empty FormElement, so I thought it made sense to keep an entry here, copied from https://stripe.sourcegraphcloud.com/r/stripe-internal/mint/-/blob/pay-server/lib/lpm_ui_platform/private/specs/pay_by_bank.json
| return "<\(props.joined(separator: "; "))>" | ||
| } | ||
|
|
||
| // MARK: - STPAPIResponseDecodeable |
There was a problem hiding this comment.
Nit: STPAPIResponseDecodeable -> STPAPIResponseDecodable (extra 'e'). This typo exists in several other LPM files too, so not blocking.
| expand: ["payment_method"] | ||
| ) { paymentIntent, _ in | ||
| XCTAssertNotNil(paymentIntent?.paymentMethod?.allResponseFields["pay_by_bank"]) | ||
| let payByBankJson = try? XCTUnwrap(paymentIntent?.paymentMethod?.payByBank?.allResponseFields) |
There was a problem hiding this comment.
try? XCTUnwrap(...) silently swallows failures — XCTUnwrap should be used with try (not try?) so the test fails with a useful message if payByBank is nil. (Same issue exists in the Wero test, but let's not copy it
forward.)
…nto joyceqin/pay-by-bank
|
✅ Dead code has been resolved in this PR. [find-dead-code] |
Summary
Add Pay by Bank support
Motivation
Add Pay by Bank support
Testing
Unit tests
Simulator.Screen.Recording.-.iPhone.12.mini.-.2026-04-10.at.10.43.13.mov
Simulator.Screen.Recording.-.iPhone.12.mini.-.2026-04-10.at.10.41.39.mov
Changelog