Skip to main content
POST
/
esignature
Create E-Sign Request
curl --request POST \
  --url https://sandbox.cashfree.com/verification/esignature \
  --header 'Content-Type: application/json' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>' \
  --data '
{
  "verification_id": "ABC00123",
  "document_id": 36,
  "notification_modes": [
    "email"
  ],
  "auth_type": "AADHAAR",
  "expiry_in_days": "2",
  "capture_location": false,
  "signers": [
    {
      "name": "John Doe",
      "email": "John.Doe@email.com",
      "phone": "9999999999",
      "sequence": 1,
      "aadhaar_last_four_digit": "6789",
      "sign_positions": [
        {
          "page": 1,
          "top_left_x_coordinate": 100,
          "bottom_right_x_coordinate": 200,
          "top_left_y_coordinate": 180,
          "bottom_right_y_coordinate": 120
        },
        {
          "page": 2,
          "top_left_x_coordinate": 100,
          "bottom_right_x_coordinate": 200,
          "top_left_y_coordinate": 180,
          "bottom_right_y_coordinate": 120
        }
      ]
    }
  ]
}
'
import requests

url = "https://sandbox.cashfree.com/verification/esignature"

payload = {
"verification_id": "ABC00123",
"document_id": 36,
"notification_modes": ["email"],
"auth_type": "AADHAAR",
"expiry_in_days": "2",
"capture_location": False,
"signers": [
{
"name": "John Doe",
"email": "John.Doe@email.com",
"phone": "9999999999",
"sequence": 1,
"aadhaar_last_four_digit": "6789",
"sign_positions": [
{
"page": 1,
"top_left_x_coordinate": 100,
"bottom_right_x_coordinate": 200,
"top_left_y_coordinate": 180,
"bottom_right_y_coordinate": 120
},
{
"page": 2,
"top_left_x_coordinate": 100,
"bottom_right_x_coordinate": 200,
"top_left_y_coordinate": 180,
"bottom_right_y_coordinate": 120
}
]
}
]
}
headers = {
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
verification_id: 'ABC00123',
document_id: 36,
notification_modes: ['email'],
auth_type: 'AADHAAR',
expiry_in_days: '2',
capture_location: false,
signers: [
{
name: 'John Doe',
email: 'John.Doe@email.com',
phone: '9999999999',
sequence: 1,
aadhaar_last_four_digit: '6789',
sign_positions: [
{
page: 1,
top_left_x_coordinate: 100,
bottom_right_x_coordinate: 200,
top_left_y_coordinate: 180,
bottom_right_y_coordinate: 120
},
{
page: 2,
top_left_x_coordinate: 100,
bottom_right_x_coordinate: 200,
top_left_y_coordinate: 180,
bottom_right_y_coordinate: 120
}
]
}
]
})
};

