Account Stats
Get a list of various stats of your account.
Parameters
| Parameter | Type | Description |
|---|---|---|
fromDate | timestamp | From start date of paid transactions. |
toDate | timestamp | From end date of paid transactions. |
interval | enum | The interval days of paid transactions. Accepted values: today (paid transactions of today), yesterday (paid transactions of yesterday), thisWeek (paid transactions of this week). |
Returns
Returns an object of stats which contains a collection of paid transactions. If no stats are found, returns an object with an empty paid transactions collection.
Request
Endpoint: https://api.youcanpay.com/account/statsMethod: GET
bash
$ curl --location -g --request GET 'https://api.youcanpay.com/account/stats' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer YOUR_TOKEN_eyJpc3...'Response
json
{
"fromDate": "2020-01-01T16:34:08.000000Z",
"toDate": "2021-12-23T16:34:08.000000Z",
"totalRevenue": "0",
"paidTransactionsByDates": [
{
"date": "2020-01-01",
"totalAmount": 0
},
...
],
"acceptanceRatesByDates": [],
"creditCardsGroupedByBankName": [],
"creditCardsGroupedBrand": [],
"creditCardsGroupedByCountry": []
}