#Rajesh-Subscription

1 messages · Page 1 of 1 (latest)

rare mango
#

There is no way to report usage in different billing cycle, unfortunately

deep apex
#

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

rare mango
#

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?

deep apex
#

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

rare mango
#

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

deep apex
#

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

rare mango
#

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?

deep apex
#

sure, will check with my team, thank you