Skip to main content
GET
/
beneficiary
Get Beneficiary V2
curl --request GET \
  --url https://sandbox.cashfree.com/payout/beneficiary \
  --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/payout/beneficiary"

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/payout/beneficiary', 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/payout/beneficiary",
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/payout/beneficiary"

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/payout/beneficiary")
.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/payout/beneficiary")

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
{
  "beneficiary_id": "JOHN18011343",
  "beneficiary_name": "John Doe",
  "beneficiary_instrument_details": {
    "bank_account_number": "1223334444",
    "bank_ifsc": "HDFC0000001",
    "vpa": "test@upi"
  },
  "beneficiary_contact_details": {
    "beneficiary_email": "sample@cashfree.com",
    "beneficiary_phone": "9876543210",
    "beneficiary_country_code": "+91",
    "beneficiary_address": "177A Bleecker Street",
    "beneficiary_city": "New York City",
    "beneficiary_state": "New York",
    "beneficiary_postal_code": "560011"
  },
  "beneficiary_status": "VERIFIED",
  "added_on": "2023-12-04T15:50:00Z"
}
HTTP status codeError codeMessageNext action
200---
400too_many_parameters_in_requestPlease provide either bank_account_number and bank_ifsc together or beneficiary_id alone. Do not include all three parameters in the requestPlease provide either bank_account_number and bank_ifsc together or beneficiary_id alone. Do not include all three parameters in the request.
400bank_ifsc_missingbank_ifsc: should be provided with the request if bank_account_number is providedProvide a valid bank_ifsc if bank_account_number is provided.
400bank_account_number_missingbank_account_number: should be provided with the request if bank_ifsc is providedProvide a valid bank_account_number is bank_ifsc is provided.
400beneficiary_identifiers_missingbeneficiary_identifiers_missing beneficiary_identifiers: Either beneficiary_id or the combination of bank_account_number and bank_ifsc has to be provided with the requestPlease provide either beneficiary_id or the combination of bank_account_number and bank_ifsc.
400beneficiary_id_length_exceededbeneficiary_id : should not be more than 50 characters long. value received: test_bene_idEnter a valid beneficiary_id
400beneficiary_id_invalidbeneficiary_id : should contain only letters, numbers, hyphen, underscore, pipe, and dot. Value received: .\qewqefwqevEnter a valid beneficiary_id.
400bank_account_number_length_exceededbank_account_number : should not be more than 25 characters long. value received: 235142352346523462456345263452345Provide a valid bank_account_number.
400bank_account_number_length_shortbank_account_number : should not be less than 4 characters long. value received: 12Provide a valid bank_account_number.
.400bank_account_number_invalidbank_account_number : should be alphanumeric. value received: 123@Provide a valid bank_account_number.
400bank_ifsc_invalidbank_ifsc : please provide a valid IFSC. value received: SBIN00708410Provide a valid bank_ifsc.
404beneficiary_not_foundBeneficiary does not existProvide the details of an existing beneficiary. If such a beneficiary does not exist, use CREATE API to create a new beneficiary.
404beneficiary_not_foundBeneficiary with the given bank_account_number and bank_ifsc does not existProvide the details of an existing beneficiary. If such a beneficiary does not exist, use CREATE API to create a new beneficiary
404beneficiary_not_foundBeneficiary exists with the given bank_account_number but a different bank_ifscIf the required a beneficiary does not exist, use CREATE API to create a new beneficiary

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]((https://merchant.cashfree.com/payouts/developers/api-keys).

Headers

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

It is the 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-cf-signature
string

Signature to be sent if IP is not whitelisted.

Query Parameters

beneficiary_id
string

It is the unique ID you created to identify the beneficiary while creating the beneficiary.

Maximum string length: 50
bank_account_number
string

It is the bank account number of the beneficiary. If bank_account_number is passed in query, bank_ifsc should also be passed.

Required string length: 4 - 25
bank_ifsc
string

It is the IFSC information as present in the beneficiary's bank account information. If bank_ifsc is passed in query, bank_account_number should also be passed.

Required string length: 11

Response

OK

Contains the information of the created beneficiary

beneficiary_id
string

It displays the unique Id you created to identify the beneficiary.

Example:

"JOHN18011343"

beneficiary_name
string

It displays the name of the beneficiary.

Example:

"John Doe"

beneficiary_instrument_details
object

It displays the payment instrument details of the beneficiary.

beneficiary_contact_details
object

It displays the contact details of the beneficiary.

beneficiary_status
enum<string>

It displays the current status of the beneficiary. Possible values are as follows

  • VERIFIED: Beneficiary is verified and is available for payouts
  • INVALID: Beneficiary is invalid
  • INITIATED: Beneficiary verification initiated
  • CANCELLED: Beneficiary verification cancelled
  • FAILED: Failed to verify beneficiary
  • DELETED: Beneficiary is deleted
Available options:
VERIFIED,
INVALID,
INITIATED,
CANCELLED,
FAILED,
DELETED
Example:

"VERIFIED"

added_on
string

It displays the time of the addition of the beneficiary in UTC.

Example:

"2023-11-22T12:38:22Z"