#edoardomistretta_unexpected

1 messages ยท Page 1 of 1 (latest)

echo axleBOT
#

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

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

quick yarrow
vague stirrup
#

hey there, taking a look

#

Bank Transfers require a customer context, so its not currently supported with the deferred intent flow you're using

#

You'll need to create a payment intent first with the customer specified in order to have this included as a payment option

quick yarrow
#

Thank you @vague stirrup for your response. I also suspected that was the issue. However, I'm not fully convinced, as when I create the form using the code below, the bank transfer payment method is displayed correctly, despite lacking the Customer context and without having previously created the Intent.

        mode: 'payment',
        currency: 'eur',
        captureMethod: 'automatic',
        paymentMethodTypes: ['card', 'paypal', 'customer_balance'],
        locale: 'it-IT',
        amount: params.amount,
#

This is how it appears when selected

echo axleBOT
dense lily
#

๐Ÿ‘‹ stepping in as synthrider needs to step away

#

Is there somewhere I could visit to repro this?

#

I believe Bank Transfers will appear if you set customer_balance explicitly via paymentMethodTypes but it won't appear if you are using Dynamic Payment Methods since an integration wouldn't necessarily work without you then specifying a Customer.

quick yarrow
# dense lily Is there somewhere I could visit to repro this?

unfortunately not, it's a private repository. I try to explain the flow my app has: I create Stripe Elements form then, after the customer choice, I get the confirmation token then I provide the confirmation token to my backend. My backend is responsible to create the PaymentIntent with the confirmation token provided by the frontend.

#

It's very strange that Stripe behaves differently when using Dynamic Payment Methods instead of enumerating them explicitly. I also haven't been able to find any documentation that explains why

dense lily
#

Gotcha. Yeah so with Customer Balance since it requires a Customer object it means it isn't supported when using Dynamic Payment Methods + Deferred Intent as that flow it is expected you can just confirm the PaymentIntent with the Confirmation Token (or just confirm client-side) but Customer Balance requires a Customer which would break this experience for users.

#

So unfortunately that would have been a breaking change for users thus it wasn't added.

#

We have an open ticket internally to get our documentation clarified about this.

quick yarrow
#

Thanks, that makes sense. Since I need to move forward with this, I have a question about adding customer_balance to the payment methods types. Up until now, I've only used cards and PayPal with a manual capture method. Adding bank transfer seems to require changing the capture method to automatic, as there appears to be no other choice. Unfortunately, my process needs to remain manual for cards and PayPal. How can I work around this issue? Should I create 2 different forms?

dense lily
#

I'd test that out just to make sure but pretty sure it should work.

quick yarrow
#

Excellent, that's what I needed to know. I didn't realize it was possible to set a capture method on a per-payment-method basis. This means the captureMethod on the frontend needs to be set to automatic to show the bank transfer option, but I'll need to set it to manual when I create the payment intent for cards and PayPal on the backend.

dense lily
#

Yep

quick yarrow
#

that's all @dense lily. Really appreciate your help