Get monthly charges summary
Retrieve a summary of monthly charges for a specified date range. The date range cannot exceed 31 days.
GET
/
charges_summary
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const chargesSummary = await client.chargesSummary.retrieve({
end_date: '2025-06-01',
start_date: '2025-05-01',
});
console.log(chargesSummary.data);import os
from datetime import date
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
charges_summary = client.charges_summary.retrieve(
end_date=date.fromisoformat("2025-06-01"),
start_date=date.fromisoformat("2025-05-01"),
)
print(charges_summary.data)
package main
import (
"context"
"fmt"
"time"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
chargesSummary, err := client.ChargesSummary.Get(context.TODO(), telnyx.ChargesSummaryGetParams{
EndDate: time.Now(),
StartDate: time.Now(),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", chargesSummary.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.chargessummary.ChargesSummaryRetrieveParams;
import com.telnyx.sdk.models.chargessummary.ChargesSummaryRetrieveResponse;
import java.time.LocalDate;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ChargesSummaryRetrieveParams params = ChargesSummaryRetrieveParams.builder()
.endDate(LocalDate.parse("2025-06-01"))
.startDate(LocalDate.parse("2025-05-01"))
.build();
ChargesSummaryRetrieveResponse chargesSummary = client.chargesSummary().retrieve(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
charges_summary = telnyx.charges_summary.retrieve(end_date: "2025-06-01", start_date: "2025-05-01")
puts(charges_summary)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$chargesSummary = $client->chargesSummary->retrieve(
endDate: '2025-06-01', startDate: '2025-05-01'
);
var_dump($chargesSummary);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx charges-summary retrieve \
--api-key 'My API Key' \
--end-date "'2025-06-01'" \
--start-date "'2025-05-01'"curl --request GET \
--url https://api.telnyx.com/v2/charges_summary \
--header 'Authorization: Bearer <token>'{
"data": {
"user_id": "0db0b4aa-a83d-4d4f-ad9b-3ba7c1ac2ce8",
"start_date": "2025-05-01",
"end_date": "2025-06-01",
"user_email": "user@example.com",
"currency": "USD",
"summary": {
"lines": [
{
"type": "comparative",
"name": "Local DIDs",
"alias": "local",
"new_this_month": {
"quantity": 10,
"mrc": "25.50",
"otc": "5.00"
},
"existing_this_month": {
"quantity": 8,
"mrc": "20.00"
}
},
{
"type": "simple",
"name": "Port Out",
"alias": "port_out",
"quantity": 100,
"amount": "15.75"
}
],
"adjustments": [
{
"amount": "-10.00",
"description": "Credit for service outage",
"event_date": "2025-05-15"
}
]
},
"total": {
"new_mrc": "50.00",
"new_otc": "25.00",
"existing_mrc": "100.00",
"other": "10.00",
"credits": "-5.00",
"ledger_adjustments": "0.00",
"grand_total": "180.00"
}
}
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The request failed because it was not well-formed."
}
]
}{
"errors": [
{
"code": "10027",
"title": "Unprocessable Entity",
"detail": "The server understood the syntax of the request but was unable to process the instructions."
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured."
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Start date for the charges summary in ISO date format (YYYY-MM-DD)
Example:
"2025-05-01"
End date for the charges summary in ISO date format (YYYY-MM-DD). The date is exclusive, data for the end_date itself is not included in the report. The interval between start_date and end_date cannot exceed 31 days.
Example:
"2025-06-01"
Response
Monthly charges summary
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const chargesSummary = await client.chargesSummary.retrieve({
end_date: '2025-06-01',
start_date: '2025-05-01',
});
console.log(chargesSummary.data);import os
from datetime import date
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
charges_summary = client.charges_summary.retrieve(
end_date=date.fromisoformat("2025-06-01"),
start_date=date.fromisoformat("2025-05-01"),
)
print(charges_summary.data)
package main
import (
"context"
"fmt"
"time"
"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)
func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
chargesSummary, err := client.ChargesSummary.Get(context.TODO(), telnyx.ChargesSummaryGetParams{
EndDate: time.Now(),
StartDate: time.Now(),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", chargesSummary.Data)
}
package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.chargessummary.ChargesSummaryRetrieveParams;
import com.telnyx.sdk.models.chargessummary.ChargesSummaryRetrieveResponse;
import java.time.LocalDate;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
ChargesSummaryRetrieveParams params = ChargesSummaryRetrieveParams.builder()
.endDate(LocalDate.parse("2025-06-01"))
.startDate(LocalDate.parse("2025-05-01"))
.build();
ChargesSummaryRetrieveResponse chargesSummary = client.chargesSummary().retrieve(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
charges_summary = telnyx.charges_summary.retrieve(end_date: "2025-06-01", start_date: "2025-05-01")
puts(charges_summary)<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Telnyx\Client;
use Telnyx\Core\Exceptions\APIException;
$client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API Key');
try {
$chargesSummary = $client->chargesSummary->retrieve(
endDate: '2025-06-01', startDate: '2025-05-01'
);
var_dump($chargesSummary);
} catch (APIException $e) {
echo $e->getMessage();
}telnyx charges-summary retrieve \
--api-key 'My API Key' \
--end-date "'2025-06-01'" \
--start-date "'2025-05-01'"curl --request GET \
--url https://api.telnyx.com/v2/charges_summary \
--header 'Authorization: Bearer <token>'{
"data": {
"user_id": "0db0b4aa-a83d-4d4f-ad9b-3ba7c1ac2ce8",
"start_date": "2025-05-01",
"end_date": "2025-06-01",
"user_email": "user@example.com",
"currency": "USD",
"summary": {
"lines": [
{
"type": "comparative",
"name": "Local DIDs",
"alias": "local",
"new_this_month": {
"quantity": 10,
"mrc": "25.50",
"otc": "5.00"
},
"existing_this_month": {
"quantity": 8,
"mrc": "20.00"
}
},
{
"type": "simple",
"name": "Port Out",
"alias": "port_out",
"quantity": 100,
"amount": "15.75"
}
],
"adjustments": [
{
"amount": "-10.00",
"description": "Credit for service outage",
"event_date": "2025-05-15"
}
]
},
"total": {
"new_mrc": "50.00",
"new_otc": "25.00",
"existing_mrc": "100.00",
"other": "10.00",
"credits": "-5.00",
"ledger_adjustments": "0.00",
"grand_total": "180.00"
}
}
}{
"errors": [
{
"code": "10015",
"title": "Bad Request",
"detail": "The request failed because it was not well-formed."
}
]
}{
"errors": [
{
"code": "10027",
"title": "Unprocessable Entity",
"detail": "The server understood the syntax of the request but was unable to process the instructions."
}
]
}{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured."
}
]
}