Bill Customer for Usage

You can charge your customers based on how much of your service they use. The following contains relevant information about this use case:

Description

  1. On March 17th, a customer purchases a SaaS data storage subscription that is billed monthly. This service is priced entirely upon the amount of data storage used each month using a formula that your organization applies to activity records within its data centers. Although the customer was required to enter payment information to complete the purchase, the customer is not billed at this time.
  2. At the end of the day on April 16th, you use a program that accesses the Update Subscription Item endpoint to update the usage quantity for the monthly billing interval that just ended. This program calculates usage for each subscription with a renewal date of April 17th.
  3. On April 17th, the Cleverbridge platform automatically bills each customer for the prior month's usage.
  4. Every subsequent month, you run the program to update subscriptions with usage information.

This use case calls the Update Subscription Item API endpoint as described below:

ParameterSet to Value
SubscriptionIdThe unique identifier of the subscription.
RunningNumber1 (This subscription has only one item.)
ProductIdProduct ID for the subscription item usage.
QuantityQuantity of usage.
AlignmentSettingsAlignToCurrentInterval: false

GetCustomerPricePreviewOnly: false
UpdateActionSee 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)

Options

Although not utilized in this use case, the following options are also available:

  • Reduce the price of the subscription by applying a discount coupon that was set up in the Cleverbridge platform.
  • Suppress generation of the confirmation email to the customer for the transaction.

📘

Note

The Cleverbridge platform generates an email for new purchases that cannot be suppressed.

Illustration