Custom data source - advanced use cases

This tutorial explains how some advanced use cases such as switching plans (prorated, non-prorated), one-time purchase and refunds can be achieved using invoice line items. 

If you are looking for the basic tutorial on how to use a custom data source click here - https://help.chartmogul.com/hc/en-us/articles/360012512260.

 

Scenario 1: Switching plan (non-prorated)

  • Your customer Wayne Enterprises is currently on a monthly Bronze plan with a charge of $100 per month from January 1st, 2019
  • At the start of the new month 1st of February, 2019 the customer has upgraded to a new monthly Gold plan
  • Your monthly Gold plan is $250 per month

For the above customer, add these details as an invoice line item.

Line Item

Value

Invoice

JL_FG_13400007 (Wayne Enterprises)

Subscription ID

jl_subid_01

Type

Subscription

Prorated

No

Service period start

2019-02-01

Service period end

2019-03-01

Amount

$250

Plan

JL Gold Plan Monthly (jlgoldmonthly)

Quantity

1


In this case, total MRR after this charge = $250

MRR movement after this charge = $150 (check the image below)

Screenshot_2020-03-29_12.30.29.png

Screenshot_2020-03-29_12.33.52.png 

Scenario 2: Switching plan (prorated) 

  • Your customer Daily Metropolis is currently on a monthly Bronze plan with a charge of $100 per month
  • At the start of the new month, 1st of June, 2019 they renewed their current monthly Bronze plan
  • In the middle of the month on 16th June, the customer has upgraded to a new monthly Gold plan (prorated upgrade for remaining 15 days in the billing cycle)
  • Your monthly Bronze plan is $100 per month, and the monthly Gold plan is $250 per month
  • You charge the customer a prorated amount of $125 and credit $50 for the unused time in the Bronze plan

For the above customer, add these details in two separate invoice line items.

Invoice line item 1:  

Line Item

Value

Invoice

JL_FG_13400014 (Daily Metropolis)

Subscription ID

jl_subid_02

Type

Subscription

Prorated

Yes

Service period start

2019-06-16

Service period end

2019-07-01

Amount

-$50

Plan

JL Bronze Plan Monthly (jlbronzemonthly)

Quantity

1

 

Invoice line item 2:  

Line Item

Value

Invoice

JL_FG_13400014 (Daily Metropolis)

Subscription ID

jl_subid_02

Type

Subscription

Prorated

Yes

Service period start

2019-06-16

Service period end

2019-07-01

Amount

$125

Plan

JL Gold Plan Monthly (jlgoldmonthly)

Quantity

1

 

In this case, total MRR after this charge is calculated as follows

MRR = Amount * Subscription duration ratio * Prorate factor

Amount  = $125

MRR for the prorated charge line item = $125 * 1 * 2 = $250

Since this prorated charge is for a plan change, the new MRR of the subscription will simply be the MRR from the new Gold plan.

 New MRR of the subscription = MRR from Gold plan = $250

MRR movement after this charge = $150 (check the image below)

Screenshot_2020-03-29_12.28.03.png

Screenshot_2020-03-29_12.33.44.png

If you wish to understand how subscription duration ratio and prorate factor are calculated, please refer to this article - https://dev.chartmogul.com/docs/how-mrr-is-calculated-from-prorated-invoices 

 

Scenario 3: Adding a one-time purchase 

  • Your customer Arthur Curry has a non-recurring setup fee of $100 that includes a tax of $6
  • The transaction fee is $2

For the above customer add these details as an invoice line item

Line Item

Value

Invoice

JL_FG_13400017 (Arthur Curry)

Description

Setup fees

Type

One time

Amount

$100

Transaction fees

$2

Tax amount

$6

Note: One-time type invoice line items do not contribute to MRR but will impact your cash flow metrics

Scenario 4: Adding a refund

  • Your customer Arthur Curry buys a license of your monthly Bronze plan for December starting from December 1st, 2018
  • Your monthly Bronze plan is $100
  • They made a payment on the 1st of December, 2018 
  • On the 5th of December, 2018 they realised that they no longer need the plan
  • As part of your refund policy, you issue a full refund on the same day, though they can continue to use the services till 1st January 2019

For the above customer add these details as an invoice line item

Line Item

Value

Invoice

JL_FG_13400019 (Arthur Curry)

Subscription ID

jl_subid_04

Type

Subscription

Prorated

No

Service period start

2018-12-01

Service period end

2019-01-01

Amount

$100

Plan

JL Bronze Plan Monthly (jlbronzemonthly)

Quantity

1

 

For the above customer add these details in transactions

Line Item

Value

Invoice

JL_FG_13400019 (Arthur Curry)

Transaction ID

trans_id_04

Type

Refund

Result

Successful

Date

2018-12-05

 If you want to cancel the customer subscription permanently and churn the customer, go to the subscriptions tab and cancel the subscription.

The current MRR will be set to zero in this case (check the image below for MRR movements after cancellation)

Screenshot_2020-03-29_12.33.32.png

 

Scenario 5: Adding a subscription with multiple components

    • Your customer Barry Allen buys a subscription with multiple components in December - a monthly Bronze plan and a monthly Gold plan starting from December 1st, 2019
    • Your monthly Bronze plan is $100
    • Your monthly Gold plan is $250

 

For the above customer, add these details as invoice line items.

Invoice line item 1:

Line Item

Value

Invoice

JL_FG_13400011 (Barry Allen)

Subscription ID

jl_subid_11

Subscription set ID

jl_subsetid_01

Type

Subscription

Prorated

No

Service period start

2019-12-01

Service period end

2020-01-01

Amount

$100

Plan

JL Bronze Plan Monthly (jlbronzemonthly)

Quantity

1

 

Invoice line item 2:

Line Item

Value

Invoice

JL_FG_13400011 (Barry Allen)

Subscription ID

jl_subid_12

Subscription set ID

jl_subsetid_01

Type

Subscription

Prorated

No

Service period start

2019-12-01

Service period end

2020-01-01

Amount

$250

Plan

JL Gold Plan Monthly (jlgoldmonthly)

Quantity

1

 
In this case, total MRR after this charge = $350 (check image below). 

Screenshot_2020-04-24_15.31.59.png

 

The subscription set ID should remain the same for different invoice line items that are part of the same subscription. For more information on subscriptions with multiple components, please refer to this article - https://help.chartmogul.com/hc/en-us/articles/360008796440