Skip to main content
PUT
/
import
/
settlements
/
emulate
Mark Sandbox Settlement processed
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

x-client-id
string
required

Client ID generated from the merchant dashboard.

x-client-secret
string
required

Client secret generated from the merchant dashboard.

x-api-version
string
default:2025-01-01
required

API version to be used. Format is in YYYY-MM-DD.

Body

application/json
cf_ica_settlement_id
string
required

Unique Identifier of the settlement

Example:

"10050"

status
enum<string>
required
Available options:
PROCESSED
Example:

"PROCESSED"

Response

Success response for marking the sandbox settlement as processed.

cf_ica_settlement_id
number

Unique ID of the settlement

Example:

10050

status
string

Current status of the settlement

Example:

"SETTLED"

collection_amount_inr
number

Total collected amount in INR

Example:

1000

service_charge_inr
number

Service charge in INR, if applicable

Example:

19

service_tax_inr
number

Service tax in INR

Example:

294.73

adjustment_amount_inr
number

Adjustment amount in INR

Example:

-18743.89

settlement_charges_inr
number

Charges related to the settlement in INR

Example:

0

settlement_tax_inr
number

Tax on settlement in INR

Example:

0

settlement_amount_inr
number

Total settlement amount in INR

Example:

65500.04

settlement_foreign_currency_details
object
payment_from
string

Start time of the payment period

Example:

"2024-08-28T15:36:33"

payment_till
string

End time of the payment period

Example:

"2024-08-28T15:37:49"

settlement_utr
string

Unique transaction reference (UTR) for the settlement

Example:

"123412"

initiated_on
string

Date and time when the settlement was initiated

Example:

"2024-08-28T17:24:55"

settled_on
string

Date and time when the settlement was completed

Example:

"2024-08-29T16:30:46"