Create Usage Record

Report usage for a subscription usage-based billing product

This endpoint allows you to create a usage record for a subscription usage-based billing product. Use this to report the actual consumption.

Usage Reporting

When creating a usage record, you need to specify:

  1. The subscription ID
  2. The usage-based billing product ID
  3. The number of consumed units

Response

Upon successful creation, the API response will include the ID of the created usage record. This ID can be used to update the status of the record between active and inactive if needed.

Special Considerations for Percentage and Percentage-step Models

For pricing models based on percentages (percentage and percentage-step), there are special considerations:

  • Unit ranges and consumed units represent monetary values in their smallest denomination (e.g., cents, øre)
  • The platform supports currencies with up to three decimal places (e.g., BHD, JOD, KWD, OMR, and TND)

Important Note on Currency Precision

When using currencies with three decimal places:

  • Amounts must be rounded to the nearest ten units of the smallest denomination
  • A value of 10,234.254 TND should be rounded to either 10,234.25 or 10,234.26
  • These values should then be converted to their smallest denomination: 1023425 or 1023426

Ensure that you report the correctly rounded and converted values when using these pricing models.

Related Endpoints

Language
Authorization
Basic
base64
:
Click Try It! to start a request and see the response here!