#lil-subscription-retry

1 messages · Page 1 of 1 (latest)

molten graniteBOT
drowsy jasper
#

@ruby pewter what have you tried?

ruby pewter
#

The scenario is a user creates a subscription, attaches a bank account payment method that after processing fails. We then force the user to update the payment method to something else (using a setup_intent to create a new payment method, then updating the default_payment_method on the subscription) after the sub has a new PM I 'd like to try to recollect

drowsy jasper
#

Yeah you're doing it wrong. that Subscription has an Invoice that failed payment right? So you would use that Invoice's PaymentIntent to collect new payment method details as part of the payment attempt for that Invoice

#

lil-subscription-retry

ruby pewter
#

I'm also trying to handle the scenario where a user comes in later (on a succesfully paid sub) and wants to change PMs. The above would be the proper flow there ,right?

#

Is it possible that after they add a new PM if the sub is in an unpaid state that we then try to collect on the payment intent server side w/ the new pm_id?

#

?

drowsy jasper
#

yeah SetupIntent is the right way if you collect anew PM for a future Invoice

#

(and then you make that PM the default PM)

ruby pewter
#

Is it possible to take the new pm after it's been created via a setup intent and use it to try to collect the failed invoice?

#

I'd prefer not to create 2 completely separate processes, but rather to check if the sub is unpaid when a new pm is attached and if it is retry the invoice w/ that new pm

drowsy jasper
#

It's highly discouraged

#

since you might have to do 3DS twice for example