#m4rt1ns_1993
1 messages · Page 1 of 1 (latest)
Hello 👋
I don't believe that's possible, what's the usecase?
So, I have an application where users can generate reports. A user has one annual report for free included on the annual subscription. If a users wants to generate more than one report per year, and the payment for the second report is declined i don't want to block the application. However if the renewing of the annual subscription is declined, I need to block the application.
The payment_intent,payment_failed event is triggered when a payment gets declined. I wanted to add a metadata field, in case the payment for the second report is declined. So I know that when the webhook triggers that event I don't block the app
Does it make sense?
Gotcha. You could also check if the PaymentIntent is for an invoice or not. As for renewals, the PaymentIntents will always have an invoice attached
and the billing reason would be subscription_cycle on that invoice
https://stripe.com/docs/api/invoices/object#invoice_object-billing_reason
Does that help? @trim dust
Not really, but I think I found a way. Thanks