๐Ÿงพ Billing Statements: How to Use It

Clara allows you to access billing statements programmatically through its API. These statements summarize monthly transactions and charges by account and are essential for reconciliation, reporting, or audit processes.

The API provides endpoints to:

  1. Retrieve all billing statements
  2. Retrieve a specific billing statement by UUID
  3. Retrieve all transactions from a specific billing statement

Each of these endpoints returns structured financial data, including statement periods, totals, and associated transaction details.


1๏ธโƒฃ Retrieve All Billing Statements

Use this endpoint to list all billing statements associated with the account.

๐Ÿ”— Endpoint

GET /v3/billing-statements

๐Ÿ“ค cURL Request

curl -X GET \
"https://public-api.mx.clara.com/api/v3/billing-statements" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

๐Ÿ“ฅ Sample JSON Response

[
  {
    "uuid": "e4a50134-447f-4c34-b6b6-78cdb43d3fd5",
    "statementStartDate": "2024-06-01",
    "statementEndDate": "2024-06-30",
    "currency": "MXN",
    "totalAmount": 10000.00
  }
]

2๏ธโƒฃ Retrieve a Billing Statement by UUID

Use this endpoint to retrieve the full details of a specific billing statement, including amounts, dates, and metadata.

๐Ÿ”— Endpoint

GET /v3/billing-statements/{uuid}

๐Ÿ“ค cURL Request

curl -X GET \
"https://public-api.mx.clara.com/api/v3/billing-statements/e4a50134-447f-4c34-b6b6-78cdb43d3fd5" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

๐Ÿ“ฅ Sample JSON Response

{
  "uuid": "e4a50134-447f-4c34-b6b6-78cdb43d3fd5",
  "currency": "MXN",
  "totalAmount": 10000.00,
  "statementStartDate": "2024-06-01",
  "statementEndDate": "2024-06-30",
  "status": "closed",
  "generatedAt": "2024-07-01T10:00:00Z"
}

3๏ธโƒฃ Retrieve Transactions from a Billing Statement

Use this endpoint to get all transactions associated with a given billing statement.

๐Ÿ”— Endpoint

GET /v3/billing-statements/{uuid}/transactions

๐Ÿ“ค cURL Request

curl -X GET \
"https://public-api.mx.clara.com/api/v3/billing-statements/e4a50134-447f-4c34-b6b6-78cdb43d3fd5/transactions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

๐Ÿ“ฅ Sample JSON Response

[
  {
    "uuid": "0fa38f1b-8ae6-4ac6-9171-d3dba4dfecbe",
    "amount": 1200.00,
    "currency": "MXN",
    "description": "Flight booking",
    "category": "Travel",
    "date": "2024-06-10"
  }
]

๐Ÿ’ก Tip: Billing statements and their transactions are useful for automating your month-end reconciliation process.

โš ๏ธ Note: The sample data shown is for illustrative purposes only and does not represent actual financial or tax calculations.