get https://api.twilio.com/2010-04-01/Accounts//Calls.json?
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
.