#Rahul Kuthuru
1 messages · Page 1 of 1 (latest)
Hi, could you elaborate a bit more?
Thanks, this looks like a list of webhook events
You would want to configure a webhook endpoint then listen to specific events to catch those information. For example the first line looks like a customer.subscription.created event
Hi Orakaro, Thanks for the quick response. Instead of configuring a webhook endpoint and storing the data in my database, can I fetch these data, when I need them from stripe just like fetch other data of the customer like card expiry date etc
It depends on which data you want to fetch, ie. if you want to fetch all Subscription of that Customer? or all Invoices?
That list is a list of webhook events really, so setting up a webhook endpoint is the best way to have all of them in one place
When we generate a invoice and send it to the customer through stripe. I would like to know the status of the invoice , whether he has declined it or was not paid due to insufficent funds. We are having a webhook endpoint when it is paid and saving the data. I would like to know the status in the above two cases
Okie, I think it should be
invoice.payment_failed
Occurs whenever an invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method.
There are a few more events you might be interested in, from here https://stripe.com/docs/api/events/types#event_types-invoice.paid
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How do I know what events belongs to a specific customer
There is no customer Id in the event recieved. Correct me if I am wrong
Each Invoice event is an Invoice object, and it has customer: https://stripe.com/docs/api/invoices/object#invoice_object-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.