AmpleTrails, Gurugram · since 2012 +91 93154 41053 WhatsApp info@ampletrails.com Developer guide · Guides
Products
Identity verificationBusiness verification (KYB)Bank, income & creditFace match & OCRVideo KYC, eSign & flowsCompliance & riskPayouts & messagingAll 52 APIs
Use cases
Customer onboarding (KYC)Merchant & seller onboarding (KYB)Vendor & supplier verificationEmployee background checksGig and field worker onboardingLoan underwritingPayout and refund validationDuplicate and synthetic identity detection
Industries
Fintech & Digital LendingBanks & NBFCsInsuranceBroking, Mutual Funds & WealthCrypto & VDA PlatformsReal-money GamingE-commerce & MarketplacesStaffing, Gig & HRTelecomMobility & LogisticsReal Estate & RentalsB2B & Procurement
Resources
GuidesGlossaryFAQSecurity & data
DevelopersPricingAbout
Theme
Get API keysCall +91 93154 41053

Offline Aadhaar Verification API (XML / QR)

You send the offline eKYC ZIP with its share code, or the data from the secure QR on the card. We check UIDAI's digital signature and return the name, DOB, gender, address and photo inside it.

Identity document · sample NameRAVI KUMAR NumberABCDE1234F Matches the record Name match96 / 100 PAN statusOperative Aadhaar linkLinked
Source
UIDAI-signed offline eKYC XML or secure QR code (verified against UIDAI's public signing certificate)
Turnaround
Real time, under a second or two, since no live call to UIDAI is needed
Endpoint
POST /v1/aadhaar/offline/verify
Who can use it
Open to any business with the user's consent. This is the route UIDAI intends for private companies that are not allowed to do OTP eKYC.

Overview

Offline Aadhaar is how a private company can verify Aadhaar details without being an authentication user agency. The user downloads a signed XML (or you scan the secure QR on their card), and we check UIDAI's signature. If the signature holds, the data inside has not been changed.

Good to know

The file can be up to a few days old and doesn't prove the person holding the phone is the Aadhaar holder. Add a selfie match for that.

What you get

  • Signature check, not OCRWe verify UIDAI's digital signature, so an edited name or address fails, even if the photo looks right.
  • No Aadhaar number exposedThe XML carries a reference ID, not the full Aadhaar number, which keeps you clear of storage rules.
  • Works with the card QRUsers without a smartphone can just show their printed Aadhaar. Scan the QR and send us the data.
  • Freshness checkWe return when the file was generated, so you can reject files older than your policy allows.

Request

POST https://api.ampletrails.com/v1/aadhaar/offline/verify

FieldTypeStatusDescription
file_base64stringOptionalOffline eKYC ZIP or XML file, base64 encoded (use this or qr_data)
share_codestringOptional4-character share code set by the user when downloading the ZIP
qr_datastringOptionalRaw data scanned from the secure Aadhaar QR code
consentstringRequiredY if the user has given explicit consent

Response

Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.

FieldMeaningExample
signature_validWhether UIDAI's digital signature on the file or QR is validtrue
full_nameName as per AadhaarRavi Kumar
dobDate of birth1990-04-12
genderGender: M, F or TM
address.stateStateHaryana
address.pincodePIN code122001
photo_base64Photograph embedded in the file, base64 encoded/9j/4AAQSkZJRg...
reference_idReference ID from the XML (last 4 digits of Aadhaar plus timestamp)4321202612041530
generated_atWhen the offline file was generated2026-12-04T15:30:00+05:30

Example

curl -X POST https://api.ampletrails.com/v1/aadhaar/offline/verify \
  -H "Authorization: Bearer $AMPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_base64": "UEsDBBQAAAAI...", "share_code": "1234", "qr_data": "2374971804270526477...", "consent": "Y"}'
Response · 200 OK
{
  "status": "success",
  "request_id": "req_7f3a9c21e4",
  "data": {
    "signature_valid": true,
    "full_name": "Ravi Kumar",
    "dob": "1990-04-12",
    "gender": "M",
    "address": {
      "state": "Haryana",
      "pincode": "122001"
    },
    "photo_base64": "/9j/4AAQSkZJRg...",
    "reference_id": "4321202612041530",
    "generated_at": "2026-12-04T15:30:00+05:30"
  }
}

Example data. The exact field list for your account comes with your sandbox documentation.

Use cases

Fintech and gaming KYC

Companies that cannot do OTP eKYC use offline XML as their main Aadhaar route.

Rental and co-living

Operators scan the QR on a tenant's Aadhaar card at check-in instead of filing a photocopy.

Field onboarding

Agents scan the QR on a printed card in places with poor connectivity and sync later.

Questions about this API

How does the user get the XML file?

From the myAadhaar portal or the mAadhaar app: they choose Offline eKYC, set a four-character share code and download a ZIP. They share the ZIP and the code with you.

What if the share code is wrong?

The ZIP can't be opened, and we return INVALID_SHARE_CODE. Ask the user to re-enter it; most mistakes are a capital letter.

Can a user edit the XML before sending?

They can try, but any change breaks the UIDAI signature, and signature_valid comes back false.

Do old printed cards have a secure QR?

Cards printed in roughly the last several years have the secure (signed) QR. Very old cards carry a plain QR that is not signed; we flag those so you can ask for the XML instead.

Try the Offline Aadhaar Verification API (XML / QR) API

Sandbox keys, the full field reference and a Postman collection, usually within a working day.