---
title: Topup Card
description: Top up a customer's prepaid card balance using affiliate wallet or direct payment.
---

In this api we will be toping up the customer's card. If the affiliate has prepaid wallet we will check the balance of the affiliate wallet and let customer do the topup and send an email to affiliate. If affiliate is postpaid we will allow customer to topup directly.

#### POST
```
https://kraken.airpay.co.in/airpay/ms/cards/api/topup
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| token  required | text<br>(`1-10`) | `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` |
| amount  required | numeric | 00.00 | `1` |

## 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 | {"transaction_id":""} |

## Request Example

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

### Success Response

```json
{
    "status": 200,
    "message": "success",
    "data": {
        "transaction_id": ""
    }
}
```

### Error Response

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