Skip to content

Retrieve Balance History

Returns a paginated list of balance history objects related to the current authenticated account. The list is sorted, with the most recent entries appearing first by default.

Parameters

ParameterTypeDescription
sort_fieldenum optionalField you want to sort by. Possible values: amount, causer_type.
sort_orderstring optionalSorting order, can either be asc or desc.
limitinteger optionalLimit query result (when working with pagination).
filtersarray optionalAn array of filter criteria where each entry has the following keys.
filters[].fieldenumField you want to filter by. Possible values: id, amount, causer_type.
filters[].valuestringThe value to compare by.
filters[].operatorstringComparison operator (=: default, !=, >, <, =>, <=, is, is_not, in).

Returns

Returns a paginated collection of balance history objects. If no entries are found, returns an empty collection.

Request

Endpoint: https://api.youcanpay.com/account/balance-historyMethod: GET

bash
$ curl --location --request GET 'https://api.youcanpay.com/account/balance-history' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'

Response

json
{
  "data": [
    {
      "id": "70a5e31c-8b00-4fbd-bc0c-1736c6e5304a",
      "account_id": "4ad60bd6-52fa-46cc-ab67-e729fd166922",
      "display_amount": "-5,00 MAD",
      "causer_type": 3,
      "causer_id": "0ff1ca3b-4e50-4056-88d4-b0f822c38376",
      "causer_type_text": "transfer"
    },
    {...}
  ],
  "meta": {...}
}