#nishabkumari
1 messages · Page 1 of 1 (latest)
Hi! I suppose you'd need to use webhooks and trigger your own email. Maybe we don't send the email if the failure is not on a "recurring" Invoice, like one that is manually created by updating the subscription.
Can you suggest the correct webhook for this ?
customer.subscription.updated
which param in the json can confirm that the payment is failed?
there isn't a specific one. But for example, if the status:"past_due" and previous_attributes[status]:"active"
then it means that for that particular updated event, the change that happened did not change the status and something else changed
sample data , where status of the susbcription was already past_due, then i fired subscription update API to change quantity. and this api also fails
well if the status was already past_due then it doesn't change so naturally status is not in previous_attributes
got it
status = past_due, can be categorized as payment failed or incomplete payment, right ?
well if you really want to be sure, look at the Invoice and see what status that has