-
Couldn't load subscription status.
- Fork 1k
Open
Labels
kind:bugkind:improvementtriagedIssue has been reviewed by Stripe and is being tracked internallyIssue has been reviewed by Stripe and is being tracked internally
Description
Summary
I'm migrating from Stripe 23.x to 24.x. In the app, we had the option to modify user payment methods using STPPaymentOptionsViewController without making a payment. I have updated it to PaymentSheet.FlowController. The user can add new payment methods or modify existing ones there; however, the results are not being saved. Am I doing it correctly, or is there a better way to handle it without making a payment?
Code to reproduce
var config = PaymentSheet.Configuration()
config.merchantDisplayName = "company_name"
config.customer = .init(id: intentData.userId, ephemeralKeySecret: intentData.secret)
config.returnURL = "return_url"
config.allowsPaymentMethodsRequiringShippingAddress = true
let intent = PaymentSheet.IntentConfiguration(mode: .setup(currency: "USD", setupFutureUsage: .offSession), confirmHandler: { _, _, intentCreationCallback in
handleConfirm(intentCreationCallback)
})
PaymentSheet.FlowController.create(intentConfiguration: intent, configuration: config) { result in
switch result {
case .failure(let error):
controller.showAlert(title: "Sorry", message: error.localizedDescription)
case .success(let paymentSheetFlowController):
paymentSheetFlowController.presentPaymentOptions(from: controller)
}
}
iOS version
16, 17, 18
Installation method
SPM
SDK version
24.16.2
Metadata
Metadata
Assignees
Labels
kind:bugkind:improvementtriagedIssue has been reviewed by Stripe and is being tracked internallyIssue has been reviewed by Stripe and is being tracked internally