eStamp — 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 eStamp API enables lenders to digitally stamp loan agreements through National E-Governance Services Ltd (NeSL). It integrates with eStamp Service Providers to automate the following activities:

  • Transferring debtor details, loan information, and security details from the lender to NeSL for e-stamp certificate generation
  • Calculating and paying stamp duty, and retrieving the generated e-stamp certificate
  • Allowing borrowers to preview the combined e-stamp certificate and loan agreement as a single PDF
  • Supporting Aadhaar-based e-signing of the e-stamped document (when both eStamp and e-Sign are required)
  • Finalising and delivering the e-stamped (and optionally e-signed) loan agreement to the lender

The eStamp functionality is part of the same esign-estamp initiation API. Setting estampFlag: "Y" in the request payload activates e-Stamp processing. Supporting APIs include: Link API, Retrigger API, Status API, and Document API — all accessible after the initial submission.

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, particularly in states where e-Stamp is required

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)
  • State-specific Article Codes: Obtain the list of article codes applicable for your state from NeSL. Article codes are mandatory for eStamp and vary by state.
  • Callback URL: Register an HTTPS POST callback URL with NeSL. After successful document execution, NeSL will POST the e-stamped 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 e-stamped document and transaction result Required. NeSL will POST: txnID, status (SUCCESS/ERROR), rspMsg (Base64 e-stamped 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 for eStamp (estampFlag: "Y"):

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., KARBIHULI101A). No special characters < > ? / ^ { }.
signFlagVarchar (1)Mandatory1 — e-Sign required along with eStamp; 0 — e-Sign not required
estampFlagVarchar (1)MandatoryY — eStamp required
f2fVarchar (1)MandatoryN for Platform-based execution
stateVarchar (2)MandatoryState code as provided by NeSL
estampdtlsArrayMandatory when estampFlag is YeStamp details — see sub-fields below

eStamp detail fields (estampdtls array):

Field Type M/O Description
firstpartyAlphanumeric (max 40)MandatoryName of the first party in the debt agreement
secondpartyAlphanumeric (max 40)MandatoryName of the second party in the debt agreement
stampDutyAmountNumeric (16,2)MandatoryStamp duty amount (must be greater than Rs. 10)
considerationPriceNumeric (16,2)MandatoryTotal value of the debt/contract
descriptionofDocumentAlphanumeric (max 100)MandatoryDescription of the document (e.g., "Loan Agreement")
stampdutyPaidbyAlphanumeric (max 100)MandatoryName of the person paying stamp duty (typically first or second party)
articleCodeNumeric (4)MandatoryArticle code based on the type of debt; list provided by NeSL per state
documentIDNumeric (2)MandatoryDocument ID for which eStamping is to be carried out
firstPartyPinNumeric (6)Conditional MandatoryPincode of first party — mandatory for West Bengal (WB) and Madhya Pradesh (MP)
secondPartyPinNumeric (6)Conditional MandatoryPincode of second party — mandatory for West Bengal (WB) and Madhya Pradesh (MP)
firstPartyOVDTypePre-defined listConditional MandatoryOVD type of first party — mandatory for West Bengal (WB). Values: panno, driving license, voter id, passport, others
firstPartyOVDValueAlphanumeric (max 30)Conditional MandatoryOVD value for first party — mandatory for West Bengal (WB)
secondPartyOVDTypePre-defined listConditional MandatoryOVD type of second party — mandatory for West Bengal (WB). Same values as firstPartyOVDType.
secondPartyOVDValueAlphanumeric (max 30)Conditional MandatoryOVD value for second party — mandatory for West Bengal (WB)

Additional mandatory fields common to both eSign and eStamp requests — prtcptentty (participant/signatory list), loandtls (loan details), documentdtls (Base64 PDF documents), and eSignCordinates (signature placement coordinates) — are described in the e-Sign article.

Link, Retrigger, Status, and Document APIs use the same simpler payload as described in the e-Sign article, with digisign additionally required for Status and Document API calls.

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 payload contains per-signatory e-sign/e-stamp execution links. Refer to Section 4.1.9 of the API specification for the decryption process.

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 document execution):

FieldDescription
docIdDocument reference ID passed in the original request
uinUnique Identification Number from the original request
reltocntrctSignatory's relationship to the contract
signedDocDataBase64 encoded e-stamped (and optionally e-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.

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: eStamp 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