---
title: DigiLocker
description: Fetch Aadhaar and PAN card details from DigiLocker using mobile number and authorization stage.
---

This api is used to fetch the aadhaar and pancard details from DigiLocker. We have to pass mobile number and stage in request.If the request have valid data we will get a success response.

#### POST

```
https://kraken.airpay.co.in/airpay/ms/baas/api/DigiLocker
```

## Header

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

## Request Body

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| mobile_no  required | Text  <br>(10) | mobile number | `9XXXXXX110` |
| stage  required | Text | stage (authorization/xml) | `authorization` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| status  required | Numeric<br>(`3`) | 400- fail,200-success | `400,200` |
| message  required | Text | success, fail | `success,fail` |
| data  required | Text | { "url":"https://example.arpy.co.in/digiresponse.php?access_code=Ulg7XW9nREJFUlxgy2ZQZ1BPYn2uO3pfR116Y0dmQHlZZztFaTlxkXGFYYjZ11XWFbclhhP09", } |

## Request Example Authorization API

```
 curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/DigiLocker' \
--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
// --header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'mobile_no=9XXXXXX110' \
--data-urlencode 'stage=authorization' \
```

### Success Response Authorization API

```
{
    "status": 200,
    "message": "success",
    "data": {
        "url": "https://baas.airpay.co.in/digiresponse.php?access_code=Ulg7XW9nREJFUlxgy2ZQZ1BPYn2uO3pfR116Y0dmQHlZZztFaTlxkXGFYYjZ11XWFbclhhP09ZYURaWE9AT35cRGtvZ1hCWGBIa1xOSzteZlhERF87PFlSekRYT2Y+"
    }
}
```

### Error Response

```
{
    "status": "400",
    "message": "Failed",
    "data": ""
}
```