#robertpartfy

1 messages · Page 1 of 1 (latest)

rocky micaBOT
narrow hound
#

hi @ancient zephyr, aren't PaymentIntents automatically created for Invoices when using Subscriptions, linked to the Subscription's Customer?

ancient zephyr
#

Yes, they should be, have you found a place where they are not?

narrow hound
#

not exactly

#

why can't I attach a PaymentMethod to a Customer A after being used in a PaymentIntent that is linked to a Subscription's Customer A?

#

shouldn't that be allowed?

ancient zephyr
#

Can you send me an ID of a PaymentIntent that that happened with?

narrow hound
#

sure thing

ancient zephyr
#

PaymentIntents from subscriptions typically should be set up to save the related card I think

narrow hound
#

this is the request where I tried to attach the PaymentMethod to the Customer: req_kYNEp876UxtBuU

#

first of all, what I'm testing is the following:

  • I have a Subscription X for a Customer A. Customer A provided a PaymentMethod that was successfully used to activate X.
  • when X has to be automatically renewed, the initially provided PaymentMethod fails (i.e. insufficient balance).
  • I ask A to provide another PaymentMethod in order to fulfill the Subscription's latest invoice's PaymentIntent.
  • I try to attach the new provided PaymentMethod to the Customer A, and this is the point where it fails (This PaymentMethod was previously used without being attached to a Customer or was detached from a Customer, and may not be used again.).
#

how can I achieve this?

#

I mean, if the Subscription's latest invoice's PaymentIntent is already linked to the Subscription's Customer, why can't I attach this new PaymentMethod to the same Customer?

ancient zephyr
#

Apologies for dropping off this thread for a bit. Looking in to what happened here. Will ping you with what I can find

narrow hound
#

sure

ancient zephyr
#

Hey to quickyl confirm. Are you making this confirm call yourself when confirming the payment intent?

#

As in is this your Stripe.js code that is making the confirm call?

#

I think you have to pass a param specifically to save the payment method here but I am not seeing it where I thought it was in the doc. Still looking...

narrow hound
#

Let me check

#

first I try to confirm the card payment with the existing PaymentMethod to see if it's possible. if it fails then I ask for a different PaymentMethod

ancient zephyr
narrow hound
#

i guess you're referring to the call that uses a new PaymentMethod, right? the one from the top

ancient zephyr
#

I think it would make sense to pass it in for both if you want either to save the payment method

narrow hound
#

well, in the bottom one I already have the PaymentMethod saved

#

i'm going to try in both

ancient zephyr
#

Oh I see. My apologies, you are right, the second one is the only one that needs this param

narrow hound
#

no worries

#

i'm trying it out

#

that worked!!!

#

thanks a lot, I was going crazy trying to figure out what to do!

ancient zephyr
#

Awesome! Glad I could help. Sorry it took a bit

narrow hound
#

better late than never 😉

#

bye and thanks once again

ancient zephyr
#

Of course, have a good day!