fetch('https://sandbox.cashfree.com/verification/esignature', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.cashfree.com/verification/esignature",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'verification_id' => 'ABC00123',
'document_id' => 36,
'notification_modes' => [
'email'
],
'auth_type' => 'AADHAAR',
'expiry_in_days' => '2',
'capture_location' => false,
'signers' => [
[
'name' => 'John Doe',
'email' => 'John.Doe@email.com',
'phone' => '9999999999',
'sequence' => 1,
'aadhaar_last_four_digit' => '6789',
'sign_positions' => [
[
'page' => 1,
'top_left_x_coordinate' => 100,
'bottom_right_x_coordinate' => 200,
'top_left_y_coordinate' => 180,
'bottom_right_y_coordinate' => 120
],
[
'page' => 2,
'top_left_x_coordinate' => 100,
'bottom_right_x_coordinate' => 200,
'top_left_y_coordinate' => 180,
'bottom_right_y_coordinate' => 120
]
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-client-id: <api-key>",
"x-client-secret: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://sandbox.cashfree.com/verification/esignature"

payload := strings.NewReader("{\n \"verification_id\": \"ABC00123\",\n \"document_id\": 36,\n \"notification_modes\": [\n \"email\"\n ],\n \"auth_type\": \"AADHAAR\",\n \"expiry_in_days\": \"2\",\n \"capture_location\": false,\n \"signers\": [\n {\n \"name\": \"John Doe\",\n \"email\": \"John.Doe@email.com\",\n \"phone\": \"9999999999\",\n \"sequence\": 1,\n \"aadhaar_last_four_digit\": \"6789\",\n \"sign_positions\": [\n {\n \"page\": 1,\n \"top_left_x_coordinate\": 100,\n \"bottom_right_x_coordinate\": 200,\n \"top_left_y_coordinate\": 180,\n \"bottom_right_y_coordinate\": 120\n },\n {\n \"page\": 2,\n \"top_left_x_coordinate\": 100,\n \"bottom_right_x_coordinate\": 200,\n \"top_left_y_coordinate\": 180,\n \"bottom_right_y_coordinate\": 120\n }\n ]\n }\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://sandbox.cashfree.com/verification/esignature")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"verification_id\": \"ABC00123\",\n \"document_id\": 36,\n \"notification_modes\": [\n \"email\"\n ],\n \"auth_type\": \"AADHAAR\",\n \"expiry_in_days\": \"2\",\n \"capture_location\": false,\n \"signers\": [\n {\n \"name\": \"John Doe\",\n \"email\": \"John.Doe@email.com\",\n \"phone\": \"9999999999\",\n \"sequence\": 1,\n \"aadhaar_last_four_digit\": \"6789\",\n \"sign_positions\": [\n {\n \"page\": 1,\n \"top_left_x_coordinate\": 100,\n \"bottom_right_x_coordinate\": 200,\n \"top_left_y_coordinate\": 180,\n \"bottom_right_y_coordinate\": 120\n },\n {\n \"page\": 2,\n \"top_left_x_coordinate\": 100,\n \"bottom_right_x_coordinate\": 200,\n \"top_left_y_coordinate\": 180,\n \"bottom_right_y_coordinate\": 120\n }\n ]\n }\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/verification/esignature")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"verification_id\": \"ABC00123\",\n \"document_id\": 36,\n \"notification_modes\": [\n \"email\"\n ],\n \"auth_type\": \"AADHAAR\",\n \"expiry_in_days\": \"2\",\n \"capture_location\": false,\n \"signers\": [\n {\n \"name\": \"John Doe\",\n \"email\": \"John.Doe@email.com\",\n \"phone\": \"9999999999\",\n \"sequence\": 1,\n \"aadhaar_last_four_digit\": \"6789\",\n \"sign_positions\": [\n {\n \"page\": 1,\n \"top_left_x_coordinate\": 100,\n \"bottom_right_x_coordinate\": 200,\n \"top_left_y_coordinate\": 180,\n \"bottom_right_y_coordinate\": 120\n },\n {\n \"page\": 2,\n \"top_left_x_coordinate\": 100,\n \"bottom_right_x_coordinate\": 200,\n \"top_left_y_coordinate\": 180,\n \"bottom_right_y_coordinate\": 120\n }\n ]\n }\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "status": "SUCCESS",
  "verification_id": "ABC00123",
  "reference_id": 33,
  "document_id": 36,
  "signing_link": "SIGNING_LINK"
}

Authorizations

x-client-id
string
header
required

Your unique client identifier issued by Cashfree. You can find this in your Merchant Dashboard.

x-client-secret
string
header
required

The secret key associated with your client ID. Use this to authenticate your API requests. You can find this in your Merchant Dashboard.

Headers

x-cf-signature
string

Send the signature if two-factor authentication is selected as Public Key. More details.

Body

application/json

Find the request parameters to add the details of the document and signer.

verification_id
string
default:ABC00123
required

It is the unique ID you create to identify the verification request. The maximum character limit is 50. Only alphanumeric, period (.), hyphen (-), and underscore ( _ ) are allowed.

Example:

"ABC00123"

document_id
integer
default:36
required

It is the unique ID received in the Upload Document for E-Sign API response.

Example:

36

notification_modes
enum<string>[]
required

Specifies how you want to notify the signee about the e-sign details.

Possible values:

  • ["email"]: An email with the signing link will be sent to the signer's email address.
  • []: No communication will be triggered to the signer. Note: For this option, the request must contain only one signer.
Available options:
email
Example:
["email"]
auth_type
enum<string>
required

It is the type of authentication to be used for signature.

Available options:
AADHAAR
Example:

"AADHAAR"

expiry_in_days
string
default:2
required

It is the expiry of the signing link for each signer in days. The maximum allowed time is 15 days.

Example:

"2"

signers
object[]
required

It should contain the details of the signer(s).

Example:
[
{
"name": "John Doe",
"email": "John.Doe@email.com",
"phone": "9999999999",
"sequence": 1,
"aadhaar_last_four_digit": "6789",
"sign_positions": [
{
"page": 1,
"top_left_x_coordinate": 100,
"bottom_right_x_coordinate": 200,
"top_left_y_coordinate": 180,
"bottom_right_y_coordinate": 120
},
{
"page": 2,
"top_left_x_coordinate": 100,
"bottom_right_x_coordinate": 200,
"top_left_y_coordinate": 180,
"bottom_right_y_coordinate": 120
}
]
}
]
capture_location
boolean
default:false

It is an option to capture the location of the signer. If enabled, the signer will be requested to give their location permission.

Example:

false

redirect_url
string
default:REDIRECT_PAGE_URL

It is the URL that you need to provide that takes the user to after completing the e-sign journey. It will contain the verification_id that can be used to get the status of the verification.

Example:

"REDIRECT_PAGE_URL"

Response

Success response for creating an e-signature request.

status
string

It displays the status of the API request. Possible values are: - SUCCESS: Successfully initiated request for e-signature.

Example:

"SUCCESS"

verification_id
string

It displays the unique ID you created to identify the API request.

Example:

"ABC00123"

reference_id
integer

It displays the unique ID created by Cashfree Payments for reference purposes. format: int64

Example:

33

document_id
integer

It displays the unique ID created by Cashfree Payments to identify the document. You receive this ID in the response of Upload Document For E-Sign API.

Example:

36

It displays the link to proceed with the e-signature of the document for the first signer.

Example:

"SIGNING_LINK"