How to specify a trial phase / invalid documentation?

18 views
Skip to first unread message

Sören Kress

unread,
Sep 17, 2021, 8:20:43 AMSep 17
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 AMSep 17
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 AMSep 20
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

Reply all
Reply to author
Forward
0 new messages