Bill Usage using Quantity-Based Pricing

Overview

This guide shows you how to implement the Update Subscription Item Price API endpoint to use a tiered or volume pricing approach to bill a customer for usage.

Use Case

  1. On October 17th, a customer subscribes to a cloud messaging product that is billed at the end of every monthly billing interval based solely upon the number of messages sent during that billing interval. The customer was advised that usage during every billing interval would be priced according to the following tiers:
Number of MessagesPrice per Message
1,000 or fewer¥5.00
1,001 – 10,000¥1.00
10,001 – 50,000¥0.75
50,001 – 100,000¥0.50
Over 100,000¥0.30

Although the customer was required to enter payment information to complete the purchase, the customer is not billed at this time.

  1. At the end of the day on November 16th, the program running on your organization’s system does the following for each subscription with a renewal date of November 17th:
  • Calculates the quantity of usage during the billing interval, and then uses the same table to determine the correct price at which to bill the usage quantity
  • Uses the Update Subscription Item Price endpoint to update the subscription item’s quantity and price
  1. On November 17th, the Cleverbridge platform automatically bills the customer ¥39,211 (78,421 messages sent, priced at ¥0.50 per message) during the billing interval that ended on November 16th.

Implement Update Subscription Item Price API endpoint

Before you start

Make sure that:

  • The subscription has the status Active.
  • You know the next reminder date for the subscription because the subscription must be updated with the usage information before this date. The new purchase is created in the Cleverbridge platform on the next reminder date. In order to be billed, the usage information must have been applied to the subscription record in the Cleverbridge system.

🚧

Important

Get the customer's consent for changes to subscriptions. For more information, see Best Practices: Obtain Customer Consent.


Parameters

Parameter

Set to Value

SubscriptionId

The unique identifier of the subscription.

RunningNumber

1 (it is assumed that the messages item is the only item in the subscription).

Quantity

78,421

AlignmentSettings

AlignToCurrentInterval: false

GetCustomerPricePreviewOnly: false

CustomerPrice

CurrencyId: JPY

IsGross: false

Value: 0.50

UpdateAction

See the note below.


📘

Note

The UpdateAction parameter is currently used for documentation and tracking only. The value set does not affect transaction processing.

The supported values are as follows:

  • For upgrades, set the parameter to upgrade(or 1 for JSON)
  • For downgrades, set the parameter to downgrade, (or 2 for JSON)
  • For all other changes, set the parameter to update (or 0 for JSON)

Illustration