#gabgab_paymentelement-setupfutureusage-paymentmethods
1 messages ยท Page 1 of 1 (latest)
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.
- gab-gab_api, 3 days ago, 20 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1252289458972262482
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hi ๐
What do you mean by "changes it's payment method"? Do you mean you are creating a new Payment Method object for the Customer?
I'm using the Stripe Payment Element, so when the user will click on card, click on Twint etc
Are you saving payment methods when you do this?
Like we describe in this doc: https://docs.stripe.com/payments/save-during-payment ?
Currently I was saving it systematically but I was using card only.
Now I want to add Twint
If you want to save a payment method to be charged later then you need to include the setup_future_usage parameter. If you want your customers to enter their payment method details each time, you do not.
My point is this parameter is filtering eligible payment method that are shown on the widget
Twint does not support off-session payments so you cannot save the payment method prior to making a payment with Twint: https://docs.stripe.com/payments/twint
My target is to set setup_future_usage:true when the user will select the card, on to set setup_future_usage:undefined when he will select Twint. Then I guess I have to create the payment intent on the server before confirm the payment with this value.
That being said how should I handle the setup_future_usage parameter when I initialize Stripe Elements ?
It may be possible but this would be somewhat error prone.
You could instantiate you elements without specifying setupFutureUsage and this would display Twint as an option. Then, if the user selects a card payment method, you could upate the elements isntance with setupFutureUsage: "off_session".
This would hide Twint as an option so the customer could not switch back but it would allow you to present both.
Isn't there "good" pattern to mix payment methods supporting/not supporting setup_future_usage ?
Not that I am aware of currently.
Ok the fact the payment methods would not be static for the user and couldn't be reverted to the original state is kind a no go :).
Is there any UI widget to display on its own Twint as an independant widget?
Unfortunately not that I know of. We only recently added support for Twint and this appears to be a rough edge. I can flag support for both in same Payment Element as a feature request.
OK thanks it could help. But is there only this Twint payment method that would not support setupFutureUsage? My issue seems more generic: mixing payment method that support it with other that doesn't
I'm not aware of a specific set of payment methods that would be blocked by setupFutureUsage but we are adding payment methods pretty fast and I think it would be a good thing to support in general.
Just to be sure, could you please just confirm currently I can only support Twint (client side) using the Payments element? Isn't there any other alternative, (almost) whatever codes it would imply client side?
The only other alternatives would be involving Checkout. And the payment page for Stripe Checkout uses the Payment Element. We don't have a separate element that could be used to render just Twint.
Is there anywhere I can follow your flag or it is just an internal backlog?
You can write in to Support to ask about support for both types of payment method and they should be able to find the internal ticket and keep you updated if/when it gets selected for development.
ok thanks for help
Okay, feedback filed
thanks
Happy to offer what help I can ๐