Get Import Settlement Details for an Order
curl --request GET \
--url https://sandbox.cashfree.com/import/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/import/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/import/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/import/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/import/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/import/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/import/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{
"cf_order_details": {
"cf_payment_id": 5114911054376,
"order_amount": 8455,
"order_currency": "INR",
"order_id": "6cafd7aa-6568-4cc4-ba71-5e528272a3d3",
"payment_time": "2024-08-28T15:37:49"
},
"cf_ica_settlement_details": {
"cf_ica_settlement_id": 10,
"status": "SETTLED",
"collection_amount_inr": 86176,
"service_charge_inr": 1637.38,
"service_tax_inr": 294.73,
"adjustment_amount_inr": -18743.89,
"settlement_charges_inr": 0,
"settlement_tax_inr": 0,
"settlement_amount_inr": 65500.04,
"settlement_foreign_currency_details": {
"settlement_currency": "USD",
"settlement_forex_rate": 83.8788,
"settlement_amount": 780.8891
},
"payment_from": "2024-08-28T15:36:33",
"payment_till": "2024-08-28T15:37:49",
"settlement_utr": "123412",
"initiated_on": "2024-08-28T17:24:55",
"settled_on": "2024-08-29T16:30:46"
}
}{
"type": "authentication_error",
"message": "authentication Failed",
"code": "request_failed"
}{
"message": "Transaction not found",
"code": "transaction_not_found",
"type": "invalid_request_error"
}Collect from India
Get Import Settlement Details for an Order
This API is used to get ICA settlement details using PG Order ID.
GET
/
import
/
orders
/
{order_id}
/
settlements
Get Import Settlement Details for an Order
curl --request GET \
--url https://sandbox.cashfree.com/import/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/import/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/import/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/import/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/import/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/import/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/import/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{
"cf_order_details": {
"cf_payment_id": 5114911054376,
"order_amount": 8455,
"order_currency": "INR",
"order_id": "6cafd7aa-6568-4cc4-ba71-5e528272a3d3",
"payment_time": "2024-08-28T15:37:49"
},
"cf_ica_settlement_details": {
"cf_ica_settlement_id": 10,
"status": "SETTLED",
"collection_amount_inr": 86176,
"service_charge_inr": 1637.38,
"service_tax_inr": 294.73,
"adjustment_amount_inr": -18743.89,
"settlement_charges_inr": 0,
"settlement_tax_inr": 0,
"settlement_amount_inr": 65500.04,
"settlement_foreign_currency_details": {
"settlement_currency": "USD",
"settlement_forex_rate": 83.8788,
"settlement_amount": 780.8891
},
"payment_from": "2024-08-28T15:36:33",
"payment_till": "2024-08-28T15:37:49",
"settlement_utr": "123412",
"initiated_on": "2024-08-28T17:24:55",
"settled_on": "2024-08-29T16:30:46"
}
}{
"type": "authentication_error",
"message": "authentication Failed",
"code": "request_failed"
}{
"message": "Transaction not found",
"code": "transaction_not_found",
"type": "invalid_request_error"
}Authorizations
XClientID & XClientSecretXClientID & XPartnerAPIKeyXClientID & XClientSignatureHeaderXPartnerMerchantID & XPartnerAPIKeyXPartnerMerchantID & XPartnerAPIKey & XPartnerType
Client app ID. You can find your app id in the Merchant Dashboard.
Client secret key. You can find your secret key in the Merchant Dashboard.
Headers
API version to be used. Format is in YYYY-MM-DD.
Path Parameters
Your order ID.
Was this page helpful?
⌘I