Stamp & Sign APIHMAC secured

Build e-stamp and e-sign agreement flows from one API surface.

Partner API for creating e-stamp and e-sign agreement transactions — upload the agreement document, set parties, billing, and stamp/sign options from your system. All paths are under /api/external/stampNsign/*.

UAT: https://ws-uat.realtimate.in/api
View Endpoints
2
documented endpoints
2
POST operations
0
PUT operations

Authenticate

Every partner call uses the integration JWT in auth. After create, store agreementOwnershipToken from the response and send on further API calls.

Sign Payloads

For create, sign the exact string value of the payload form field: x-payload-signature = HMAC-SHA256(payload string, ownership HMAC secret). Do not sign JSON.stringify of the whole multipart body.

Multipart Upload

Send multipart/form-data with payload (JSON string) and txn-file (agreement PDF/DOC/DOCX, max 5 MB). JSON.stringify the request object once into payload — do not re-stringify after signing.

POST/external/stampNsign/new-agreement

Create New Agreement

Creates a new Stamp & Sign transaction

Signature: Required

Request Headers

auth
Integration JWT we issue; send it as-is on every partner call
agreementOwnershipToken
After create: agreementOwnershipToken from create response; send on further API calls (not required on create)
x-payload-signature
HMAC-SHA256(payload form-field string, ownership HMAC secret)
Content-Type
multipart/form-data

Multipart Form Fields

KeyTypeDescription
payloadstringJSON string of the request body. Sign this exact string value for x-payload-signature
txn-filefileAgreement document — PDF / DOC / DOCX, max 5 MB

Mandatory Body (payload JSON)

KeyTypeDescription
externalRefstringUnique external reference for this agreement. Duplicate values are rejected
documentTypestringDocument category. Allowed values include: "rentalagm", "mouforsale", "serviceagm", "agmforsale", "saleagm", "misc", "templatedAgm", and other TxnDocType values
servicesobjectAt least one of services.estamp or services.esign must be true
firstPartiesArrayNon-empty. Each party requires countryCode, phone, firstName, lastName. email required only when esignMethod is "email"
secondPartiesArrayNon-empty. Same fields as firstParties
billingAddressObjectRequires addressLine1, city, state, pincode. addressLine2 / addressLine3 / country optional (country defaults to "IND")
considerationAmountnumberNon-negative. Used for Karnataka rental stamp suggestion (min(500, consideration × 0.005))
paymentBystringRequired. Phone of the payer (digits, or countryCode+phone). Must match a first or second party phone

Conditional Body (payload JSON)

Required when the corresponding service is enabled in services.

KeyTypeDescription
stampStatestringRequired when services.estamp is true. Stamp state code (e.g. "KA")
eStampAmountnumberRequired when services.estamp is true. Must be between 20 and 500. Special rules apply for KA rental / service and MOU for sale (₹500)
esignMethod"email" | "aadhaar"Required when services.esign is true. For "email", every party (including stakeholders) must have a valid email. For "aadhaar", email is optional

Optional Body (payload JSON)

KeyTypeDescription
titlestringTitle for the agreement document
stakeholdersArraySame party shape as first/second parties. Must not reuse a first/second party phone (or email, if provided)
propertyAddressObjectSame shape as billingAddress. Requires addressLine1, city, state, pincode when included
startDatestringISO 8601 date / timestamp
periodInMonthsnumberPositive integer
escrowOwnershipTokenstringEscrow ownership JWT ({ accountNum }, same as escrow API ownership-token). On create, links this Stamp & Sign into that escrow's stampNSignTxnIds. Omit = no link, no fail

Form File (mandatory)

KeyTypeDescription
txn-filefileAgreement PDF/DOC/DOCX, max 5 MB

Behavior Notes

  • Provided party emails and phones must be unique across firstParties, secondParties, and stakeholders. Stakeholders cannot be the same person as a first or second party.
  • paymentBy is required and must match a first or second party phone.
  • Create fails if externalRef already exists.
  • Create response includes agreementOwnershipToken — store it and send on further API calls (keep auth as the integration JWT).
  • Do not send agreementOwnershipToken on create — the request will be rejected. Use update instead.
  • If escrowOwnershipToken is sent on create, this Stamp & Sign id is linked into that escrow's stampNSignTxnIds. If omitted, create still succeeds with no escrow link.
  • On success, review WhatsApp + email notifications are sent to the API user.
  • Partner integrations: use the integration JWT in auth on every call.

Sample Request

// multipart/form-data

// Form field: payload (string — sign this exact string)
{
  "externalRef": "CRM-SNS-1001",
  "documentType": "rentalagm",
  "title": "Rental Agreement — Brigade Metropolis",
  "services": {
    "estamp": true,
    "esign": true
  },
  "stampState": "KA",
  "eStampAmount": 500,
  "considerationAmount": 100000,
  "esignMethod": "aadhaar",
  "paymentBy": "9999999999",
  "firstParties": [
    {
      "countryCode": "91",
      "phone": "9999999999",
      "email": "owner@example.com",
      "firstName": "Mayank",
      "lastName": "Jain"
    }
  ],
  "secondParties": [
    {
      "countryCode": "91",
      "phone": "8888888888",
      "email": "tenant@example.com",
      "firstName": "Priya",
      "lastName": "Sharma"
    }
  ],
  "stakeholders": [
    {
      "countryCode": "91",
      "phone": "7777777777",
      "email": "witness@example.com",
      "firstName": "Arjun",
      "lastName": "Mehta"
    }
  ],
  "billingAddress": {
    "addressLine1": "Tower A, Brigade Metropolis",
    "addressLine2": "Whitefield",
    "addressLine3": "Mahadevapura",
    "city": "Bengaluru",
    "state": "Karnataka",
    "pincode": "560097",
    "country": "IND"
  },
  "propertyAddress": {
    "addressLine1": "Flat 5107, UKN Esperanza",
    "addressLine2": "Devanahalli Road",
    "addressLine3": "Bagalur",
    "city": "Bengaluru",
    "state": "Karnataka",
    "pincode": "560066",
    "country": "IND"
  },
  "startDate": "2026-08-01",
  "periodInMonths": 11,
  "escrowOwnershipToken": "<escrow ownership JWT from escrow API>"
}

// Form field: txn-file
agreement.pdf

Headers: auth, x-payload-signature, Content-Type: multipart/form-data

Sample Responses

Success Response
{
  "result": "success",
  "message": "Transaction created successfully",
  "agreementOwnershipToken": "<token — store and send on further API calls>"
}
Duplicate externalRef
{
  "result": "badrequest",
  "message": "externalRef 'CRM-SNS-1001' is already being used with another transaction"
}

Error Shapes

Common error responses

HTTPresultTypical cause
401autherror / unauthorizedMissing/invalid auth or x-payload-signature
400badrequestValidation / duplicate externalRef / missing file
403notallowedToken ownership mismatch / not allowed
500exceptionUnexpected server error