Change of Plan

82 views
Skip to first unread message

Lalan Amaranto

unread,
Sep 9, 2021, 4:55:56 AM9/9/21
to Kill Bill users mailing-list
Hi,

May I ask for your input on the following scenario:

* 12-Monthly Subscription = 2021/07/07 to 2022/07/06  with  recurring price of 100.
* Change the price to 150 effective date 2021/08/07
* API used:  /subscriptions/{{subscriptionId}}?requestedDate=2021-08-07

What happens is that the original 12-month subscription becomes 13 months.
After the change of plan, an additional month was added to the subscription.
It seems that the change of plan triggered to restart the count of the monthly cycle.

What rule should be used for this situation?  We do not want to change the original length of the subscription.  We are just changing the price.

We already tried the following with the same result:
* changeAlignmentCase = START_OF_SUBSCRIPTION
* changeAlignmentCase = CHANGE_OF_PLAN

Thank you,
Lan

stephane brossier

unread,
Sep 13, 2021, 6:26:38 PM9/13/21
to Lalan Amaranto, Kill Bill users mailing-list
Need more info:

On Thu, Sep 9, 2021 at 1:55 AM Lalan Amaranto <ord...@gmail.com> wrote:
Hi,

May I ask for your input on the following scenario:

* 12-Monthly Subscription = 2021/07/07 to 2022/07/06  with  recurring price of 100.

Please include the definition of your Plan -- or better a small working catalog incl. this Plan
 
* Change the price to 150 effective date 2021/08/07

Did you create a new catalog version, if not what did you do?
 
* API used:  /subscriptions/{{subscriptionId}}?requestedDate=2021-08-07


That is not enough to define which api you used (PUT?)

 

Lalan Amaranto

unread,
Sep 14, 2021, 1:04:12 PM9/14/21
to Kill Bill users mailing-list
Hi Stephane,

Thank you for your response.

Here is a small version of the catalog.  We are overriding the price during subscription.

<catalog xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CatalogSchema.xsd">
<effectiveDate>2021-01-04T15:55:09Z</effectiveDate>
<catalogName>DEFAULT</catalogName>
<currencies>
<currency>USD</currency>
</currencies>
<units/>

<products>
<product name="PROD_A" prettyName="PROD A">
<category>BASE</category>
<included/>
<limits/>
</product>   
</products>
<rules>
        <changePolicy>
<changePolicyCase>
<policy>IMMEDIATE</policy>
</changePolicyCase>
</changePolicy>
<changeAlignment>
<changeAlignmentCase>
<alignment>START_OF_SUBSCRIPTION</alignment>
</changeAlignmentCase>
</changeAlignment>
<cancelPolicy>
<cancelPolicyCase>
<policy>IMMEDIATE</policy>
</cancelPolicyCase>
</cancelPolicy>
<createAlignment>
<createAlignmentCase>
<product>PROD_A</product>
<alignment>START_OF_SUBSCRIPTION</alignment>
</createAlignmentCase>
        </createAlignment>
        <billingAlignment>
<billingAlignmentCase>
<billingPeriod>MONTHLY</billingPeriod>
<alignment>SUBSCRIPTION</alignment>
</billingAlignmentCase>
</billingAlignment>
        <priceList>
<priceListCase>
<toPriceList>DEFAULT</toPriceList>
</priceListCase>
        </priceList>
</rules>
<plans>        
<plan name="PLAN_A" prettyName="PLAN A">
<product>PROD_A</product>
<recurringBillingMode>IN_ADVANCE</recurringBillingMode>
<initialPhases/>
<finalPhase type="FIXEDTERM">
<duration >
<unit>MONTHS</unit>
<number>12</number>
</duration>
<recurring>
<billingPeriod>MONTHLY</billingPeriod>
<recurringPrice>
<price>
<currency>USD</currency>
<value>0</value>
</price>
</recurringPrice>
</recurring>
</finalPhase>
<plansAllowedInBundle>-1</plansAllowedInBundle>
</plan>
</plans>
<priceLists>
<defaultPriceList name="DEFAULT" prettyName="DEFAULT">
<plans>
<plan>PLAN_A</plan>
</plans>
</defaultPriceList>
</priceLists>
</catalog>

