Skip to main content
GET
/
orders
/
{order_id}
/
settlements
Get Settlements by Order ID
curl --request GET \
  --url https://sandbox.cashfree.com/pg/orders/{order_id}/settlements \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-client-id: <api-key>' \
  --header 'x-client-secret: <api-key>'
import requests

url = "https://sandbox.cashfree.com/pg/orders/{order_id}/settlements"

headers = {
"x-api-version": "<x-api-version>",
"x-client-id": "<api-key>",
"x-client-secret": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {
method: 'GET',
headers: {
'x-api-version': '<x-api-version>',
'x-client-id': '<api-key>',
'x-client-secret': '<api-key>'
}
};

fetch('https://sandbox.cashfree.com/pg/orders/{order_id}/settlements', 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/pg/orders/{order_id}/settlements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-version: <x-api-version>",
"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"
"net/http"
"io"
)

func main() {

url := "https://sandbox.cashfree.com/pg/orders/{order_id}/settlements"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-version", "<x-api-version>")
req.Header.Add("x-client-id", "<api-key>")
req.Header.Add("x-client-secret", "<api-key>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://sandbox.cashfree.com/pg/orders/{order_id}/settlements")
.header("x-api-version", "<x-api-version>")
.header("x-client-id", "<api-key>")
.header("x-client-secret", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/pg/orders/{order_id}/settlements")

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

request = Net::HTTP::Get.new(url)
request["x-api-version"] = '<x-api-version>'
request["x-client-id"] = '<api-key>'
request["x-client-secret"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "cursor": "eyJzZWFyY2hBZnRlciI6eyJsaXN0IjpbMTg4NjcxNDVdLCJlbXB0eSI6ZmFsc2V9LCJyZWNvbkFQSVR5cGUiOiJMRURHRVIifQ==",
  "limit": 1,
  "data": [
    {
      "event_id": "Test12345",
      "entity": "settlement",
      "event_type": null,
      "sale_type": null,
      "event_time": "2024-12-01T10:00:00+05:30",
      "event_settlement_amount": 1000,
      "event_amount": 1200,
      "event_status": "SUCCESS",
      "event_currency": "INR",
      "status": "completed",
      "order_id": "order-12-127",
      "customer_name": "John Doe",
      "customer_phone": "9876543210",
      "customer_email": "john.doe@example.com",
      "cf_payment_id": 553338,
      "payment_amount": 1200,
      "order_amount": 100,
      "payment_time": "2021-07-13T13:13:59+05:30",
      "payment_service_charge": 20,
      "payment_service_tax": 3.6,
      "payment_utr": "UTR123456",
      "cf_settlement_id": 6121238,
      "vendor_commission": 15,
      "split_service_charge": 10,
      "split_service_tax": 1.8,
      "settlement_utr": "UTR987654",
      "settlement_date": "2024-12-02T12:00:00+05:30",
      "refund_note": null,
      "refund_id": "REF12345",
      "refund_arn": null,
      "refund_processed_at": "2024-12-03T14:00:00+05:30",
      "closed_in_favor_of": null,
      "resolved_on": "2024-12-04T16:00:00+05:30",
      "dispute_category": null,
      "dispute_note": null,
      "dispute_resolved_on": "2024-12-05T18:00:00+05:30",
      "adjustment_remarks": null,
      "adjustment": null,
      "service_tax": 1.8,
      "service_charge": 10,
      "amount_settled": 1000,
      "payment_from": null,
      "payment_till": null,
      "reason": null,
      "settlement_initiated_on": "2024-12-01T10:30:00+05:30",
      "settlement_type": null,
      "settlement_charge": null,
      "settlement_tax": null,
      "payment_group": null,
      "remarks": null
    }
  ]
}
{
"message": "bad URL, please check API documentation",
"code": "request_failed",
"type": "invalid_request_error"
}
{
"message": "authentication Failed",
"code": "request_failed",
"type": "authentication_error"
}
{
"message": "something is not found",
"code": "somethind_not_found",
"type": "invalid_request_error"
}
{
"message": "order with same id is already present",
"code": "order_already_exists",
"type": "invalid_request_error"
}
{
"message": "something is not found",
"code": "request_invalid",
"type": "idempotency_error"
}
{
"message": "Too many requests from IP. Check headers",
"code": "request_failed",
"type": "rate_limit_error"
}
{
"message": "internal Server Error",
"code": "internal_error",
"type": "api_error"
}
{
"message": "something is not found",
"code": "bank_processing_failure",
"type": "api_error"
}

Authorizations

x-client-id
string
header
required

Client app ID. You can find your app id in the Merchant Dashboard.

x-client-secret
string
header
required

Client secret key. You can find your secret key in the Merchant Dashboard.

Headers

x-api-version
string
default:2023-08-01
required

API version to be used

x-request-id
string

Request id for the API call. Can be used to resolve tech issues. Communicate this in your tech related queries to cashfree

x-idempotency-key
string<UUID>

An idempotency key is a unique identifier you include with your API call. If the request fails or times out, you can safely retry it using the same key to avoid duplicate actions.

Path Parameters

order_id
string
required

The id which uniquely identifies your order

Response

OK

Settlement entity object

cursor
string
limit
integer
data
object[]