#sr_api

1 messages ยท Page 1 of 1 (latest)

peak magnetBOT
#

๐Ÿ‘‹ 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.

sharp galleon
#

Hey there, can you please share an example setup intent ID that you've created this way?

terse abyss
#

seti_1QAW4KH4lFm8CIFn9AG2QWR8

sharp galleon
#

I suggest double checking the code path being executed and verifying the payment method types are getting set like you expect

terse abyss
#

Could you check the second id i sent you as well?

sharp galleon
#

Didn't notice those were different, sure one sec

terse abyss
#

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? ๐Ÿ™‚

sharp galleon
#

Yep, talking to a teammate about this. Bear with me.

terse abyss
#

Thx for the update

sharp galleon
#

Hey can you confirm the version of stripe-ios you're using?

terse abyss
#

23.9.2

sharp galleon
terse abyss
#

Wow, great you found the issue! We'll update to the latest version and check again ๐Ÿ‘๐Ÿป

sharp galleon
#

Sounds good!

terse abyss
sharp galleon
#

Hmm definitely would have expected that to resolve it. Is there any more you can share from your payment sheet config/init code?

terse abyss
#

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)
        }`
peak magnetBOT
terse abyss
#

Also tried to clean the build folder after upgrading the SDK, but still get the issue

sharp galleon
#

Ok, hm. Something else appears to be happening. We're still looking at this.

subtle juniper
#

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?

terse abyss
#

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")

subtle juniper
#

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

terse abyss
#

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