---
title: KYC OCR
description: Extract information from KYC documents like PAN and Aadhaar using OCR image processing.
---

This api is for retrieving information from KYC documents like PAN and Aadhar. We have to pass document image and document type in request. If the document image and type are valid, we will get a success response.

#### POST

```
https://kraken.airpay.co.in/airpay/ms/baas/api/kyc-ocr
```

## Header

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| affiliate  required | Text | Will be provided by airpay | `91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps` |
| checksum  required | Text | $string = $param.self::$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 |
| --- | --- | --- | --- |
| img  required | Image | Supported document types: JPEG, JPG, PNG, Image file size: 4MB | `pan-card.jpg` |
| doc_type  required | Text | Permanent Account Number (Pan), Aadhaar, E-aadhaar, Aadhar-front, Aadhar-back | `Pan` |

## Success 200

| Parameter | Type Value | Description | Value Like |
| --- | --- | --- | --- |
| status  required | Numeric | 400- fail,200-success(length 3) | `400,200` |
| message  required | Text | success, fail | `success,fail` |
| data  required | Text | [ { "details": { "dateOfBirth": { "value": "01/01/1993", "conf": "" }, "father": { "value": "RAMESH KM", "conf": "" }, "name": { "value": "RAHUL R", "conf": "" }, "panNo": { "value": "BABCD1234G", "conf": "" } }, "type": "Pan" } ] |

## Request Example

```
curl --location --request POST 'https://kraken.airpay.co.in/airpay/ms/baas/api/kyc-ocr' \
--header 'api-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'affiliate: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'checksum: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--header 'processor-key: 91f5evhk72f56432ec678sdfes685h42sd2t21k430912508233b7r37562g2hps' \
--form 'img="pan-card.jpg"' \
--form 'doc_type="Pan"'
```

### Success Response

```
{
    "status": "200",
    "message": "success",
    "data": [
        {
            "details": {
                "dateOfBirth": {
                    "value": "01/01/1993",
                    "conf": ""
                },
                "father": {
                    "value": "Ramesh KM",
                    "conf": ""
                },
                "name": {
                    "value": "RAHUL R",
                    "conf": ""
                },
                "panNo": {
                    "value": "BABCD1234G",
                    "conf": ""
                }
            },
            "type": "Pan"
        }
    ]
}
```

### Error Response

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