#nishabkumari

1 messages · Page 1 of 1 (latest)

tranquil ermineBOT
cinder marsh
#

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.

wise glade
#

Can you suggest the correct webhook for this ?

cinder marsh
#

customer.subscription.updated

wise glade
#

which param in the json can confirm that the payment is failed?

cinder marsh
#

there isn't a specific one. But for example, if the status:"past_due" and previous_attributes[status]:"active"

wise glade
#

inside previous_attributes, i dont see any status field

cinder marsh
#

then it means that for that particular updated event, the change that happened did not change the status and something else changed

wise glade
#

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

cinder marsh
#

well if the status was already past_due then it doesn't change so naturally status is not in previous_attributes

wise glade
#

got it

#

status = past_due, can be categorized as payment failed or incomplete payment, right ?

cinder marsh
#

well if you really want to be sure, look at the Invoice and see what status that has

wise glade
#

let me check