#sr_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1298271776207405107
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hey there, can you please share an example setup intent ID that you've created this way?
You are in fact not including sepa_debit in the payment method types in the creation request for that setup intent. See the parameters we received here: https://dashboard.stripe.com/test/logs/req_1KkGEso6KHBErm
I suggest double checking the code path being executed and verifying the payment method types are getting set like you expect
Could you check the second id i sent you as well?
Didn't notice those were different, sure one sec
Ok, that one does include sepa: https://dashboard.stripe.com/test/logs/req_tC45q7cflPTYxz
Sorry for the confusion
The 2nd id includes
"payment_method_types": [
"card",
"sepa_debit"
],
This is a screenshot of the payment sheet
Here, the user can only add a credit card, but not the sepa
Are you still checking? ๐
Yep, talking to a teammate about this. Bear with me.
Thx for the update
Hey can you confirm the version of stripe-ios you're using?
23.9.2
Ahhh, support for this was only added in 23.12.0: https://github.com/stripe/stripe-ios/blob/master/CHANGELOG.md#23120-2023-07-31
Wow, great you found the issue! We'll update to the latest version and check again ๐๐ป
Sounds good!
What we did:
- We updated the SDK to 23.32.0
- Uninstall and reinstall the app on iPhone device
- Created new setup intent https://dashboard.stripe.com/test/logs/req_IzOHw6ctXFszzf
But still we're getting the same results (see screenshot)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hmm definitely would have expected that to resolve it. Is there any more you can share from your payment sheet config/init code?
iOS code:
`STPAPIClient.shared.publishableKey = "<key>"
var configuration = PaymentSheet.Configuration()
configuration.returnURL = "<redirect>"
let applePayConfig = PaymentSheet.ApplePayConfiguration(merchantId: "<id>", merchantCountryCode: "DE")
configuration.applePay = applePayConfig
let paymentSheet = PaymentSheet(
setupIntentClientSecret: clientSecret,
configuration: configuration
)
paymentSheet.present(from: viewController) { paymentResult in
// Handle the payment result
switch paymentResult {
case .completed:
print("Setup completed successfully.")
case .canceled:
print("Setup canceled.")
case .failed(let error):
print("Setup failed with error: \(error.localizedDescription)")
}
// Dismiss the payment sheet
viewController.dismiss(animated: true, completion: nil)
}`
Also tried to clean the build folder after upgrading the SDK, but still get the issue
Ok, hm. Something else appears to be happening. We're still looking at this.
Hi there ๐ jumping in as my teammate needs to step away soon. I'm following along with the thread we have going amongst our teammates looking into this.
In the code you shared you have the following:
configuration.returnURL = "<redirect>"
Is that <redirect> string a placeholder you put in while sharing your code, or is that the actual value you're using for your return URL?
It's a placeholder, we do not use it in the actual code
We're currently using something like
configuration.returnURL = "app-name://stripe-redirect"
as we assume that as the payment setup is done within the app via the payment sheet it is not super relevant (and it works for the setup intent with "card")
Card payments don't require a redirect out of your app though, so they aren't sensitive to return URL behavior. There is one other parameter that may be needed here that I'm digging up. While I do, can you confirm that you configured your custom URL scheme?
https://docs.stripe.com/payments/save-and-reuse?platform=ios&mobile-ui=payment-element#set-up-return-url
The other parameter we think could be causing this, is that allowsDelayedPaymentMethods defaults to false:
https://stripe.dev/stripe-ios/stripepaymentsheet/documentation/stripepaymentsheet/paymentsheet/configuration-swift.struct/allowsdelayedpaymentmethods
In case that link doesn't work (we're having some troubles with it internally) it's the first variable listed here in the Instance Properties section:
https://stripe.dev/stripe-ios/stripepaymentsheet/documentation/stripepaymentsheet/paymentsheet/configuration-swift.struct
Regarding your first link, we just added
ContentView() .onOpenURL { url in let stripeHandled = StripeAPI.handleURLCallback(with: url) if (!stripeHandled) { // This was not a Stripe url โ handle the URL normally as you would print("This was not a Stripe url โ handle the URL normally as you would") } }
but no changes in the PaymentSheet yet. Now checking the 2nd link..
Good job!
Adding configuration.allowsDelayedPaymentMethods = true did it.
Now I get the option for SEPA in the payment sheet (see screenshot)
Thank you @subtle juniper
Will test a bit with the sheet, but if there are no more issues you won't hear from me again in this thread. Have a good day