Upload Aadhaar XML Offline API

This API is used to submit the Aadhaar details in an XML file. The access token is required on the header. For more information on getting the access token, refer to Get Token API.

Steps to get Aadhar XML

  1. Go to URL https://myaadhaar.uidai.gov.in/en_IN.
  2. Click on login. Enter Aadhaar Number or VID and mentioned Security Code in the screen, then click on Send OTP.
  3. Enter the OTP received by registered mobile number for the given Aadhaar Number
  4. Click on Offline Ekyc Option & enter a share code which will be the password for the ZIP file and click on the Download button.
  5. The Zip file containing the digitally signed XML will be downloaded.

Endpoints


Request parameters

Parameter

Description

aadhaar_file mandatory

String This field must contain the Aadhaar xml/zip file location

aadhaar_share_code mandatory

String This field must contain the Aadhaar share code.

merchant_id mandatory

String The merchant ID that was provided by PayU.

Sample request

curl -X POST \
  'https://api.example.com/v3/merchants/kyc_document/aadhaar_xml_offline' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'Content-Type: multipart/form-data' \
  -F 'merchant_id=123456789' \
  -F 'aadhaar_share_code=1234-5678-9012' \
  -F 'aadhaar_file=@/path/to/your/aadhaar_file.xml'

Sample response

{
    "name": "Sardar Khan",
    "gender": "M",
    "dob": "1996-02-14",
    "address": " rz-276,ph-2, gopal nagar, NAJAFGARH, South West Delhi, Delhi, India, 110043",
    "pincode": 110043
  }