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

# Get Statistics

> Endpoint to retrieve aggregated statistics (products, customers, and transactions) for your account

```bash Request Example theme={null}
curl --request GET 'https://api.mayar.id/hl/v2/statistics' \
 --header 'Authorization: Bearer Paste-Your-API-Key-Here'
```

```json Response Example 200 theme={null}
{
    "statusCode": 200,
    "messages": "success",
    "data": {
        "totalProduct": 167,
        "totalCustomer": 482,
        "totalTransaction": 425,
        "tpvTransaction": 1086750000
    }
}
```

Endpoint:

```Production Production theme={null}
https://api.mayar.id/hl/v2/statistics
```

```Sandbox Sandbox theme={null}
https://api.mayar.io/hl/v2/statistics
```

## Authorization

**Authorization** `string` *required*

Example:

`Authorization | Bearer Paste-Your-Api-Key-Here`

## Response

Successful Response

## Main Structure (Root)

**statusCode** `integer`

Status code returned by the API.

**messages** `string`

Status message that describes the status code.

**data** `object`

Aggregated statistics object for the authenticated account.

### data Structure (Object)

**data.totalProduct** `number`

Total number of products (payment links) created by the account (all-time).

**data.totalCustomer** `number`

Total number of customers of the account (all-time).

**data.totalTransaction** `number`

Total number of successful transactions of the account (all-time).

**data.tpvTransaction** `number`

Total payment volume (sum of successful transaction amounts) of the account in
IDR (all-time).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.