#Benoît
1 messages · Page 1 of 1 (latest)
Here is the request where i make the susbscription update : req_zq7PXXI6yd4f0e
And here is the request of the PI confirmation error triggered 5 seconds later : req_kUo0vswv53RHaH
Hi, thank you for sharing the request ids. Taking a look
I'll need to test this on my end. Can you confirm the exact steps please so I can try to reproduce this
I have an active Subscription that contains only one Subscription Item. I also have 2 Stripe test Cards already attached to my customer (one with 3D Secure).
I let my customer chose between his 2 PMs to subscribe a new secondary plan. So i first update my customer default payment method, and after i make a Subscription update (req_zq7PXXI6yd4f0e) on my Subscription, to add the new Subscritpion Item and an element in "add_invoice_items"
What do you mean by 'an element in "add_invoice_items" '?
it's an extra "one-time" item
I see. Testing it now.
🤞
Ok, I see what the issue might be here. On this request to update the Subscription, https://dashboard.stripe.com/test/logs/req_zq7PXXI6yd4f0e you have the default payment method oand "collection_method": "charge_automatically", https://stripe.com/docs/api/subscriptions/update#update_subscription-collection_method. For this reason, the PaymentIntent is automatically charged and succeeded: https://dashboard.stripe.com/test/events/evt_1NUyZ5AYYvne95SHVbpwP2Ms
On that one, I do see it was a client side request to confirm the PaymentIntent: https://dashboard.stripe.com/test/logs/req_kUo0vswv53RHaH. You can look at the Source to see where it came from but as far as I can tell, it's an expplicit request to confirm that PaymentIntent at 2023-07-17 21:02:42.
It's the stripe.confirmPayment() method that do this by itself
After i have added the new Subscription Item, i send the PI client_secret back to client side to call stripe.confirmPayment()
You do not need to send the PI back to the client_side twice.
Ok i see
What are the PI statuses when i would need to send back the client_secret to the client ?
Not when it succeeds, I'd recommend that you read through the PaymentIntent lifecycle here.