v49

latestOpenAPI 3.1.0raw.githubusercontent.com2026-07-081445491.8 MB
Subscription

Fetch subscription costs

This endpoint is used to fetch a day-by-day snapshot of a subscription's costs in Orb, calculated by applying pricing information to the underlying usage (see the subscription usage endpoint to fetch usage per metric, in usage units rather than a currency).

The semantics of this endpoint exactly mirror those of fetching a customer's costs. Use this endpoint to limit your analysis of costs to a specific subscription for the customer (e.g. to de-aggregate costs when a customer's subscription has started and stopped on the same day).

get/subscriptions/{subscription_id}/costs

Path parameters

subscription_idstring required

Query parameters

timeframe_startstring date-time nullable

Costs returned are inclusive of timeframe_start.

Example:2022-02-01T05:00:00Z
timeframe_endstring date-time nullable

Costs returned are exclusive of timeframe_end.

Example:2022-03-01T05:00:00Z
view_mode'periodic' | 'cumulative' nullable

Controls whether Orb returns cumulative costs since the start of the billing period, or incremental day-by-day costs. If your customer has minimums or discounts, it's strongly recommended that you use the default cumulative behavior.

currencystring nullable

The currency or custom pricing unit to use.

Response

OK