How to specify a trial phase / invalid documentation?

73 views
Skip to first unread message

Sören Kress

unread,
Sep 17, 2021, 8:20:43 AM9/17/21
to Kill Bill users mailing-list
Hi,

according to https://docs.killbill.io/latest/userguide_subscription.html#components-catalog a trial phase can be specified like this:

<phase type="TRIAL">
  <duration>
    <unit>DAYS</unit>
    <number>30</number>
  </duration>
  <billingPeriod>NO_BILLING_PERIOD</billingPeriod>
  <fixedPrice> <!-- empty price implies $0 --> </fixedPrice>
</phase>

... but catalog validation fails. So what is the recommended way to specify a trial phase?

I am now using the following definition, but I am not sure if this is ok (at least it seems to work), or if I am missing anything:

<phase type="TRIAL">
    <duration>
        <unit>DAYS</unit>
        <number>30</number>
    </duration>
    <fixed>
        <fixedPrice>
        </fixedPrice>
    </fixed>
</phase>

I can create a PR to update the doc if that would help.

Best
Soeren


Sören Kress

unread,
Sep 17, 2021, 9:26:07 AM9/17/21
to Kill Bill users mailing-list
And a followup question: is it possible to define a trial where no invoice will be generated? Currently I get an invoice with an amount of 0. I have tried to define a trial as follows:

<initialPhases>
    <phase type="TRIAL">
        <duration>
            <unit>MONTHS</unit>
            <number>1</number>
        </duration>
        <recurring>
            <billingPeriod>NO_BILLING_PERIOD</billingPeriod>
        </recurring>
    </phase>
</initialPhases>


final BigDecimal recurringPrice = curPlanPhase.getRecurring() != null ? curPlanPhase.getRecurring().getRecurringPrice().getPrice(currency) : null;

(And if I add a recurring price of 0 to the trial phase, the catalog does not validate because of the "NO_BILLING_PERIOD" setting.)

Thanks
Soeren

Reshma Bidikar

unread,
Sep 20, 2021, 12:48:25 AM9/20/21
to Kill Bill users mailing-list
Hello,

Your catalog looks correct. Kill Bill provides an online catalog validation tool where you can validate your catalogs. You can access this tool by creating an account at https://cloud.killbill.io/ and accessing the catalog tool via Tools > Catalog editor on the left.

With regards to defining a trial phase without an invoice, AFAIK, that is not possible. 

Regards,
Reshma

Gary Ryczek

unread,
Apr 27, 2022, 1:40:09 PM4/27/22
to Kill Bill users mailing-list
Reshma,

Can you explain to me the purpose and behavior of the NO_BILLING_PERIOD setting?  I was hoping that if a Trail plan had that set, no billing, and thus no invoicing, would occur.  If the setting does not do that, what does it do?

Thanks
Gary

Reshma Bidikar

unread,
May 4, 2022, 12:36:24 AM5/4/22
to Kill Bill users mailing-list
Hi,

The NO_BILLING_PERIOD is actually not used much.  When specified, it indicates that there is no recurring price (like MONTHLY, ANNUAL, etc). in that phase. However, it would still result in an invoice being generated. 

Regards,
Reshma

Shaun Forgie

unread,
May 7, 2022, 9:45:39 PM5/7/22
to Reshma Bidikar, Kill Bill users mailing-list
Hi Reshma,

The NO_BILLING_PERIOD flag could be better named. Possibly IS_ZERO_BILL_PHASE ?

rgs
Shaun

--
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/2b424afc-4b3a-4e6e-914f-b542eb693cf1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages