Overdue per subscription and proration

121 views
Skip to first unread message

Hackness Dev

unread,
Jun 3, 2022, 11:56:21 AM6/3/22
to Kill Bill users mailing-list
Hi, I would like to ask how to properly handle per subscription overdue policy. 

Target: User can get any subscription and access its entitlement immediatelly. I expect the user will pay within 7 days, if it doesn't happen I block this specific subscription for that user.

Problem: As I understood, KillBill supports out-of-the-box only the per-account overdue blocking, so, I came to the blocking states. 
I send PAUSE_ENTITLEMENT blocking state to that subscription:
{
  "stateName": "PAUSE_ENTITLEMENT",
  "service": "kb-swagger",
  "isBlockChange": true,
  "isBlockEntitlement": true,
  "isBlockBilling": true
}
Everything works as intended except KillBill makes proration invoice when I block billing to get charge only for 7 days usage. How can I keep full invoice amount in that case? Or is there any better way to achieve my target?

stephane brossier

unread,
Jun 3, 2022, 7:25:41 PM6/3/22
to Hackness Dev, Kill Bill users mailing-list
The reason for the pro-ration is because you set the flag isBlockBilling=true; if you need two different dates, one for stopping the entitlement early (7 days after not paying) and yet avoid pro-ration, you need to create 2 blocking states, one for entitlement (isBlockBilling=false) and one for stopping the subscription (at the end of the period with isBlockBilling=true); alternatively for the second one, you could also cancel the subscription EOT.

--
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 on the web visit https://groups.google.com/d/msgid/killbilling-users/92d5b876-347c-413f-acd1-5cefe746a5d7n%40googlegroups.com.

Hackness Dev

unread,
Jun 3, 2022, 8:49:54 PM6/3/22
to Kill Bill users mailing-list
Thanks for the reply. In my case I shouldn't cancel the subscription, I keep it blocked as a mark to not give any new one with the same product. It waits for user to come back and pay for it. 
If I stop billing at the end of term KillBill tracks full billing period as used one and indeed remains total invoice amount, but when user pays the invoice after EOT and I resume subscription billing KIllBill immediatelly generates a new invoce for the next billing period. In other words forces the user to pay twice in my flow. 
Is there any possibility to just pause the subscription entitilement and billing like it is done by overdue policy with proration right after full invoice payment (if need)?
суббота, 4 июня 2022 г. в 02:25:41 UTC+3, step...@kill-bill.org:

stephane brossier

unread,
Jun 10, 2022, 8:57:15 PM6/10/22
to Hackness Dev, Kill Bill users mailing-list
Is there any possibility to just pause the subscription entitilement and billing like it is done by overdue policy with proration right after full invoice payment (if need)?


The overdue module is using the blocking state apis, so you should be able to reproduce the same behavior. I think I am not fully understanding what you are trying to achieve, perhaps a clear example with dates, of what you want and what you see instead would help.
 
суббота, 4 июня 2022 г. в 02:25:41 UTC+3, step...@kill-bill.org:
On Fri, Jun 3, 2022 at 8:56 AM Hackness Dev <priz...@gmail.com> wrote:
Hi, I would like to ask how to properly handle per subscription overdue policy. 

Target: User can get any subscription and access its entitlement immediatelly. I expect the user will pay within 7 days, if it doesn't happen I block this specific subscription for that user.

Problem: As I understood, KillBill supports out-of-the-box only the per-account overdue blocking, so, I came to the blocking states. 
I send PAUSE_ENTITLEMENT blocking state to that subscription:
{
  "stateName": "PAUSE_ENTITLEMENT",
  "service": "kb-swagger",
  "isBlockChange": true,
  "isBlockEntitlement": true,
  "isBlockBilling": true
}
Everything works as intended except KillBill makes proration invoice when I block billing to get charge only for 7 days usage. How can I keep full invoice amount in that case? Or is there any better way to achieve my target?



The reason for the pro-ration is because you set the flag isBlockBilling=true; if you need two different dates, one for stopping the entitlement early (7 days after not paying) and yet avoid pro-ration, you need to create 2 blocking states, one for entitlement (isBlockBilling=false) and one for stopping the subscription (at the end of the period with isBlockBilling=true); alternatively for the second one, you could also cancel the subscription EOT.

--
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 on the web visit https://groups.google.com/d/msgid/killbilling-users/92d5b876-347c-413f-acd1-5cefe746a5d7n%40googlegroups.com.

--
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.
Reply all
Reply to author
Forward
0 new messages