# Cashback

::: info
Every response arrives in the shared envelope — `code`, `message`, `messages`, `status_code`, `time` — with the payload in `data`. The tables below describe what is inside `data`.
:::

## GET /cashback/get-by-customer

Get the accrued cashback amount available for a specific customer.

**Required permission:** `cashback` · [how permissions work](https://docs.bito.uz/en/api/permissions.md)

**Example request**

::: code-group

```bash [curl]
curl -X GET 'https://api.bito.uz/integration-api/integration/api/v2/cashback/get-by-customer?customer_id=64b7f4d9e2b3b6a0b7c5d80a' \
  -H "api-key: $BITO_API_KEY"
```

```js [JavaScript]
const res = await fetch('https://api.bito.uz/integration-api/integration/api/v2/cashback/get-by-customer?customer_id=64b7f4d9e2b3b6a0b7c5d80a', {
  method: 'GET',
  headers: { 'api-key': process.env.BITO_API_KEY },
})
const { code, data } = await res.json()
```

```python [Python]
import os
import requests

res = requests.request(
    "GET",
    "https://api.bito.uz/integration-api/integration/api/v2/cashback/get-by-customer?customer_id=64b7f4d9e2b3b6a0b7c5d80a",
    headers={"api-key": os.environ["BITO_API_KEY"]},
)
print(res.json())
```

```php [PHP]
<?php
$ch = curl_init('https://api.bito.uz/integration-api/integration/api/v2/cashback/get-by-customer?customer_id=64b7f4d9e2b3b6a0b7c5d80a');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['api-key: ' . getenv('BITO_API_KEY')],
    CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);
```

:::

**Query parameters**

| Parameter | Type | Required | Description |
|---|---|---|---|
| `customer_id` | `string` | Yes |  |

**Request body**

No request body.

**Response**

| Field | Type | Description |
|---|---|---|
| `customer_id` | `string` |  |
| `cashback` | `number` |  |
| `currency_id` | `string` |  |

```json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "customer_id": "string",
    "cashback": 5000,
    "currency_id": "string"
  },
  "time": "2025-05-01T12:00:00Z"
}
```

---

*This page is generated from the OpenAPI spec.*
