Skip to main content

Story: pricing API calls by volume

Your company sells access to a messaging API. It charges each customer for the API calls that the customer makes. A customer that makes more calls in a month pays less for each call. Your billing team already meters the API calls of each customer with the billable metric API calls. It now creates the product API calls, and the pricing preset that charges for it. On the way, it puts these concepts into practice: The story uses these values: With this pricing preset, 8,000 calls in a month cost 8,000 × $0.010 = $80. 12,000 calls in a month cost 12,000 × $0.008 = $96. The company and the numbers are fictional.

Prerequisites

  • A role with the Can Read Product, Can Create Product, Can Read Product Pricing, Can Create Product Pricing, and Can Read Billable Metric permissions.
  • The billable metric API calls. See End-to-end walkthrough: How usage works.

Create the product for API calls

  1. Go to Products.
  2. Click CREATE PRODUCT. The Add product screen opens.
  3. In Name, enter API calls. A product describes what your company sells. Here, your company sells API calls.
  4. Optional: In Tax category, select a value. A tax category classifies the product by how it is taxed. Zenskar calculates tax only for a product with a tax category. This story does not cover tax, so the billing team leaves the field empty. See Tax configuration.
  5. Click Description, and enter Calls to the public API.
  6. In Product type, keep Point in time. The product type follows when the customer consumes the product. Each API call is consumed at the moment the API serves it. Once served, the call is over. That makes API calls a point-in-time product. The wording of the price confirms it. “$0.010 per call” needs no period. A price without a period belongs to a point-in-time product. A seat is different: “$20 per seat” means nothing without “per month”.
  7. In Subtype, keep Quantity. With the quantity product subtype, the usage of API calls is measured as a number of units, here a number of calls.
  8. Click SKU and unit.
  9. In Unit, enter call.
  10. In Unit, plural, enter calls. The unit labels name the unit in which the product is measured: one call, several calls.
  11. If Custom attributes shows fields, enter a value in each required field that has no default value. A custom attribute adds a detail of your own to the product. A required custom attribute without a default value needs a value before you can go on. A required custom attribute with a default value can stay empty, because saving the product writes the default value. See Required values: what a record must have.
  12. Click Set prices. The Set prices screen opens.

Price API calls by volume, from the billable metric

The billing team sets up the pricing preset in five parts: the pricing model, the tiers, the tier-reset period, the source of the quantity, and the save.

Choose the volume pricing model

  1. In Pricing Model, select Volume. The billing team wants large customers to pay less per call. A customer that makes more than 10,000 calls in a month pays $0.008 for every call of that month. Other customers pay $0.010 per call. The price of a call then depends on the number of calls in the month. Such a price needs tiers, each with its own price per call. Two pricing models use tiers: the volume pricing model and the tiered pricing model. The volume pricing model charges every call of the month at the price of the one tier that the total selects. The tiered pricing model charges each call at the price of its own tier. With the same tiers, the two pricing models charge these amounts: Only the volume pricing model charges $0.008 for every call of a large customer. The volume pricing model is what the billing team needs.
  2. In Currency, keep USD.

Set the tiers

  1. In TIER BOUNDARY, keep Inclusive. The tier boundary decides which tier a total of exactly 10,000 calls selects. With the inclusive tier boundary, it selects the first tier. With the exclusive tier boundary, it would select the second tier. The lower price is for customers that make more than 10,000 calls, so the billing team keeps the inclusive tier boundary.
  2. Click ADD TIER. The table shows two tiers.
  3. In the From field of the second tier, enter 10000. The To field of the first tier shows ≤ 10,000.
  4. In the price field of the first tier, enter 0.01.
  5. In the price field of the second tier, enter 0.008. The selected tier changes the price of every call, not only of the calls above 10,000: A customer with more calls can pay less in total. The tiered pricing model avoids this.

Reset the tiers each month

  1. In Tier Reset Period, keep Monthly. A point-in-time product has no pricing period. Its tier-reset period decides how long its calls add up against the tiers. When the next tier-reset period starts, the count starts again from 0. The billing team wants the calls of each month to select the tier of that month, so it keeps the monthly tier-reset period. A quarterly tier-reset period would add up the calls of three months.

Take the calls from the billable metric

  1. Select Usage is metered. The number of calls is metered usage that the billable metric API calls measures. Zenskar runs the billable metric once for each billing period. Its result becomes the quantity of that billing period. The calls change from month to month, so the billing team takes them from the billable metric.
  2. In Meter, select API calls.
  3. In Quantity Strategy, keep On Demand. The on-demand quantity strategy treats each quantity as a separate consumption at the moment it occurs. Each call happens once and is then over. The recurring quantity strategy would treat the calls as an allocation that stays in place. That fits seats or active users, not calls.

Save the pricing preset

You cannot change or delete a pricing preset after you save it. Check every field before you click Add product.
  1. Click Add product.
The dashboard confirms that the product and its pricing preset are added.

Review the pricing preset

The billing team checks that the saved pricing preset matches the values of the story.
  1. In the Products list, click API calls. The product screen opens.
  2. Under Prices, find the card of the pricing preset. The top of the card shows 2 tiers, USD, Volume, and Default. The pricing preset is the first pricing preset of API calls in US dollars. That makes it the default pricing preset in US dollars. Zenskar uses the default pricing preset of a currency when no other pricing preset is chosen.
  3. Check the body of the card. It shows the two tiers, Every Month under Tier Reset Period, On Demand under Quantity Strategy, and Metered (API calls) under Source.

Summary: what your billing team did

Your billing team created the product API calls, a point-in-time product with the quantity subtype. It gave the product a pricing preset in US dollars. The pricing preset uses the volume pricing model, with two tiers and a monthly tier-reset period. It takes the calls of each customer from the billable metric API calls. It treats those calls with the on-demand quantity strategy. As the first pricing preset in US dollars, it is the default pricing preset in US dollars. See Create a product. See End-to-end walkthrough: How contracts work.