#Rajesh-Subscription
1 messages · Page 1 of 1 (latest)
How do we deal with this
we have a problem that if a user cancels his subscription or changes his subscription plan, we would either miss data or report the data in wrong billing cycle
You mean when between 2 usage reporting, customer cancel or changes their Subscription?
In such cases, how about listening to webhook events and record the usage at the time of cancel/changes?
yes, that seems to be a solution when a user cacnels/changes his subscription, since stripe has a buffer of 5 min
Any suggestion of handling the delay?
because the actual billing cycle and billing cycle we report to stripe are delayed by over 6 hours
I would suggest to not delay in the first place instead. Because when the Billing cycle changed, you can't ever report the usage of previous cycle anymore
yes, but inherent delay in our system doesn't allow us to do that
we are querying over a table i.e aggregated hourly. Without adding delay, we would have several misses
Um, I am afraid that Stripe API doesn't support such a scenario... Would a workaround like, for the last 6 hours of billing cycle, send the Usage API before the cycle changed instead of waiting for 6 hours later?
sure, will check with my team, thank you