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 |
|---|---|---|---|
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., KARBIHULI101A). No special characters < > ? / ^ { }. |
signFlag | Varchar (1) | Mandatory | 1 — e-Sign required along with eStamp; 0 — e-Sign not required |
estampFlag | Varchar (1) | Mandatory | Y — eStamp required |
f2f | Varchar (1) | Mandatory | N for Platform-based execution |
state | Varchar (2) | Mandatory | State code as provided by NeSL |
estampdtls | Array | Mandatory when estampFlag is Y | eStamp details — see sub-fields below |
eStamp detail fields (estampdtls array):
| Field | Type | M/O | Description |
|---|---|---|---|
firstparty | Alphanumeric (max 40) | Mandatory | Name of the first party in the debt agreement |
secondparty | Alphanumeric (max 40) | Mandatory | Name of the second party in the debt agreement |
stampDutyAmount | Numeric (16,2) | Mandatory | Stamp duty amount (must be greater than Rs. 10) |
considerationPrice | Numeric (16,2) | Mandatory | Total value of the debt/contract |
descriptionofDocument | Alphanumeric (max 100) | Mandatory | Description of the document (e.g., "Loan Agreement") |
stampdutyPaidby | Alphanumeric (max 100) | Mandatory | Name of the person paying stamp duty (typically first or second party) |
articleCode | Numeric (4) | Mandatory | Article code based on the type of debt; list provided by NeSL per state |
documentID | Numeric (2) | Mandatory | Document ID for which eStamping is to be carried out |
firstPartyPin | Numeric (6) | Conditional Mandatory | Pincode of first party — mandatory for West Bengal (WB) and Madhya Pradesh (MP) |
secondPartyPin | Numeric (6) | Conditional Mandatory | Pincode of second party — mandatory for West Bengal (WB) and Madhya Pradesh (MP) |
firstPartyOVDType | Pre-defined list | Conditional Mandatory | OVD type of first party — mandatory for West Bengal (WB). Values: panno, driving license, voter id, passport, others |
firstPartyOVDValue | Alphanumeric (max 30) | Conditional Mandatory | OVD value for first party — mandatory for West Bengal (WB) |
secondPartyOVDType | Pre-defined list | Conditional Mandatory | OVD type of second party — mandatory for West Bengal (WB). Same values as firstPartyOVDType. |
secondPartyOVDValue | Alphanumeric (max 30) | Conditional Mandatory | OVD 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:
| 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 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):
| 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 e-stamped (and optionally e-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.
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: 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
Feedback sent
We appreciate your effort and will try to fix the article