---
title: Card Replacement
description: Submit a card replacement request with a new card.
---

This API is used for card replacement request with a new one. We must pass entity id, kit no, dob and expiry date in request. If the request has valid details, we will get a success response along with card no, cardtype, kit no and cvv.

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

## Header

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

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| entity_id  required | text  <br>(1-50) | The Customer Id registered with the system | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |
| old_kit_no  optional | text | Kit no.of old card which need to replace |
| new_kit_no  optional | numeric | New kit no for new card |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| status  required | numeric | airpay status | `400,200` |
| message  required | text | airpay status message | `Success,Fail` |
| data  required | json | [] |

## Request Example

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

### Success Response

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

### Error Response

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