#mason-00_unexpected

1 messages ยท Page 1 of 1 (latest)

topaz carbonBOT
#

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

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

thick ravine
#

hello! fyi a couple questions just came in at the same time but i will get to you as soon as posible

gleaming axle
#

Thank you!

thick ravine
#

just checking, which SDK are you using?

gleaming axle
#

The community Flutter stripe package, which is using the iOS SDK version 24.7

thick ravine
#

gotcha. FYI we don't directly support the flutter stripe package so depending on where this goes it might get a little challenging, but i think we can maybe still answer the core of your question. gimme a bit to dig around

gleaming axle
#

Any insight you can provide would be helpful!

thick ravine
#

ok digging around a bit, i think we do require a customer ID and ephemeral secret. for some reason i'm having a hard time finding the public docs on this, and my memory here is a little fuzzy ๐Ÿ˜…

#

assuming for now that this is a requirement, can you explain more about why this is a blocker for you? i'm still wrapping my head around this part:

Unfortunately, we cannot use this workaround as we need to control whether the user can delete their payment methods.

gleaming axle
#

Haha, no worries! For some context, our use case requires us to control when users can delete their payment methods. Think of our platform like Airbnb for this example. Since we, as the platform, need to manage incidental charges, we essentially 'lock' a card after a booking for 60 days.

This just allows time for 'hosts' to submit any claims, and if we find them legitimate, we would charge the customer's payment method they used for the booking. So, because passing the ephemeral secret and customer ID allows the payment sheet by default to manage and delete payment methods, we cannot allow the functionality.

So on our web application, we use the payment form, which is controlled by the customer session, from which we can enable this functionality. But in the mobile app, it isn't respecting the customer session options in the same way.

thick ravine
#

ok, i've been poking around in docs for a bit but this is pushing the bounds of my current mobile stripe dev knowlege, so i've asked my colleague to jump in

stiff apex
#

Hi ๐Ÿ‘‹

So I was going to suggest using the Customer Session in the Payment Sheet like we describe here but it sounds like that isn't working for you as you expect

#

I want to make clear that, when used with the Payment Sheet, the payment methods need to be saved on that particular mobile device in order to appear as options.

#

It's not quite the same as when you use the allow_redisplay option with Checkout Sessions

gleaming axle
#

Wouldn't the payment method be saved to the customer?

stiff apex
#

If you save a Payment Method on the web, it will not appear in the Payment Sheet

#

It does not just check the PMs associated with the customer. They need to saved using the Payment Sheet

gleaming axle
#

When I use the payment sheet with the ephemeral key and customer ID, it displays and allows management of payment methods added to the customer from the web payment sheet. I haven't seen an issue with saving cards between platforms

stiff apex
#

Can you explain more thoroughly what you mean by this?

But in the mobile app, it isn't respecting the customer session options in the same way.

gleaming axle
#

Yeah sure.

Here is the code when creating a customer session:


session := &stripe.CustomerSessionParams{
            Customer: stripe.String(user.StripeCustomerID),
            Components: &stripe.CustomerSessionComponentsParams{
                PaymentElement: &stripe.CustomerSessionComponentsPaymentElementParams{
                    Enabled: stripe.Bool(true),
                    Features: &stripe.CustomerSessionComponentsPaymentElementFeaturesParams{
                        PaymentMethodRedisplay: stripe.String("enabled"),
                        PaymentMethodAllowRedisplayFilters: []*string{
                            stripe.String("always"),
                            stripe.String("limited"),
                            stripe.String("unspecified"),
                        },
                        PaymentMethodRedisplayLimit: stripe.Int64(5),
                        PaymentMethodRemove: stripe.String("disabled"),
                    },
                },
            },
        }

So, in the web payment element, this shows saved payment, but does not allow deleting of those payment methods.

So I was assuming that the mobile SDK would allow for customer sessions in a similar way. But with this configuration, no saved payments are displayed.

stiff apex
#

So I was assuming that the mobile SDK would allow for customer sessions in a similar way.

Sadly I don't think that is a safe assumption

#

It can take a while before features reach parity between web and mobile SDKs

gleaming axle
#

Well, this is pretty funny. Is there anyway I could apply for the preview?

stiff apex
#

Hmmmm.... ๐Ÿค”

For private previews we usually reach out to individual merchants to see if they would like to test this functionality. The best way to express your interest would be to write into Support here: https://support.stripe.com/contact and ask about getting access to this preview.

It's up to the team developing this feature

topaz carbonBOT
gleaming axle
#

Gotcha. Thank you for your help!

#

Outside of applying for the preview, is there any recommendation for how I can achieve the functionality we're looking for?

stiff apex
#

Use the payment sheet with a Customer Session to create/save the payment methods. That would allow them to be redisplayed.

#

Alternatively, you could redirect your customers to a Checkout Session in your mobile app. We just added a new parameter origin_context to identify where the Customer is coming from (web or mobile app) to optimize the styling of the Checkout UI.

gleaming axle
#

Great, I'll look into that further! Thank you very much for your help.