e-Sign — NeSL

Created by Rajatha B M, Modified on Fri, 27 Mar at 2:32 PM by Rajatha B M

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
loannoAlphanumeric (max 30)Conditional MandatoryLoan/contract reference number. loanno or snctnno is mandatory.
snctnnoAlphanumeric (max 30)Conditional MandatorySanction number. loanno or snctnno is mandatory.
regTypeVarchar (1)Mandatory1 for Individual loan; 2 for Non-Individual loan
txnIDAlphanumeric (max 50)MandatoryUnique per request. Format: <ORG>ULI<VALUE> (e.g., KARBIHULI01A). No special characters < > ? / ^ { }.
signFlagVarchar (1)Mandatory1 — e-Sign required; 0 — e-Sign not required
estampFlagVarchar (1)MandatoryN for e-Sign only (no e-Stamp). Use Y when e-Stamp is also required.
f2fVarchar (1)MandatoryN for Platform-based execution
stateVarchar (2)MandatoryState code as provided by NeSL
prtcptenttyArrayMandatoryList 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
loandtlsObjectMandatoryLoan details: snctnamt, rtofint, tenure, fcltynm, ntrofcrdt, fundtyp, currofsanc, crdtsubtyp, isacctclosed, dtofsnctn
documentdtlsArrayMandatoryDocuments to be signed. Each entry: documentID, docData (Base64 PDF), prtcptenttyId
eSignCordinatesArrayMandatorySignature 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:

FieldDescription
result.errcodeE000 on success; relevant error code on failure
result.statussuccess or fail
result.infoEmpty string on success; error message on failure
meta.tsTimestamp of the response
meta.verAPI version
meta.txncodeTransaction code echoed from the request
hmacHMAC of the response data generated by the Platform
signaturePlatform's ECDSA signature over the response data
publickeyPlatform's public key used for the signature
sig-algoSignature algorithm (e.g., SHA256withECDSA)

Initiation API — additional response fields (link-to-borrower flow):

FieldDescription
data.transidTransaction ID from the request
data.statusCode1 on success; error code on failure
data.statusMsgSUCCESS 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:

FieldDescription
transidTransaction ID
statusCode1 on success
statusMsgSuccess or Failed
docLink[].signtryNameSignatory name
docLink[].panPAN or other identifier of the signatory
docLink[].seqnoSigning sequence number
docLink[].rltnshpRelationship of the signatory to the debt
docLink[].eSignLinkURL for the signatory to complete e-Sign

Link API — additional response fields:

FieldDescription
data.transidTransaction ID
data.statusCode1 on success
data.statusMsgTransaction status
data.seqNoSequence number of the signatory
data.esignLinkRetrieved e-Sign link
data.relationShipSignatory'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):

FieldDescription
docIdDocument reference ID passed in the original request
uinUnique Identification Number from the original request
reltocntrctSignatory's relationship to the contract
signedDocDataBase64 encoded signed document
signatoryNameSigner name as passed in the JSON
signedNameAadhaar name of the person who signed
matchPercentagePercentage 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 CodeDescription
E000Success
E250Invalid service provider Client ID
E251Invalid service provider API key
E252Invalid service provider Authorization
E253Invalid Transaction ID
E254Invalid Loan No
E255Invalid Sanction No
E257Invalid 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

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article