How to calculate billing for subaccount usage

This endpoint allows you to calculate the billing incurred by a subaccount.

Let's say you created a subaccount for a customer and you needed to charge them for their usage. You can iterate over all of the calls and sum up the product of price and duration.

Example: If you want to calculate the bill of a subaccount for calls that began on Jan 15, 2018. You can fetch all the calls that started from this specified date. In the response, each object in the calls array contains a price property. Then, you can sum up the product of price and duration.

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

This represents your AccountSid.

Query Params
date

The specified start date for the subaccount billing you want to calculate.

int32

This specifies the number of resource to be returned in each list page. The default value is 50. Minimum: 1 Maximum: 1000

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