#Aarti

1 messages · Page 1 of 1 (latest)

true topazBOT
acoustic ivy
#

Hey there

#

We can't re-open threads but happy to continue the conversation here

spiral coral
#

Hi! Thanks for your response earlier. Sorry I had to step away for a bit

#

Allow me to explain my use case:

#
  • Say I create a subscription with quantity 5 (5 users) on Jun 21.
  • An invoice is generated immediately from Jun 21 to Jul 21
  • Next invoice is generated on July 21 for the period Jul 21 - Aug 21
  • But before this next invoice is generated, I want to update the number of users on the subscription with x (a value that is calculated ON Jul 21)
#

Do you have a recommendation to achieve this? Initially I thought of doing this by using invoice.upcoming webhook but that wont allow me to update the subscription quantity based on the # of users on Jul 21 (i.e., the beginning of next billing cycle).

acoustic ivy
#

And you can't perform this calculation on July 21 prior to the actual new billing period?

#

Like can you do it just beforehand?

spiral coral
#

I can do it just beforehand, yes. I need to do it just before the next invoice is generated. As close to Jul 21 as possible

acoustic ivy
#

Gotcha well that would be my recommendation then.

#

You update the Subscription a few hours prior to the cycle. When you update you can set proration_behavior: none so that no proration is taken into account

#

Then the new quantity will be billed during the new renewal

spiral coral
#

Intresting... "a few hours prior to the cycle" -- is there a specific webhook event I can use to get notified of this? Or is it the invoice.upcoming webhook event? That event has the minimum notification period of one day IIRC

acoustic ivy
#

Yeah you most likely will need to have some sort of trigger on your end unless you are willing to use invoice.upcoming which actually has a 3 day minimum

spiral coral
#

Gotcha. Thank you for your help!