---
title: Fetch Balance
description: Fetch the combined balance of a customer's prepaid card by entity ID.
---

This API is used to fetch combined balance of a user on the card. We must pass entity id in request. If the request has valid details, we will get entity id, balance, and product id of that card.

#### POST
```
https://kraken.airpay.co.in/airpay/ms/cards/api/card-balance
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| token  required | text<br>(`1-10`) | Will be provided by airpay | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |
| checksum  required | text | $string = $param.self::$secret_key; sha256(<concate all values+SECRET KEY>);(dynamic, required) | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| entity_id  required | text  <br>(1-50) | The Customer Id registered with the system | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| status  required | numeric<br>(`1-3`) | airpay status | `400,200` |
| message  required | text | airpay status message | `Success,Fail` |
| data  required | json | {"balance":"100","entity_id":"111",product_id:"General"}(required) |

## Request Example

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/cards/api/card-balance' \
--header 'token: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'entity_id=91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps'
```

### Success Response

```json
{
    "status": 200,
    "message": "success",
    "data": {
        "entityId": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps",
        "balance": "440.0",
        "productId": "GENERAL"
    }
}
```

### Error Response

```json
{
    "status": 400,
    "message": "fail"
}
```