Skip to main content
GET
/
gc
/
transactions
Get All Transaction Details for Partner Merchants
curl --request GET \
  --url https://sandbox.cashfree.com/gc/transactions \
  --header 'x-api-version: <x-api-version>' \
  --header 'x-partner-api-key: <x-partner-api-key>' \
  --header 'x-partner-merchantid: <x-partner-merchantid>'
import requests

url = "https://sandbox.cashfree.com/gc/transactions"

headers = {
"x-partner-api-key": "<x-partner-api-key>",
"x-partner-merchantid": "<x-partner-merchantid>",
"x-api-version": "<x-api-version>"
}

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

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

fetch('https://sandbox.cashfree.com/gc/transactions', 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/gc/transactions",
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-partner-api-key: <x-partner-api-key>",
"x-partner-merchantid: <x-partner-merchantid>"
],
]);

$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/gc/transactions"

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

req.Header.Add("x-partner-api-key", "<x-partner-api-key>")
req.Header.Add("x-partner-merchantid", "<x-partner-merchantid>")
req.Header.Add("x-api-version", "<x-api-version>")

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/gc/transactions")
.header("x-partner-api-key", "<x-partner-api-key>")
.header("x-partner-merchantid", "<x-partner-merchantid>")
.header("x-api-version", "<x-api-version>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://sandbox.cashfree.com/gc/transactions")

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

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

response = http.request(request)
puts response.read_body
{
  "status": "SUCCESS",
  "subCode": "200",
  "message": "success_message",
  "data": {
    "payments": [
      {
        "amount": "4950.00",
        "currency": "USD",
        "paymentRail": "ACH",
        "paymentTime": "2023-05-03 15:05:03",
        "referenceId": 2125,
        "remarks": "successful transaction",
        "remitterAccount": "114015040938",
        "remitterAddress": "Wellington street, Oakridge",
        "remitterBic": "6789",
        "remitterCountry": "USA",
        "remitterName": "JANE",
        "remitterRoutingCode": "9089",
        "status": "READY_FOR_SETTLEMENT",
        "updatedStatusTime": "2022-04-21 04:34:04",
        "utr": "99105",
        "vAccountId": "DEMO2",
        "vAccountNumber": "CASHFREELGSH1234",
        "settlement": {
          "expectedSettlementDate": "2023-07-27",
          "firaFileDownloadUrl": "fileDownloadUrl",
          "fxRate": 85.12,
          "id": "ae0b76a5-4edd-45f3-81f1-0cf099abe78a",
          "inrAmount": 16219.65,
          "netPartnerCommission": 2106.72,
          "settlementCharge": 4213.44,
          "settlementChargeTax": 758.42,
          "status": "SETTLED",
          "utr": "URN1"
        }
      }
    ]
  }
}
{
"type": "authentication_error",
"message": "failed to authenticate",
"code": "authentication_failed"
}
Based on who you are, consider the below values in the API requests
Cashfree MerchantCashfree Partner
x-client-idx-partner-api-key
x-client-secretx-partner-merchantid

Headers

x-partner-api-key
string
required

Enter partner API keygit

x-partner-merchantid
string
required

Enter the merchant reference id used while creating merchant during onboarding

x-api-version
string
required

API version

Query Parameters

endDate
string<date>
required

Date in YYYYMMDD or YYYY-MM-DD HH:MM:SS. Search till this date. Has to be greater than startDate.

startDate
string<date>
required

Date in YYYYMMDD or YYYY-MM-DD HH:MM:SS. Search beginning from this date.

maxReturn
integer<int32>
required

Number (200 >= maxReturn > 0). For pagination support.

lastReturnId
integer<int32>
required

Number. For pagination support.

Response

Success response for retrieving transactions.

status
string
Example:

"SUCCESS"

subCode
string
Example:

"200"

message
string
Example:

"success_message"

data
object