#NEWJOSSY
1 messages ยท Page 1 of 1 (latest)
Hi there!
Hello )
Is your question about subscription payments?
Yep
Then I would recommend listening to invoice.failed. Also note that there are some settings in the Stripe dashboard to automatically notify customers of failed payments https://dashboard.stripe.com/settings/billing/automatic
Okay, what if i want to notify user if Payment Intent payment was not successful, currently using them in order to save their payment method
Can you give me more context on your current integration? How are you creating subscriptions?
Sorry, I can't ๐ฆ Don't have access to the corporate account
Okay, in general, if user payment will not be successful. will payment_intent.payment_failed be triggered?
Because as I could saw, even payments for subscriptions have payment_intent Id. Something like: pi_3LzhkCJC6UDy0MXS159QuSb4
๐ taking over for my colleague. Let me catch up.
As I can see from stripe trigger invoice.payment_failed, payment_intent.payment_failed will be triggered
The last row on the screenshot
@lucid ember yes that's true, invoices use PaymentIntents in the background but as my colleague explained when dealing with Subscriptions/Invoices it's better to listen to the invoice.failed event since it will be triggered in regards to the Invoice itself and you will get the Invoice as the event object which is more useful to you
Ok, that's sounds great!)
But theoretically it is possible to use general payment_intent.payment_failed?
yes... but this means that you would need to then retrieve the Invoice from the PaymentIntent object https://stripe.com/docs/api/payment_intents/object#payment_intent_object-invoice and it's another (unnecessary) API call
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
let me know if you need any more help