Skip to main content
Skip table of contents

API Guide for Metered Subscriptions Automation

Overview

This document provides an overview of how Cloudmore handles metered (consumption-based) subscriptions, explaining the difference from license-based models.

It outlines how billing is calculated based on actual usage, which must be reported for each customer.

The guide also describes the process of submitting consumption data and how billing is automatically triggered once the data is received, typically billed in arrears for the previous period.

Additionally, it covers how to set up a system to automate the submission of consumption data for accurate and timely billing.

Introduction

Metered subscriptions are the type of subscriptions that run on a consumption-based usage, rather than a license-based one.

To support this type of subscription, the billable quantity is based on the actual running consumption that each customer uses. This consumption needs to be reported.

After the consumption is reported (submitted), the billing can be calculated. The billing for consumption-type subscriptions typically happens in arrears, for the used consumption for the past billing period.

This guide explains how to create a system to submit each customer’s consumption automatically. Once the consumption is submitted, the billing will be calculated automatically based on that, on the billing day.

Submitting the consumption in bulk via api

Consumption data for metered products or add-ons can be submitted in bulk for billing purposes. This process involves two API calls:

  • A POST request to submit the consumption data

  • A GET request to check the status of the submission.

When the POST request is made, it returns a taskId, which is then used in the GET request to track the submission status. Additionally, the GET API URL containing the taskId can be found in the response headers of the POST request.

image-20250815-102620.png

Note: If one consumption record submitted is not successful, all consumption records will not be saved. This means that another submission of bulk consumption records will have to be done once the failed error records have been corrected.

bulkConsumptionSubmission.drawio.svg

For more information related to the API, refer to the Swagger documentation with the API collection (SellerServiceBulkConsumptions).

Other consumption endpoints

Some other endpoints allow for submission consumption. However, these are older and not recommended. It’s recommended to migrate to the bulk submit consumption API endpoints above.

The following API endpoints only allow for one subscription to be submitted at a time. The above bulk consumption API allows multiple subscription consumptions to be submitted in one API call and is the recommended API to use.

API Collection: SellerServiceConsumptions

Operation

Description

Method

API

Return Seller Consumption

Returns all seller service consumption subscriptions

POST

/api/sellers/{sellerId}/services/consumptions

Submit Seller Consumption

Submit seller service consumptions

PUT

/api/sellers/{sellerId}/services/consumptions

When doing integrations, please implement the Submit Seller Bulk Consumption API endpoints instead. We are mainly supporting those.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.