#meteograms_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1501701819733250088
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
What I am after is something like:
const subscription = await stripe.subscriptions.retrieve('sub_1PRrRTq2YAfYkRHkIcPWRyQ1');
const customerId = subscription.customer;
const events = await stripe.billing.meterEvents.list({
customer: customerId,
limit: 10,
});
logger.info('events:', JSON.stringify(events.data));
But such a method doesn't seem to exist?
hello! yes i don't think that method exists
can you tell me more about your use case?
I want to be able to drill down into a particular customer's recent usage. But in the dashboard, you can only go to the meter to see events from all customers, not filtered down to a specific customer/subcription. So I was looking to code something.
i.e. in the dashboard there is "view meter details", but that just gives recent events from all customers, not the customer I want to look at
have you tried this API?
https://docs.stripe.com/api/billing/meter-event-summary/list
seems like that's exactly what you're looking for
OK thanks, I will check it out.
of course! lmk if you have any issues with it