Fetch Balance
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.
https://kraken.airpay.co.in/airpay/ms/cards/api/card-balanceHeader
Section titled “Header”| Field | Type | Description |
|---|---|---|
| token | text | Will be provided by Airpay (length 10, required) |
| checksum | text | $string = $param.self::$secret_key; sha256(<concate all values+SECRET KEY>);(dynamic, required) |
Parameter
Section titled “Parameter”| Field | Type | Description |
|---|---|---|
| entity_id | text | The Customer Id registered with the system (length 50, required) |
Request-Example:
Section titled “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 200
Section titled “Success 200”| Field | Type | Description |
|---|---|---|
| status | numeric | 400- fail,200-success(length 3, required) |
| message | text | Success, Fail(required) |
| data | json | {“balance”:”100”,”entity_id”:”111”,product_id:”General”}(required) |
Success-Response:
Section titled “Success-Response:”{ "status": 200, "message": "success", "data": { "entityId": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps", "balance": "440.0", "productId": "GENERAL" }}Fail-Response:
Section titled “Fail-Response:”{ "status": 400, "message": "fail"}