curl --request PUT \
--url https://sandbox.cashfree.com/import/settlements/emulate \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"cf_ica_settlement_id": "10050",
"status": "PROCESSED"
}
'import requests
url = "https://sandbox.cashfree.com/import/settlements/emulate"
payload = {
"cf_ica_settlement_id": "10050",
"status": "PROCESSED"
}
headers = {
"x-client-id": "<x-client-id>",
"x-client-secret": "<x-client-secret>",
"x-api-version": "<x-api-version>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-client-id': '<x-client-id>',
'x-client-secret': '<x-client-secret>',
'x-api-version': '<x-api-version>',
'Content-Type': 'application/json'
},
body: JSON.stringify({cf_ica_settlement_id: '10050', status: 'PROCESSED'})
};
fetch('https://sandbox.cashfree.com/import/settlements/emulate', 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/import/settlements/emulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cf_ica_settlement_id' => '10050',
'status' => 'PROCESSED'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-version: <x-api-version>",
"x-client-id: <x-client-id>",
"x-client-secret: <x-client-secret>"
],
]);
$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/import/settlements/emulate"
payload := strings.NewReader("{\n \"cf_ica_settlement_id\": \"10050\",\n \"status\": \"PROCESSED\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("x-api-version", "<x-api-version>")
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.put("https://sandbox.cashfree.com/import/settlements/emulate")
.header("x-client-id", "<x-client-id>")
.header("x-client-secret", "<x-client-secret>")
.header("x-api-version", "<x-api-version>")
.header("Content-Type", "application/json")
.body("{\n \"cf_ica_settlement_id\": \"10050\",\n \"status\": \"PROCESSED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/import/settlements/emulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-client-secret"] = '<x-client-secret>'
request["x-api-version"] = '<x-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cf_ica_settlement_id\": \"10050\",\n \"status\": \"PROCESSED\"\n}"
response = http.request(request)
puts response.read_body{
"cf_ica_settlement_id": 10050,
"status": "SETTLED",
"collection_amount_inr": 1000,
"service_charge_inr": 19,
"service_tax_inr": 3.42,
"adjustment_amount_inr": 0,
"settlement_charges_inr": 105.38,
"settlement_tax_inr": 18.97,
"settlement_amount_inr": 853.23,
"settlement_foreign_currency_details": {
"settlement_currency": "AED",
"settlement_forex_rate": 23.4066,
"settlement_amount": 36.4527
},
"payment_from": "2025-04-14T13:54:37+05:30",
"payment_till": "2025-04-14T13:54:37+05:30",
"settlement_utr": "60f05f9b-4d83-43cd-80e6-9deaf619de7f",
"initiated_on": "2025-04-14T13:56:24+05:30",
"settled_on": "2025-04-14T13:56:24+05:30"
}{
"type": "invalid_request_error",
"message": "status must be PROCESSED",
"code": "status_invalid"
}{
"type": "authentication_error",
"message": "authentication Failed",
"code": "request_failed"
}{
"type": "invalid_request_error",
"message": "Cannot update settlement with status SETTLED",
"code": "settlement_conflict"
}Mark Sandbox Settlement processed
This API is used to mark settlement as processed in sandbox environment
curl --request PUT \
--url https://sandbox.cashfree.com/import/settlements/emulate \
--header 'Content-Type: application/json' \
--header 'x-api-version: <x-api-version>' \
--header 'x-client-id: <x-client-id>' \
--header 'x-client-secret: <x-client-secret>' \
--data '
{
"cf_ica_settlement_id": "10050",
"status": "PROCESSED"
}
'import requests
url = "https://sandbox.cashfree.com/import/settlements/emulate"
payload = {
"cf_ica_settlement_id": "10050",
"status": "PROCESSED"
}
headers = {
"x-client-id": "<x-client-id>",
"x-client-secret": "<x-client-secret>",
"x-api-version": "<x-api-version>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'x-client-id': '<x-client-id>',
'x-client-secret': '<x-client-secret>',
'x-api-version': '<x-api-version>',
'Content-Type': 'application/json'
},
body: JSON.stringify({cf_ica_settlement_id: '10050', status: 'PROCESSED'})
};
fetch('https://sandbox.cashfree.com/import/settlements/emulate', 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/import/settlements/emulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cf_ica_settlement_id' => '10050',
'status' => 'PROCESSED'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-version: <x-api-version>",
"x-client-id: <x-client-id>",
"x-client-secret: <x-client-secret>"
],
]);
$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/import/settlements/emulate"
payload := strings.NewReader("{\n \"cf_ica_settlement_id\": \"10050\",\n \"status\": \"PROCESSED\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-client-id", "<x-client-id>")
req.Header.Add("x-client-secret", "<x-client-secret>")
req.Header.Add("x-api-version", "<x-api-version>")
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.put("https://sandbox.cashfree.com/import/settlements/emulate")
.header("x-client-id", "<x-client-id>")
.header("x-client-secret", "<x-client-secret>")
.header("x-api-version", "<x-api-version>")
.header("Content-Type", "application/json")
.body("{\n \"cf_ica_settlement_id\": \"10050\",\n \"status\": \"PROCESSED\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/import/settlements/emulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-client-id"] = '<x-client-id>'
request["x-client-secret"] = '<x-client-secret>'
request["x-api-version"] = '<x-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cf_ica_settlement_id\": \"10050\",\n \"status\": \"PROCESSED\"\n}"
response = http.request(request)
puts response.read_body{
"cf_ica_settlement_id": 10050,
"status": "SETTLED",
"collection_amount_inr": 1000,
"service_charge_inr": 19,
"service_tax_inr": 3.42,
"adjustment_amount_inr": 0,
"settlement_charges_inr": 105.38,
"settlement_tax_inr": 18.97,
"settlement_amount_inr": 853.23,
"settlement_foreign_currency_details": {
"settlement_currency": "AED",
"settlement_forex_rate": 23.4066,
"settlement_amount": 36.4527
},
"payment_from": "2025-04-14T13:54:37+05:30",
"payment_till": "2025-04-14T13:54:37+05:30",
"settlement_utr": "60f05f9b-4d83-43cd-80e6-9deaf619de7f",
"initiated_on": "2025-04-14T13:56:24+05:30",
"settled_on": "2025-04-14T13:56:24+05:30"
}{
"type": "invalid_request_error",
"message": "status must be PROCESSED",
"code": "status_invalid"
}{
"type": "authentication_error",
"message": "authentication Failed",
"code": "request_failed"
}{
"type": "invalid_request_error",
"message": "Cannot update settlement with status SETTLED",
"code": "settlement_conflict"
}Headers
Client ID generated from the merchant dashboard.
Client secret generated from the merchant dashboard.
API version to be used. Format is in YYYY-MM-DD.
Body
Response
Success response for marking the sandbox settlement as processed.
Unique ID of the settlement
10050
Current status of the settlement
"SETTLED"
Total collected amount in INR
1000
Service charge in INR, if applicable
19
Service tax in INR
294.73
Adjustment amount in INR
-18743.89
Charges related to the settlement in INR
0
Tax on settlement in INR
0
Total settlement amount in INR
65500.04
Show child attributes
Show child attributes
Start time of the payment period
"2024-08-28T15:36:33"
End time of the payment period
"2024-08-28T15:37:49"
Unique transaction reference (UTR) for the settlement
"123412"
Date and time when the settlement was initiated
"2024-08-28T17:24:55"
Date and time when the settlement was completed
"2024-08-29T16:30:46"
Was this page helpful?