- Qubitara eSign
- Developers
- Aadhaar eSign API
Aadhaar eSign API
This page is for developers who want to add Aadhaar-based eSign to their own workflows. It explains how the redirect flow set by the CCA works through Qubitara eSign. It also shows what your code sees at each step and how to verify the result.
Roles in an Aadhaar eSign transaction#
India's Controller of Certifying Authorities (CCA) sets the standard for Aadhaar eSign. Three parties take part (CCA eSign API v2.1 (opens in a new tab), CCA eSign FAQ (opens in a new tab)):
Party | Who | Role |
|---|---|---|
ASP (Application Service Provider) | Qubitara eSign | Builds the signed request containing the document hash, redirects the signer, receives the signed response, embeds the signature in the PDF |
ESP (eSign Service Provider) | A CCA-empanelled Certifying Authority (which one is not decided) | Authenticates the signer through Aadhaar e-KYC, generates the key pair on an HSM, issues a single-use certificate, signs the hash |
e-KYC provider | UIDAI | Sends the OTP to the Aadhaar-registered mobile and returns e-KYC data to the ESP |
Your application is a client of the ASP. You never talk to the ESP or UIDAI directly. You never handle the Aadhaar number of the signer.
The CCA rules say that "the functions of obtaining consent from the signer and its logs should be with ASP only". An ASP may add eSign only to applications that it owns or operates (CCA eSign service FAQ (opens in a new tab)).
The current CCA list of empanelled ESPs is eMudhra, C-DAC, Capricorn, Protean eGov, Verasys, CSC e-Governance and CDSL Ventures (CCA empanelled ESPs (opens in a new tab)).
What is sent#
Only a SHA-256 hash of the document leaves the ASP. A hash is a short fingerprint of the file. Nobody can rebuild the document from it.
CCA states: "The privacy of signer's information is protected by sending only the one-way hash of the document to eSign online Electronic Signature Service provider" (CCA eSign FAQ (opens in a new tab)).
The CCA guidelines also say (CCA e-authentication guidelines (opens in a new tab)):
The ESP generates the key pair on a FIPS 140-2 Level 3 HSM.
The certificate is valid for no more than 30 minutes and is used once.
The private key is destroyed after signing.
Flow#
Your app ──1. create request, signature_type: aadhaar_otp──▶ eSign API
Signer ──2. opens signing link (email or embedded URL)────▶ eSign signer page
──3. consent screen ("I authorise ...")────────────▶ eSign
eSign ──4. signed XML request (doc hash, txn, aspId)─────▶ ESP
ESP ──5. Aadhaar number / VID + OTP ◀──────────────────▶ Signer (UIDAI OTP)
ESP ──6. signed response XML (PKCS#7, certificate)─────▶ eSign callback (responseUrl)
eSign ──7. embeds PKCS#7 into PDF; status: signed────────▶ webhook to your app
Your app ──8. GET status / download signed PDF─────────────▶ eSign APISteps 4 to 6 are the CCA v2.1 redirect model (CCA eSign API v2.1 (opens in a new tab)):
The ASP posts a digitally signed XML request to the ESP.
The ESP validates the ASP and redirects the user to e-authentication.
The ESP retrieves the e-KYC data and shows the document hash and information to the user.
The ESP obtains a certificate from the CA.
The ESP redirects back to the
responseUrlof the ASP with a signed response.
The ESP callback URL belongs to Qubitara, not to you. Your callback is the webhook in step 7 of the flow.
Step 1: Request Aadhaar eSign for a recipient#
Set signature_type on the recipient when you create a signature request. See Signature requests.
curl -X POST "https://<org>.esign.qubitara.com/api/v1/signature-requests" \
-H "Authorization: Bearer $QUBITARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Loan agreement",
"document_id": "doc_01J8Z0QWERTY",
"recipients": [
{ "role": "signer", "order": 1, "name": "Asha Rao", "email": "[email protected]",
"signature_type": "aadhaar_otp",
"aadhaar": { "expected_name": "Asha Rao", "expected_birth_year": 1990 } }
],
"fields": [
{ "type": "signature", "recipient": 0, "page": 6, "x": 72, "y": 620, "width": 180, "height": 60 }
],
"send": true
}'The planned signature_type values are electronic (drawn or typed), aadhaar_otp, aadhaar_biometric, aadhaar_face and dsc.
The aadhaar.expected_name and expected_birth_year properties are optional and planned. They check the e-KYC response. Indian vendors use this pattern to catch the use of a wrong Aadhaar.
The recipient needs two things:
An Aadhaar number or a 16-digit Virtual ID (VID).
For OTP mode, access to the mobile number registered with UIDAI.
The VID is "a temporary, revocable 16-digit random number mapped with the Aadhaar number". The signer can use it in place of the Aadhaar number (Protean ESP VID instructions (opens in a new tab)).
Step 2: What the signer sees#
The signer arrives by email link or by an embedded signing URL. In both cases the signer page does this:
Shows the document and the fields.
Shows the consent text (below). The signer must tick the box.
Sends the signer to the ESP page. There the signer enters an Aadhaar number or VID, asks for an OTP, enters it and confirms.
Returns the signer to eSign. eSign embeds the signature and shows the completed state.
The sender sees the transaction under Aadhaar eSign → My eSign Transactions in the app. See Aadhaar eSign.
Consent text#
CCA requires the ASP front end to obtain "explicit informed signatory's consent" before processing. The consent authorises these actions:
Retrieval of the signer's data from the e-KYC provider.
Generation and submission of the certificate application.
Key-pair generation.
Signing of the submitted hash.
Deletion of the key pair after signing.
"If eSign user does not provide this explicit consent, application SHOULD NOT process data" (CCA eSign API v2.1 (opens in a new tab)).
This is the planned consent text that Qubitara eSign shows. Your embedded UI must not hide it and must not tick the box for the signer:
I hereby authorize Qubitara eSign to (1) use my Aadhaar / Virtual ID details for Aadhaar based e-KYC authentication with UIDAI through the eSign Service Provider for the purpose of eSigning this document; (2) authenticate my identity through the OTP sent to my Aadhaar-registered mobile number; (3) generate a key pair and obtain a one-time Digital Signature Certificate in my name; (4) digitally sign the hash of this document; and (5) delete the key pair after signing. I understand that only the hash of the document is shared with the eSign Service Provider.
The final wording may change. ESPs often require their own consent text.
Step 3: Callback and events#
You do not receive the ESP callback. Qubitara eSign (the ASP) receives the signed response XML at its responseUrl. It then does three things (CCA eSign API v2.1 (opens in a new tab)):
It verifies the XML signature of the ESP ("Signature of ESP, which can be used for verification by ASP and protect the response from any kind of tamper").
It stores the ESP transaction code (
resCode, which the spec says the ASP "is expected to store ... in their audit log").It embeds the PKCS#7 signature into the PDF.
The plan is that a webhook then tells your application:
{
"id": "evt_01J8ZAADHAAR",
"type": "aadhaar_esign.completed",
"created_at": "2026-09-28T10:05:12Z",
"data": {
"signature_request_id": "sr_01J8Z1ABCXYZ",
"recipient_id": "rcp_01J8Z2AAA",
"transaction": {
"id": "aet_01J8ZTXN",
"status": "completed",
"auth_mode": "otp",
"esp": "<ESP name>",
"esp_transaction_id": "<resCode>",
"asp_txn": "<txn>",
"certificate": {
"subject_cn": "Asha Rao",
"issuer": "<ESP sub-CA>",
"serial": "0A1B...",
"not_before": "2026-09-28T10:04:40Z",
"not_after": "2026-09-28T10:34:40Z"
},
"document_sha256": "9f2c...e1"
}
}
}A document.signed event follows for the recipient. On failure, aadhaar_esign.failed carries transaction.status: "failed", error.code and error.message. See the error cases below.
In redirect or embedded mode, the plan is that the browser of the signer also lands on your return_url with event=signed or event=error&code=.... Use that only to show a result page. The webhook or a GET gives the true state.
Step 4: Poll the status#
If you cannot receive webhooks, poll the transaction. The ESP finishes later, not at once. A transaction can stay in pending while the signer waits for the OTP.
curl "https://<org>.esign.qubitara.com/api/v1/aadhaar-esign/transactions/aet_01J8ZTXN" \
-H "Authorization: Bearer $QUBITARA_API_KEY"{ "id": "aet_01J8ZTXN", "status": "pending", "auth_mode": "otp", "created_at": "2026-09-28T10:03:00Z", "expires_at": "2026-09-28T10:33:00Z" }The planned endpoints are GET /aadhaar-esign/transactions/{id} and GET /aadhaar-esign/transactions?signature_request_id=....
| Meaning |
|---|---|
| Signer has not yet reached the ESP page |
| Redirected to ESP; waiting for OTP authentication |
| Signed response received and embedded |
| ESP returned failure, or the signer abandoned |
| ESP transaction window elapsed |
The planned limit is one poll every 30 seconds.
The CCA v3.x asynchronous variant tells ASPs to keep status history for a minimum of 30 days (CCA eSign API v3.3 (opens in a new tab)). How long Qubitara eSign keeps transaction records is not decided.
Step 5: Download and verify the signed PDF#
Download the completed PDF as described in Signature requests.
The Aadhaar signature is a PKCS#7 (CMS) signature. It is embedded in the signature dictionary of the PDF, with the single-use X.509 certificate of the signer.
The content of the response depends on the responseSigType that the ASP uses (CCA eSign API v2.1 (opens in a new tab)):
PKCS7: only the signer certificate.PKCS7pdf,PKCS7complete: the full chain with CRL/OCSP data.
Verify in Adobe Acrobat or Reader#
The Adobe Approved Trust List (AATL) includes "CCA India". A signature that chains to the CCA India root validates in Acrobat and Reader after the AATL is downloaded (Adobe AATL members (opens in a new tab), AATL overview (opens in a new tab)).
Open the Signature Panel to see the signer name, the issuing CA, the signing time and the authentication-type attributes of the certificate.
If Reader shows "validity unknown", do one of these:
Turn on automatic AATL updates under Preferences → Trust Manager.
Import the CCA India root into trusted identities.
Whether the chain is complete depends on the response type of the ESP. Which type Qubitara requests is not decided.
Verify in code#
This example uses pyHanko (Python):
from pyhanko.sign.validation import validate_pdf_signature
from pyhanko.pdf_utils.reader import PdfFileReader
from pyhanko_certvalidator import ValidationContext
with open("signed.pdf", "rb") as f:
r = PdfFileReader(f)
vc = ValidationContext(trust_roots=[open("cca-india-root.cer", "rb").read()], allow_fetching=True)
for sig in r.embedded_signatures:
status = validate_pdf_signature(sig, vc)
print(sig.field_name, status.intact, status.valid, status.trusted, status.signer_reported_dt)Check that both values are true:
intact: the document did not change after signing.trusted: the chain goes to CCA India.
The subject of the certificate and its embedded e-KYC attributes identify the signer. Per the v2.1 spec, these attributes are "e-KYC number, Name of the eSign user, e-KYC response code, Authentication Type, and Time Stamp".
Error cases#
| Cause | What to do |
|---|---|---|
| Signer did not tick consent | Nothing to retry; ask the signer to restart |
| Wrong OTP too many times (ESP limits apply) | Signer must wait and retry; consider a new signing URL |
| Mobile not linked to Aadhaar, or delivery delay | Signer checks UIDAI-registered mobile; retry after a minute |
| e-KYC name or birth year did not match | Verify the signer's details; recreate the request |
| ESP down or timed out | Retry later (ESP failover is not decided) |
| Signer did not finish within the ESP window | Mint a new signing URL |
| No Aadhaar eSign credits (may be separate from signing credits) | See Billing |
| Aadhaar eSign not enabled on this plan | Upgrade or contact Qubitara |
All codes are planned and may change.
Legal note#
Aadhaar eSign is a Second Schedule electronic signature under section 3A of the IT Act 2000 (CCA eSign FAQ (opens in a new tab)). Some cases need a different signature type. For example, MCA filings need a DSC. See Legal validity. This page is not legal advice.
Next steps#
Aadhaar eSign: the same flow from the side of the user.
Legal validity: the legal basis and the table of signature types.
Webhooks: verify the
aadhaar_esign.completedevent.