---
title: Login
description: Authenticate a prepaid card portal user and generate a session token valid for 30 minutes.
---

To manage the card of a customer, prepaid card portal access will be provided. To login, we need to enter credentials. This API is to create user identification token. All user related action requires token which will expire in 30 min. We must pass mobile no and password in request. If the request has valid details, token will be generated.

#### POST
```
https://kraken.airpay.co.in/airpay/ms/cards/api/user-login
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| affiliate  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` |
| processor-key  required | text | Will be provided by airpay(constant, required) | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| mobile_no  required | numeric  <br>(1-10) | Mobile number of customer | `9XXXXXX978` |
| password  required | text  <br>(1-20) | Password of customer | `Apswd@1234` |

## 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 | {"token":"12w234"} |

## Request Example

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/cards/api/user-login' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'mobile_no=9XXXXXX978' \
--data-urlencode 'password=Apswd@1234'
```

### Success Response

```json
{
    "status": 200,
    "message": "success",
    "data": {
        "token": "91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps"
    }
}
```

### Error Response

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