What does this API do?
The NeSL e-Sign API enables lenders to execute loan contracts digitally using Aadhaar-based e-signatures. It integrates with National E-Governance Services Ltd (NeSL) to support the following activities:
- Submitting debtor details, loan information, and document data to NeSL for execution
- Triggering e-sign links to signatories (debtors, guarantors, co-obligants) via mobile and email in a configurable sequence
- Redirecting signatories to C-DAC for Aadhaar-based digital signing
- Embedding digital signatures on the loan agreement and returning the final signed document
- Supporting two execution flows, configured per Client ID: (a) returning the execution link in the API response to the submitter, or (b) sending the signed link directly to the borrower with success status in the API response
Supporting APIs include: Link API (retrieve e-sign link at a later point), Retrigger API (resend the e-sign link to signatories), Status API (check document execution status), and Document API (pull the executed document if the callback fails).
Who can use it?
- Lenders (banks and financial institutions) onboarded on the ULI Platform who have subscribed to the NeSL service
- Technical teams integrating loan origination or loan management systems with the ULI Platform
Prerequisites
Complete all common platform prerequisites as described in Getting Started with ULI Platform APIs. Then ensure the following NeSL-specific items are in place:
- NeSL Service Subscription: Subscribe to the NeSL service in the Platform Dev Portal (separately for Sandbox and Production). Steps are in the latest SOP for Lender Onboarding, Section 10.
- NeSL Credentials: Obtain the following from NeSL during registration:
- Self-signed certificate and its password (used for payload encryption and digital signature generation)
- Client ID (
x-sp-client-id) - API Key (
x-sp-api-key) - Basic Auth credentials — username and password (
x-sp-authorization)
- Callback URL: Register an HTTPS POST callback URL with NeSL. After successful Aadhaar validation by each signatory, NeSL will POST the signed document and transaction details to this URL.
- Payload Encryption: Implement AES/CBC/PKCS5Padding + RSA/ECB/PKCS1Padding encryption before calling the esign-estamp API. Refer to Section 4.1.8 (encryption) and Section 4.1.9 (decryption for execution link response) of the API specification.
- Digital Signature (digisign): Implement SHA256withRSA signing using your PKCS#12 private certificate for Status and Document API calls. Refer to Section 4.5.7.
API endpoints
| API | Sandbox URL | Production URL | Method |
|---|---|---|---|
| e-Sign e-Stamp (initiation) | https://extgw.nonprod.rbihub.io/nesl/esign-estamp/1.3/en |
https://extgw.api.rbihub.io/nesl/esign-estamp/1.3/en |
POST |
| Link API | https://extgw.nonprod.rbihub.io/nesl/link/1.3/en |
https://extgw.api.rbihub.io/nesl/link/1.3/en |
POST |
| Retrigger API | https://extgw.nonprod.rbihub.io/nesl/retrigger/1.3/en |
https://extgw.api.rbihub.io/nesl/link/retrigger/en |
POST |
| Status API | https://extgw.nonprod.rbihub.io/nesl/status/1.3/en |
https://extgw.api.rbihub.io/nesl/link/status/en |
POST |
| Document API | https://extgw.nonprod.rbihub.io/nesl/document/1.3/en |
https://extgw.api.rbihub.io/nesl/link/document/en |
POST |
URL path follows the convention: /{service name}/{ver}/{lang}
Headers
| Header | Description | Remarks |
|---|---|---|
Authentication |
JWT token generated by the Platform authentication server | Required. Refer to Authentication and Authorization API specification. |
client-id |
Base64-encoded value of the Client ID from the JWT token | Required |
provider |
Service provider code | Use 107 for NeSL |
x-sp-client-id |
Client ID provided by NeSL | Required. Alphanumeric value provided by NeSL. |
x-sp-api-key |
API Key provided by NeSL | Required. Alphanumeric value provided by NeSL. |
x-sp-authorization |
Basic Auth — Base64 of username:password provided by NeSL |
Required |
resp-url |
The HTTPS POST callback URL to which NeSL will send the signed document and transaction result | Required. NeSL will POST: txnID, status (SUCCESS/ERROR), rspMsg (Base64 signed document or error code). |
x-lender-auth-token |
JWT token passed by the lender to authenticate the callback | Optional |
x-env-route |
Routing header for sandbox environment | Value: /sb. Required for Sandbox only; omit for Production. |
api-key |
Platform-issued API key (24-character alphanumeric, lowercase) | Optional. Reserved for future use. |
Request body
All requests use JSON format. The data.payload field in the initiation API carries the encrypted loan metadata. The payload must be encrypted using AES/CBC/PKCS5Padding (session key) + RSA/ECB/PKCS1Padding (session key encryption with NeSL's public certificate). The outer envelope structure is:
{
"meta": {
"ver": "1.3",
"ts": "<ISO-8601 timestamp>",
"txncode": "<unique transaction code>"
},
"data": {
"payload": "<encryptedSessionKey>:<base64EncodedEncryptedPayload>"
},
"hmac": "<SHA-256 hash of the value of key 'data'>"
}
Key fields in the unencrypted loan metadata (esign only — estampFlag: "N"):
| Field | Type | M/O | Description |
|---|---|---|---|
loanno | Alphanumeric (max 30) | Conditional Mandatory | Loan/contract reference number. loanno or snctnno is mandatory. |
snctnno | Alphanumeric (max 30) | Conditional Mandatory | Sanction number. loanno or snctnno is mandatory. |
regType | Varchar (1) | Mandatory | 1 for Individual loan; 2 for Non-Individual loan |
txnID | Alphanumeric (max 50) | Mandatory | Unique per request. Format: <ORG>ULI<VALUE> (e.g., KARBIHULI01A). No special characters < > ? / ^ { }. |
signFlag | Varchar (1) | Mandatory | 1 — e-Sign required; 0 — e-Sign not required |
estampFlag | Varchar (1) | Mandatory | N for e-Sign only (no e-Stamp). Use Y when e-Stamp is also required. |
f2f | Varchar (1) | Mandatory | N for Platform-based execution |
state | Varchar (2) | Mandatory | State code as provided by NeSL |
prtcptentty | Array | Mandatory | List of signatories. Each entry includes: prtcptenttyId, fulnm, reltocntrct (Debtor/Guarantor/Co-Obligant/Creditor/Beneficiary), cntrprtycntmobno, emlid, panno, doi, lglcnstn, partytyp, seqno, signatoryAadhar (last 4 digits), signatoryGender, documentID |
loandtls | Object | Mandatory | Loan details: snctnamt, rtofint, tenure, fcltynm, ntrofcrdt, fundtyp, currofsanc, crdtsubtyp, isacctclosed, dtofsnctn |
documentdtls | Array | Mandatory | Documents to be signed. Each entry: documentID, docData (Base64 PDF), prtcptenttyId |
eSignCordinates | Array | Mandatory | Signature placement coordinates. Format: ["<page>, <x>, <y>"] |
Link, Retrigger, Status, and Document APIs use a simpler payload:
{
"meta": { "ver": "1.3", "ts": "<timestamp>", "txncode": "<code>" },
"data": {
"transId": "<transaction ID from esign-estamp call>",
"loanno": "<loan number>", // conditional
"snctnno": "<sanction number>" // conditional
// Status and Document APIs also require:
// "digisign": "<SHA256withRSA signature of the unencrypted JSON object>"
},
"hmac": "<SHA-256 hash of data>"
}
Response fields
All API responses share a common envelope:
| Field | Description |
|---|---|
result.errcode | E000 on success; relevant error code on failure |
result.status | success or fail |
result.info | Empty string on success; error message on failure |
meta.ts | Timestamp of the response |
meta.ver | API version |
meta.txncode | Transaction code echoed from the request |
hmac | HMAC of the response data generated by the Platform |
signature | Platform's ECDSA signature over the response data |
publickey | Platform's public key used for the signature |
sig-algo | Signature algorithm (e.g., SHA256withECDSA) |
Initiation API — additional response fields (link-to-borrower flow):
| Field | Description |
|---|---|
data.transid | Transaction ID from the request |
data.statusCode | 1 on success; error code on failure |
data.statusMsg | SUCCESS or FAILED |
Initiation API — additional response fields (submitter execution link flow):
The data.REQUEST field contains an encrypted JSON payload. Decrypt it using the same session key used during request encryption (AES/CBC with IV = first 16 chars of session key). The decrypted response contains per-signatory e-sign links:
| Field | Description |
|---|---|
transid | Transaction ID |
statusCode | 1 on success |
statusMsg | Success or Failed |
docLink[].signtryName | Signatory name |
docLink[].pan | PAN or other identifier of the signatory |
docLink[].seqno | Signing sequence number |
docLink[].rltnshp | Relationship of the signatory to the debt |
docLink[].eSignLink | URL for the signatory to complete e-Sign |
Link API — additional response fields:
| Field | Description |
|---|---|
data.transid | Transaction ID |
data.statusCode | 1 on success |
data.statusMsg | Transaction status |
data.seqNo | Sequence number of the signatory |
data.esignLink | Retrieved e-Sign link |
data.relationShip | Signatory's relationship to the debt |
Status and Document APIs return encrypted data in data.cipherText and data.sessionId. Decrypt using RSA (private key) to recover the session key, then AES-decrypt the cipherText. Refer to Section 4.5.8 of the API specification.
Callback notification fields (sent by NeSL to the lender's registered resp-url after each signatory completes Aadhaar validation):
| Field | Description |
|---|---|
docId | Document reference ID passed in the original request |
uin | Unique Identification Number from the original request |
reltocntrct | Signatory's relationship to the contract |
signedDocData | Base64 encoded signed document |
signatoryName | Signer name as passed in the JSON |
signedName | Aadhaar name of the person who signed |
matchPercentage | Percentage match between signer name in JSON and Aadhaar name |
The lender's callback endpoint must return:
{ "txnID": "<txnID>", "status": "Received successfully", "statusCode": "001" }
Callback status codes: 001 = success; 002 = txnID not found; 003 = invalid Base64 value.
Note: The fields returned in the callback are dynamic and depend on the eSign validation rule configuration mapped to the lender's NeSL Client ID. Validation rules can combine Name (min 75% match), Year of Birth (100%), Gender (100%), and last 4 digits of Aadhaar (100%).
Error codes
| Error Code | Description |
|---|---|
E000 | Success |
E250 | Invalid service provider Client ID |
E251 | Invalid service provider API key |
E252 | Invalid service provider Authorization |
E253 | Invalid Transaction ID |
E254 | Invalid Loan No |
E255 | Invalid Sanction No |
E257 | Invalid digital signature |
For additional Platform-level error codes, refer to the latest Platform Error Code document available in the Platform API Spec folder.
Who to contact?
If you encounter an issue, email the Platform Support Center at support@rbihub.in with the following details:
- Subject: e-Sign API Error — NeSL
- Service Name: esign estamp
- Environment: Sandbox / Production
- Service Provider: NeSL
- Request Headers
- Request Payload
- Error Code
- Error Message
- Attachment: Screenshot or log of the error
- Prerequisites Status: IP Whitelisting, URL Whitelisting, Service Subscription, Token Generation
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article