Modelling usage per day and invoicing per month

26 views
Skip to first unread message

Thomas Lundström

unread,
Jul 7, 2025, 7:08:08 AMJul 7
to Kill Bill users mailing-list
Hey,

I'm trying to use Killbill to model a recurring IN_ARREAR + usage IN_ARREAR case where usage is measured/priced/specified on invoice in a daily fashion, but invoicing is done monthly.

Let's say that our users can subscribe to a candy-plan where they pay X USD per month for the subscription (IN_ARREAR) and then they can order gummy-bears to be delivered daily, i.e. the usage is per day and invoiced IN_ARREAR. In order for my customers to know their usages, I'd like their monthly invoices to display its daily gummy-bear usages per day including the daily price for the past month.

If I model my plan purely monthly, i.e. I've got finalPhase.recurring.billingPeriod: MONTHLY and finalPhase.usages.usage.billingPeriod: MONTHLY, then I get a fully rolled up monthly invoice. All usages are rolled up into one, which means that my customers won't get their daily usages spec'd on the invoices. 

If I instead model my plan with monthly recurrence and daily usage, i.e. finalPhase.recurring.billingPeriod: MONTHLY and finalPhase.usages.usage.billingPeriod: DAILY I get the recurring invoice on a monthly basis but all daily usages are on separate daily invoices.

Are there any ways for me to model a plan within the business rules as specified above, i.e. only generate one monthly invoice per account, where usage aggregation/pricing/specification is grouped daily on the invoice?


Best regards,
Thomas 


stephane brossier

unread,
Jul 14, 2025, 1:49:44 PMJul 14
to Thomas Lundström, Kill Bill users mailing-list
Hi Thomas,


If you need to invoice on a monthly basis, then using a MONTHLY billing period is the right approach. If your goal is to provide the granularity of what was consumed every day, we offer a usage API to retrieve the data points. If your goal is to translate this into a daily $ amount, you would need to do this yourself and build a presentation layer on top of the invoices that killbill generates - perhaps leveraging the invoice template feature offered (i have not tried, not sure how easy it would be).

Stéphane


--
You received this message because you are subscribed to the Google Groups "Kill Bill users mailing-list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to killbilling-us...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/killbilling-users/70f6746c-216a-4534-8784-677d3ffe5a6bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages