> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get monthly charges summary

> Retrieve a summary of monthly charges for a specified date range. The date range cannot exceed 31 days.



## OpenAPI

````yaml /openapi/source/external/billing/charges.json get /charges_summary
openapi: 3.1.0
info:
  title: Telnyx API
  version: 2.0.0
  x-latency-category: responsive
  x-endpoint-cost: light
  description: Monthly charges summary information.
  license:
    name: MIT
    url: https://github.com/openai/openai-openapi/blob/master/LICENSE
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Monthly Charges
    description: Monthly Charges Report
paths:
  /charges_summary:
    get:
      summary: Get monthly charges summary
      description: >-
        Retrieve a summary of monthly charges for a specified date range. The
        date range cannot exceed 31 days.
      operationId: GetMonthlyChargesSummary
      parameters:
        - name: start_date
          in: query
          description: Start date for the charges summary in ISO date format (YYYY-MM-DD)
          required: true
          schema:
            type: string
            format: date
            example: '2025-05-01'
        - name: end_date
          in: query
          description: >-
            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.
          required: true
          schema:
            type: string
            format: date
            example: '2025-06-01'
      responses:
        '200':
          description: Monthly charges summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonthlyChargesSummaryResponse'
        '400':
          $ref: '#/components/responses/BadRequestErrorResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntityErrorResponse'
        default:
          $ref: '#/components/responses/GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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);
        - lang: Python
          source: |
            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)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tchargesSummary, err := client.ChargesSummary.Get(context.TODO(), telnyx.ChargesSummaryGetParams{\n\t\tEndDate:   time.Now(),\n\t\tStartDate: time.Now(),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", chargesSummary.Data)\n}\n"
        - lang: Java
          source: >-
            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);
                }
            }
        - lang: Ruby
          source: >-
            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)
        - lang: PHP
          source: >-
            <?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();
            }
        - lang: CLI
          source: |-
            telnyx charges-summary retrieve \
              --api-key 'My API Key' \
              --end-date "'2025-06-01'" \
              --start-date "'2025-05-01'"
components:
  schemas:
    MonthlyChargesSummaryResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/SummaryAndTotal'
      required:
        - data
    SummaryAndTotal:
      type: object
      properties:
        user_id:
          type: string
          description: User identifier
          example: 0db0b4aa-a83d-4d4f-ad9b-3ba7c1ac2ce8
        start_date:
          type: string
          format: date
          description: Start date of the summary period
          example: '2025-05-01'
        end_date:
          type: string
          format: date
          description: End date of the summary period
          example: '2025-06-01'
        user_email:
          type: string
          format: email
          description: User email address
          example: user@example.com
        currency:
          type: string
          description: Currency code
          example: USD
        summary:
          $ref: '#/components/schemas/Summary'
        total:
          $ref: '#/components/schemas/TotalSummary'
      required:
        - user_id
        - start_date
        - end_date
        - user_email
        - currency
        - summary
        - total
    Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
    Summary:
      type: object
      properties:
        lines:
          type: array
          items:
            $ref: '#/components/schemas/SummaryLine'
          description: List of charge summary lines
        adjustments:
          type: array
          items:
            $ref: '#/components/schemas/AdjustmentLine'
          description: List of billing adjustments
      example:
        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'
      required:
        - lines
        - adjustments
    TotalSummary:
      type: object
      properties:
        new_mrc:
          type: string
          description: Total new monthly recurring charges as decimal string
          example: '50.00'
        new_otc:
          type: string
          description: Total new one-time charges as decimal string
          example: '25.00'
        existing_mrc:
          type: string
          description: Total existing monthly recurring charges as decimal string
          example: '100.00'
        other:
          type: string
          description: Other charges as decimal string
          example: '10.00'
        credits:
          type: string
          description: Total credits as decimal string
          example: '-5.00'
        ledger_adjustments:
          type: string
          description: Ledger adjustments as decimal string
          example: '0.00'
        grand_total:
          type: string
          description: Grand total of all charges as decimal string
          example: '180.00'
      required:
        - new_mrc
        - new_otc
        - existing_mrc
        - other
        - credits
        - ledger_adjustments
        - grand_total
    Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
          format: integer
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
    SummaryLine:
      oneOf:
        - $ref: '#/components/schemas/ComparativeLine'
        - $ref: '#/components/schemas/SimpleLine'
      discriminator:
        propertyName: type
    AdjustmentLine:
      type: object
      properties:
        amount:
          type: string
          description: Adjustment amount as decimal string
          example: '-10.00'
        description:
          type: string
          description: Description of the adjustment
          example: Credit for service outage
        event_date:
          type: string
          format: date
          description: Date when the adjustment occurred
          example: '2025-05-15'
      required:
        - amount
        - description
        - event_date
    ComparativeLine:
      type: object
      properties:
        type:
          type: string
          enum:
            - comparative
          example: comparative
        name:
          type: string
          description: Service name
          example: Local DIDs
        alias:
          type: string
          description: Service alias
          example: local
        new_this_month:
          $ref: '#/components/schemas/MonthDetail'
        existing_this_month:
          $ref: '#/components/schemas/MonthDetail'
      required:
        - type
        - name
        - alias
        - new_this_month
        - existing_this_month
    SimpleLine:
      type: object
      properties:
        type:
          type: string
          enum:
            - simple
          example: simple
        name:
          type: string
          description: Service name
          example: Port Out
        alias:
          type: string
          description: Service alias
          example: port_out
        quantity:
          type: integer
          description: Number of items
          example: 100
        amount:
          type: string
          description: Total amount as decimal string
          example: '15.75'
      required:
        - type
        - name
        - alias
        - quantity
        - amount
    MonthDetail:
      type: object
      properties:
        quantity:
          type: integer
          description: Number of items
          example: 10
        mrc:
          type: string
          description: Monthly recurring charge amount as decimal string
          example: '25.50'
        otc:
          type:
            - string
            - 'null'
          description: One-time charge amount as decimal string
          example: '5.00'
      required:
        - quantity
        - mrc
  responses:
    BadRequestErrorResponse:
      description: Invalid request parameters or date range
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10015'
                title: Bad Request
                detail: The request failed because it was not well-formed.
    UnprocessableEntityErrorResponse:
      description: User account not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10027'
                title: Unprocessable Entity
                detail: >-
                  The server understood the syntax of the request but was unable
                  to process the instructions.
    GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
          example:
            errors:
              - code: '10007'
                title: Unexpected error
                detail: An unexpected error occured.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````