#aleem-subscription-updates
1 messages · Page 1 of 1 (latest)
Hi there, let's chat in this thread.
You said: "My first instinct was to use the events api but it doesn't look like I can scope that down to just a specific customer or subscription? Is there a way to get all the events for a particular customer/subscription?"
To accomplish what you are looking for you want to implement Webhooks
Then you listen for customer.subscription.updated events and update your database and show the changes for a Subscription.
Info on Webhooks is in our docs here: https://stripe.com/docs/webhooks
I was hoping to just use the API and not have to store the event data on my end - can I query Stripe for this information?
I see the dashboard shows all the events for a subscription - is there an equivalent api call?
Yes you can retrieve the Subscription via the API if you prefer to go that route.
You wouldn't retrieve the events in this case
That doesn't really make sense
Why doesnt it make sense? THe dashboard shows it
You would poll the API to retrieve the Subscription using: https://stripe.com/docs/api/subscriptions/retrieve
Because Events are for Webhooks
Like if you want to do that you could, but it is essentially an extra step
And you can only list and retrieve events from the past 30 days
Why would you want to retrieve events as opposed to just retrieving the Subscription object itself?
I want to build a page like this in our internal tools:
but I dont want to store all the event data ourselves
Like I said, that is impossible. You would have to store this data yourself.
given I havent been storing the events in the past, is it impossible to get this data
like if i started storing events today then going forward i could show history, but any ideas for what i could do for historical data?
does sigma have this data?
No you can't retrieve Event data past 30 days.
Sigma does not have Event data
So yeah... if you wanted the above it would only be forward looking
Even our events in the Dashboard get cut to just a small summary after 30 days
i wonder if I can reconstruct it from all the invoices generated