For the update of price, we tried via KAUI and API (PUT - /subscriptions/{subscriptionId}).  
We are using the same catalog and plan but updating the price (override).
On both occassions, the end date for the subscriptions got updated.

Regards,
Lan

Mary McCauley-Stiff

unread,
Sep 27, 2021, 11:49:12 AM9/27/21
to Kill Bill users mailing-list
Hi Lan,

I'm helping the KB team to organize/track technical questions/issues and wanted to let you know Stéphane is OOTO.

Were you able to resolve this issue? 

Regards,
Mary

Lalan Amaranto

unread,
Sep 28, 2021, 6:24:55 AM9/28/21
to Kill Bill users mailing-list
Hi Mary,

The issue is not yet resolved.
We are looking at cancelling the subscription at the original end date as a work around.
Is there any better solution for this?

Respectfully,
Lan

Mary McCauley-Stiff

unread,
Sep 28, 2021, 9:36:01 AM9/28/21
to Kill Bill users mailing-list
Hi Lan,

I don't have enough experience to help with this, but I"m working on getting you some assistance.

Regards,
Mary

stephane brossier

unread,
Sep 28, 2021, 9:59:10 AM9/28/21
to Lalan Amaranto, Kill Bill users mailing-list, Mary McCauley-Stiff
I just tried your scenario (or what I understood) using the catalog you provided, here is the data I see:

> select event_type, user_type, effective_date, plan_name from subscription_events where tenant_record_id = 333;
+------------+-----------+---------------------+-----------+
| event_type | user_type | effective_date      | plan_name |
+------------+-----------+---------------------+-----------+
| API_USER   | CREATE    | 2021-07-07 13:48:47 | PLAN_A    |
| API_USER   | CHANGE    | 2021-08-07 13:48:47 | PLAN_A-8  |

> select type, invoice_id, plan_name, start_date, end_date, amount from invoice_items  where tenant_record_id = 333;
+-----------+--------------------------------------+-----------+------------+------------+--------------+
| type      | invoice_id                           | plan_name | start_date | end_date   | amount       |
+-----------+--------------------------------------+-----------+------------+------------+--------------+
| RECURRING | a2c54755-42a9-4495-ad81-e447a90b8edc | PLAN_A    | 2021-07-07 | 2021-08-07 |  0.000000000 |
| RECURRING | 87bcbeeb-eb38-4d1a-bc59-03855ffbc044 | PLAN_A    | 2021-08-07 | 2021-09-07 |  0.000000000 |
| RECURRING | 18d033b0-8fff-429d-a37e-824c92e68ecb | PLAN_A    | 2021-09-07 | 2021-10-07 |  0.000000000 |
| RECURRING | 4996d01e-8e5b-4d5a-82b0-e418696aa9fe | PLAN_A-8  | 2021-08-07 | 2021-09-07 | 10.000000000 |
| RECURRING | 4996d01e-8e5b-4d5a-82b0-e418696aa9fe | PLAN_A-8  | 2021-09-07 | 2021-10-07 | 10.000000000 |


As expected, because of the change plan with a $10 override effective on 8/7, we see a new invoice recomputing the items from 2021-08-07 -> 2021-09-07 and 2021-09-07 -> 2021-10-07 using the new price. I am not sure exactly what is wrong on your end, and what you did exactly.

If you require more assistance, please provide a script we can run to recreate the scenario along with some explicit output data showing the issue.

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 on the web visit https://groups.google.com/d/msgid/killbilling-users/48d31f7b-e42a-437f-b644-872e14596f0en%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages