Get Balance History
GEThttps://api.cleverhub.co/api/v1/balances/history
Access a detailed history of balance transactions over a specified date range. This includes all balance changes in your account, such as incoming payments, refunds, top-ups, and other transactions. Use this endpoint to gain a comprehensive view of how balance values fluctuate due to account activity.
Note: This API currently supports only AUD (Australian Dollar) balances. Support for additional currencies is under development.
Request
Query Parameters
Start date for querying balance history in the format 'YYYY-MM-DDThh:mm:ssZ'. Defaults to UTC timezone.
End date for querying balance history in the format 'YYYY-MM-DDThh:mm:ssZ'. Defaults to UTC timezone.
The page number of the balance history results, for pagination purposes.
Number of records to display per page in the paginated response.
Responses
- 200
- 400
- 401
- 422
OK
- application/json
- Schema
- Example (auto)
Schema
The start date for the balance history retrieved.
2022-01-01T00:00:00Z
The end date for the balance history retrieved.
2022-01-31T23:59:59Z
The current page number of the response.
1
The number of records returned per page.
20
The page number of the next set of results, if available.
2
The total number of pages in the response.
10
The total number of records available across all pages.
200
records object[]
{
"from_date": "2022-01-01T00:00:00Z",
"to_date": "2022-01-31T23:59:59Z",
"page": 1,
"size": 20,
"next_page": 2,
"total_page": 10,
"total_count": 200,
"records": [
{
"id": "txn_01F8R97A2P9A9",
"amount": 150.75,
"request_type": "money_in",
"transaction_type": "payment",
"currency": "AUD",
"payment_method": "card",
"status": "done",
"reference_id": "ref_01F8R97A2P9A9",
"balance_detail": {
"outgoing": 120,
"total": 130,
"fees": 10
},
"created_at": "2022-01-15T12:30:00Z"
}
]
}
Bad Request
Unauthorized
Unprocessable Entity
Authorization: app-id
name: app-idtype: apiKeyin: headerdescription: A unique identifier assigned to each application.
name: secret-keytype: apiKeyin: headerdescription: A secure token associated with the `app-id`.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.cleverhub.co/api/v1/balances/history");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("app-id", "<app-id>");
request.Headers.Add("secret-key", "<app-id>");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());