Skip to main content
GET
/
merchants
/
{merchant_id}
Get Merchant Status
curl --request GET \
  --url https://api-sandbox.cashfree.com/partners/merchants/{merchant_id} \
  --header 'x-partner-apikey: <x-partner-apikey>'
import requests

url = "https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}"

headers = {"x-partner-apikey": "<x-partner-apikey>"}

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

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

fetch('https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}', 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://api-sandbox.cashfree.com/partners/merchants/{merchant_id}",
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-partner-apikey: <x-partner-apikey>"
],
]);

$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://api-sandbox.cashfree.com/partners/merchants/{merchant_id}"

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

req.Header.Add("x-partner-apikey", "<x-partner-apikey>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}")
.header("x-partner-apikey", "<x-partner-apikey>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}")

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

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

response = http.request(request)
puts response.read_body
{
  "merchant_id": "test_merchantid_1",
  "merchant_email": "john@cashfree.com",
  "merchant_name": "John Doe Business",
  "created_at": "2023-07-24T04:45:20.000Z",
  "onboarding_status": "Email Verified",
  "product_status": [
    {
      "product_name": "PG",
      "product_min_kyc_status": "MIN_KYC_PENDING"
    }
  ]
}
{
"message": "Invalid authentication credentials",
"code": "failed_authentication",
"type": "invalid_request_error"
}
{
"message": "Merchant not found or linked to partner.",
"code": "partner_connect_not_found",
"type": "invalid_request_error"
}
{
"message": "Product is already active for the merchant.",
"code": "merchant_product_is_active",
"type": "invalid_request_error"
}
{
"message": "bad URL, please check API documentation",
"code": "request_failed",
"type": "invalid_request_error"
}

Headers

x-partner-apikey
string
required

Your partner API key for authentication

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

API version to be used for the request

Path Parameters

merchant_id
string
required

Unique identifier for the merchant

Response

OK

merchant_id
string

Unique identifier for the merchant. Max 40 characters, alphanumeric, hyphen, underscore are allowed.

merchant_email
string

Registered email address.

merchant_name
string

Business brand name.

created_at
string

Timestamp when merchant account was created.

onboarding_status
string

Merchant account onboarding status. Possible values are "Created" (email not verified) and "Email Verified" (email verified).

product_status
object[]

List of product KYC status objects containing product name and minimum KYC status required.