#jamie_97274

1 messages · Page 1 of 1 (latest)

tropic trellisBOT
burnt breach
#

Hello, to clarify your current flow, are you calling createPaymentMethod and then passing that PaymentMethod ID back to your server to confirm an intent? Or are you simply creating the payment method and attaching it to a Customer?

urban crown
#

So right now I am just gathering information to understand the correct flow, and have no flow now.

All subscription payments are working for all payment methods in some form of a custom setup. I am now building a way for users to change their payment method.

#

What I would like to do is use the same stripe elements I have on the payment form almost, but instead of confirming a paymentIntent (or a setupIntent for iDeal) I would like to create a payment method and attach it to a customer

burnt breach
#

When saving a new PaymentMethod without a payment to be made immediately, you will want to create and confirm a SetupIntent for the customer

#

Taking a quick step back, in general your flow will look like one of these docs when you are creating your subscription:

#

So you will either create the subscription first and then confirm its first PaymentIntent with a PM from your page, or you create a PM from your page and then create the subscription with it

#

Saving a new PaymentMethod has the same basic choice

#

Is that clear/helpful?

urban crown
#

So to be clear in this case a subscription already exists, I just want to create a new payment method and attach it to the customer, in my own backend code I will change the subscription default payment method

#

so for the ECE I am not confirming a payment in this case either

burnt breach
#

Good point, that does not happen automatically. You will need to set it as the default with another API call

burnt breach
urban crown
#

OK so to be clear (as I already in my early dev had to completely rebuild the setup when doing the actual subscription creation with all the different payment methods)

#

I am wondering if the setupIntent works at all, because the next time an automatic payment is made through recurring payment/subscription, on certain situations it will get stuck on requires_action as it will want a 3ds authentication

#

I had that issue with setupIntent in the past already

burnt breach
burnt breach
# urban crown I am wondering if the setupIntent works at all, because the next time an automat...

This can always happen. The bank can request 3DS on any payment, even if your customer has already completed it successfully. The bank is much less likely to request 3DS again if your customer has already completed it, but there is still a chance that they will ask for it, so definitely make sure your integration can handle 3DS being requested like this
https://stripe.com/docs/billing/subscriptions/overview#requires-action

Learn how subscriptions work within Stripe.

urban crown
#

I see so your advice is

#

in our "change payment method" form, to create setupIntents in all cases, and get the payment method from the setupIntent, and attach it to the subscription

burnt breach
#

Yep, exactly

#

Apologies, I do know it is a lot to take in at first

urban crown
#

S'all good, one more question so let's say a future payment or the first payment after changing their payment method has a requires_action status to authenticate, I should notify the user to do so (i.e. via email, as this are off-session recurring payments) - how long does this requires action link stay active?

burnt breach
#

Also note that the "Send a Stripe-hosted link for customers to confirm their payments when required" setting will tell Stripe to automatically send an email out for you for payments that require 3DS

urban crown
#

Ah so stripe can handle this? as in stripe could automatically send the customer an email to authenticate the payment

#

OK that's good to know thank you

burnt breach
#

Yep yep

urban crown
#

okay thank you for now!

#

Sorry one more question @burnt breach

burnt breach
#

Those are included under card at the intent level

urban crown
#

OK thanks