#brilliantov-usage
1 messages ยท Page 1 of 1 (latest)
Yep you can definitely pull that info via the API https://stripe.com/docs/api/usage_records/subscription_item_summary_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you clarify on that first error?
Do you have a request ID (req_123) from when you saw that?
yes, we just fucked up with usage_report in past periods, and tried to to report it again, but the invoice was already settled
And do you need help avoiding that error in future or is this just about listing the usage reports for a period?
I know how to avoid this ๐ cause in normal case it is not happening
now i just need to compare our periods while we was down with your periods
Good to hear!
Is the subscription item period summaries API call sufficient to get you the data for that?
investigating
so it is method about one subscription
don't you have method about all subscriptions in one call?
the idea is to compare our normal usage with outstanding periods and resend only outstanding
@inner hull
Oh I see. Unfortunately I don't think you can do multiple lists of subscription items like that in one call.
Can you clarify what you mean by "outstanding" here?
I have number of organizations and in normal periods we report for example quantity of 1000 across all subscriptions
but in some period we were down and not reported any usage, so it will have for example 0 quantity
that's outstanding period for me, maybe there is a better word for this
So you want to programmatically go back and see when quantity wasn't reported at all for anyone?
Is it unclear when the system was down or what got missed?
But you are sure it lines up with the periods for those subscriptions?
What info is in your DB? What is the disconnect in lining your DB up with our records from, say, that call?
we have some usage in our DB, for example
sub_id, datetime, quantity
sub_123, 2021-11-05 02:00:00, 1
and this is completely consistent data
we need to compare it with usage reported to stripe, and if it is different - report it again
OR if there already were some invoices since faulty period report in current period
Hey there ๐ stepping in and getting caught up on the thread.
The endpoint that Pompey mentioned earlier, is the best way to pull the usage records from the API. Here we focus on integration and API questions, so we're not as familiar with the reports. If you're looking for another approach, then I'd recommend reaching out to our support team with an explanation of your scenario so they can check if there is another option.
https://support.stripe.com/?contact=true