#magius_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/1296780700766441574
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Yeah according to this https://docs.stripe.com/payments/payment-methods/payment-method-support?locale=en-GB#bank-redirects-api-support:~:text=Bancontact-,bancontact,-Yes:
1 Cards and bank debit methods including SEPA debit, AU BECS direct debit, and ACSS debit support both on_session and off_session with setup future usage. All other payment method types either donโt support setup_future_usage or only support off_session.
So iDeal/bancontact support just off_sesison and not on_session
Thank you for confirming - I didn't know what that note was telling me since other docs https://docs.stripe.com/payments/bancontact/set-up-payment?locale=en-GB talk about using one to set up the other
Since it's expected than bancontact wouldn't show for a PaymentIntent with on session future usage, what's the right way to handle this? Should we always use off session future usage? Should we avoid updating the PaymentIntent to set the usage until the user's ready to pay?
In general, you should update the PaymentIntent according to the needed scenario and the payment Element will adapt and display the available options.
Is there a best practice around the case where the user is making a decision about saving the method or not?
We're not sure if the future usage will be 'none' or something else because the user decides that - but we know that, if they are going to save the method, it'll only be needed on session
I'm worried that it'll confuse people to have the available options change suddenly when they check a box - but we could maybe fix that by not updating the PaymentIntent immediately
You can configure s_f_u on a per PM basis, so maybe you only set it for PMs that support it (like cards) on the intent for example: https://docs.stripe.com/api/payment_intents/create#create_payment_intent-payment_method_options-card-setup_future_usage
We create just the one PaymentIntent for the checkout flow (i.e. a new intent per user per checkout) which in this market includes options for Card, Bancontact, and iDEAL. If paying by card, we show the checkbox to allow users to save the card for later. Once the checkbox is ticked, bancontact and iDEAL disappear (as expected) because we update the intent immediately
Is it good practice to create multiple intents here? One for card, and one for the rest which doesn't support on session future usage?
Did you read the parameter I just shared you? If the user ticks the box to save the PM, then instead of instead of updating the top-level s_f_u parameter on the intent (which will disable any PMs that don't support it) update the card specific s_f_u parameter
That's the parameter I shared above
Equally, we just released functionality to support all this natively not long ago: https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements#save-payment-methods
oh I'm sorry - my brain didn't register the difference when I looked at it ๐ฆ
I understand how this can help me now, so I'm happy to go away and try it out
np, let me know how you get on
Quick update - it's going to take a little longer to check this because of other flows that use the same logic in our BE
If it's easier on your side I'm happy to carry on with this, and raise a new q if I run into any other problem (though I'm quietly confident you've given me just what I needed). Otherwise I'll feed back here soon as I can
Thank you both for your help ๐