Precise Invoice date and defered invoice data setting

crito's Avatar

crito

20 Jul, 2012 09:06 AM

I'm busy integrating cheddargetter as our billing system. Our service uses a metered billing, based on per hour usage. The plan is to bill our cutomers once a month. I was wondering when the exact time is that you generate the invoice. Eg, if I have the billing date set to 20th of august what is the timeframe that I can actually post the final usage stats of a customer and not miss some hours. My preferred idea so far is to run a periodic task that sends the usage stats for each customer once a day for the previous day to cheddargetter. But am I not missing than a day for the actual invoice? I'm not sure whats the best strategy is to go about this.

Thanks in advance.

  1. Support Staff 1 Posted by Marc Guyer on 20 Jul, 2012 02:20 PM

    Marc Guyer's Avatar

    Hi Christo -- This is an interesting use case that comes up quite a bit.

    In it's current state, the item quantity system is intended to be used as subscribers' "usage" occurs. In other words, as a subscriber "uses" a trackable item, you would update the quantity in real-time. That obviously isn't ideal if the usage occurs frequently. In fact, this type of scenario is currently placing disproportionate load on the CG system and we'll eventually be forced to enforce some API request velocity limits and charge for overage. I don't want you to run into that when the time comes.

    Let me start by explaining how CG determines that a subscriber's billing cycle has ended. It's simple, actually. The "current" invoice has a billingDatetime property which signifies the end of the period down to the second. So, any item quantity updates occurring prior to that moment will be on that invoice. Anything after that will be on the next bill.

    We're considering adding a new event type to the web hooks. We'd call it something like Invoice Billable. When an invoice becomes billable, CG would send a message to your system. You listen for that message and then "audit" the subscription by updating the item quantities according to the usage you have recorded in your system up until the billingDatetime. CG in the meantime would wait some period of time, say 24 hours before automatically executing the bill. Or, at the end of your audit, you could indicate that the invoice is audited and the invoice would be executed soon thereafter.

    The key here is that the load should be distributed evenly over time, benefitting both your system and CG. No babysitting cron jobs or worries about which usage is on which bill.

    You know you're model best so maybe this wouldn't be the best option for you. If not, please let me know. If this is a feature that we can count on you using, we'll happily build it.

  2. 2 Posted by crito on 20 Jul, 2012 03:07 PM

    crito's Avatar

    Hello Marc.

    Thanx a lot for your reply. I totally understand your concern in terms of the amount of incoming requests. Thats also why I wanted to settle for some daily update of the usage stats, instead of hourly updates. In my design it always bothered me that I couldn't poll the usage stats in an 'event driven' fashion, eg: if an invoice occur, poll the usage stats. So if you can implement this webhook, I would be very grateful for that. This solves not only the timing issue, but numerous design flaws in our billing I wasn't very happy about. In my use case 24 hours between triggering the hook and sending the actual invoice is a perfectly valid time span. It would be good to receive in this hook like the precise invoice id, to know exactly which invoice I have to update, like the URI or something. So if you can implement this, I would for sure use it. Can you give me an estimated timeframe? The billing implementation is the only thing that keeps us from going into production, so its kind of good to know, whether I can wait for that or if I have to work around it.

    xx
    Christo

  3. 3 Posted by crito on 25 Jul, 2012 12:50 PM

    crito's Avatar

    Hello Marc,

    Are you already able to give an estimation about the timeframe for this feature?

    Thanx, Christo

  4. Support Staff 4 Posted by Marc Guyer on 02 Aug, 2012 04:24 PM

    Marc Guyer's Avatar

    Hi Christo -- Sorry for the delayed response. After some deliberation, it turns out that we'll be able to fit this in in the short term. We're thinking that the earliest complete date could be early to mid September. Does that fit your timeline? We're eager to do this and might be able to accelerate if necessary. Having you as a partner on it is a big deal.

  5. 5 Posted by crito on 03 Aug, 2012 06:11 AM

    crito's Avatar

    Hello Marc.

    Good to hear from you. I'm absolutely willing to help you in any way I can. If the release date is mid september, than I have to find a way around till then. I don't think I can wait that long. Have to look into it. I guess you have my email, so write me if and how I can help you.

    x
    christo

  6. 6 Posted by crito on 24 Sep, 2012 11:40 AM

    crito's Avatar

    Hello Marc,

    I wanted to get an update on this feature request. I didn't hear anything from you anymore and now we are past mid september. So I was wondering whats the chance to resolve the issue.

    x
    christo

  7. Support Staff 7 Posted by Marc Guyer on 24 Sep, 2012 01:07 PM

    Marc Guyer's Avatar

    Hi Christo -- This is turning out to be a little more involved that we anticipated. In particular, how and when transactions are executed is a process that is at the core of CG. As such, we have to be very careful with changes and we are finding that the act of delaying transaction executions touches on many other processes. Working through this feature is continuing but I don't have a better estimate on completion. Can we help in some other way in the meantime?

  8. Support Staff 8 Posted by Marc Guyer on 06 Nov, 2012 09:52 PM

    Marc Guyer's Avatar

    Hi Christo -- We're in final testing prior to deployment of this feature. It shouldn't be more than another day or so. In the meantime, we've already posted the documentation:

    http://support.cheddargetter.com/kb/operational-how-tos/invoice-aud...

    Please let me know if you have questions. If that documentation isn't clear, we want to change that so any feedback is valuable.

    Thanks for your patience!

  9. Support Staff 9 Posted by Marc Guyer on 20 Nov, 2012 06:53 PM

    Marc Guyer's Avatar

    Hi Christo -- Were you able to take a look at the new functionality?

  10. 10 Posted by bas on 07 Dec, 2012 03:58 PM

    bas's Avatar

    Hi Marc,

    Thanks for your update on this request. We will take a look at it!

    Cheers,

    Bas Tichelaar
    30loops

  11. 11 Posted by Dean on 16 Jan, 2013 09:28 PM

    Dean's Avatar

    Hi Guys,

    Just checking in here as I'm doing some forum cleaning. Is everything running smoothly?

    Cheers,
    Dean

  12. Dean closed this discussion on 16 Jan, 2013 09:28 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM