Create subscription usage-based billing

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

This endpoint allows you to create a subscription usage-based billing product, which associates an existing usage-based billing product with a specific subscription. This association enables usage-based billing for the subscription.

Key Concepts

  1. Unbilled Usage Strategy: Defines how to handle existing unbilled usage records when re-adding the same usage-based billing product to a subscription.
  2. Pricing Strategy: Determines whether the subscription will use flexible or fixed pricing for the usage-based billing product.

Unbilled Usage Strategies

When creating a subscription usage-based billing product, you must specify one of the following unbilled usage strategies:

  • write_off: All reported metered records will be deleted and will not be billed at the end of the billing cycle.
  • next_billing_cycle: All reported usage records will be billed in the next billing cycle.

Pricing Strategies

You must also specify one of the following pricing strategies:

  • flexible: The subscription usage-based billing product will adopt any future updates to the associated usage-based billing product's pricing.
  • fixed: The subscription usage-based billing product will maintain a fixed price, regardless of any updates to the associated usage-based billing product.

Important Notes

  • To update a subscription usage-based billing product, you must first remove it from the subscription and then re-add it with the new settings.
  • Carefully consider the implications of your chosen unbilled usage and pricing strategies, as they will affect how the subscription is billed and how it responds to changes in the underlying usage-based billing product.

Related Endpoints

Path Params
string
required

Subscription handle

Body Params

Metered billing products to attach to subscription. Each metered billing product can only be added once. A maximum of 100 products is allowed in this request.Metered billing products can only be added when the timing is set to 'immediate'.

float

VAT percentage for the product. Defaults to the account's VAT

string
required

Handle of usage-based billing product that will be added to subscription

string
required

The strategy for unbilled usage for this usage-based billing product if it was previously added to the subscription.

string
required

The pricing strategy for this usage-based billing product. Accepted values: fixed, flexible, or custom. Fixed - the subscription usage-based billing product won't follow any price changes from the base usage-based billing product. Flexible - the subscription usage-based billing product will follow all changes from the base usage-based billing product. Custom - Custom - the subscription usage-based billing product will override the base product's pricing configuration using the provided custom values (e.g. unit ranges, pricing model, VAT, etc.).

string

Name of the unit

int64

Included units for free. Defaults to 0.

string

Minimum fee for the product. Defaults to 0.

string
enum

Pricing model for the product.

Allowed:
boolean

Whether the amount is including VAT. Defaults to true.

string

Tax policy handle for the product.

unit_ranges
array of objects

Unit ranges for this product

unit_ranges
string

Source used to derive invoice service period for metered invoice lines on this subscription product override. If omitted, product-level configuration is used. RECORD_CREATED is deprecated and will be removed by 2026-08-01.

boolean

Override whether a metered usage order line with amount = 0 should be included in the invoice. If omitted, product-level configuration is used.

Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json