#smilelari-billing-usage
1 messages · Page 1 of 1 (latest)
Let me check on this - it's ringing a bell but I don't remember the exact requirements
Do you have an example that didn't fall on the correct invoice?
There is Barn Owl Care and Camera Connection usage that was submitted but it appears as being after Jan 10
Which of the line items specifically did you submit the usage for? The Data Usage (per KB) or SMS Usage (per SMS)
Ah, that's perfect - looking now
The connection fee. as well as barn owl care, but I added the subscription at the same time for that
Interesting - so looking at the request that added usage for that Subscription Item https://dashboard.stripe.com/logs/req_hPfbqJbg5qKRer it was made at 3:32:10 PM. However, the subscription cycle ended at 3:23:01, nine minutes before you reported usage
That would explain why it's not on the correct invoice - the usage has to be reported before the billing cycle is over for it to be reflected in that cycle. The only exception is that prices where aggregate_usage: sum are allowed an additional 5 minutes after the end of the billing cycle to account for clock drift
Thank you. I'm querying for records with a billing cycle that ends 5-15 minutes prior to "now". I'll just back it up by another 10 minutes or so
👍 Yeah it may be that by the time your whole process end to end is complete (gathering all the records that need to be reported, seeing how much to report, iterating through and making the stripe request to report) too much time has passed, putting you into the next billing cycle. Backing it up 10 minutes will probably help, and if you have them I'd suggest looking at your logs to get a sense of the timing of all of this just to confirm that everything looks okay