#robertpartfy
1 messages · Page 1 of 1 (latest)
hi @ancient zephyr, aren't PaymentIntents automatically created for Invoices when using Subscriptions, linked to the Subscription's Customer?
Yes, they should be, have you found a place where they are not?
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?
Can you send me an ID of a PaymentIntent that that happened with?
sure thing
PaymentIntents from subscriptions typically should be set up to save the related card I think
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?
Apologies for dropping off this thread for a bit. Looking in to what happened here. Will ping you with what I can find
sure
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...
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
Can you try adding setup_future_usage: off_session to your confirmCardPayment call? https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-data-setup_future_usage
i guess you're referring to the call that uses a new PaymentMethod, right? the one from the top
I think it would make sense to pass it in for both if you want either to save the payment method
well, in the bottom one I already have the PaymentMethod saved
i'm going to try in both
Oh I see. My apologies, you are right, the second one is the only one that needs this param
no worries
i'm trying it out
that worked!!!
thanks a lot, I was going crazy trying to figure out what to do!
Awesome! Glad I could help. Sorry it took a bit
Of course, have a good day!