curl --request PATCH \
--url https://api-sandbox.cashfree.com/partners/merchants/{merchant_id} \
--header 'Content-Type: application/json' \
--header 'x-partner-apikey: <x-partner-apikey>' \
--data '
{
"merchant_name": "John Doe Business",
"poc_phone": "9999999999",
"merchant_site_url": "cashfree.com",
"business_details": {
"business_legal_name": "John Doe Company",
"business_type": "Private Limited",
"business_model": "Both",
"business_category": "Ecommerce",
"business_subcategory": "Books",
"business_pan": "ABCCD8000T",
"business_address": "Flat-101, Apartment Name, Street Name",
"business_city": "Bengaluru",
"business_state": "Karnataka",
"business_postalcode": "560076",
"business_country": "India",
"business_gstin": "29AAICP2912R1ZR",
"business_cin": "L65190MH2003PLC143249"
},
"website_details": {
"website_contact_us": "https://www.cashfree.com/",
"website_privacy_policy": "https://www.cashfree.com/privacypolicy/",
"website_refund_policy": "https://www.cashfree.com/policies/refund-policy",
"website_shop_delivery": "https://www.cashfree.com/policies/shipping-policy",
"website_checkout_page": "https://www.cashfree.com/",
"website_about_us": "https://www.cashfree.com/about-us/",
"website_pricing_policy": "https://www.cashfree.com/payment-gateway-charges/",
"website_product_service": "https://www.cashfree.com/payment-gateway-india/",
"website_address": "https://www.cashfree.com/grievance-redressal-policy",
"website_tnc": "https://www.cashfree.com/tnc/"
},
"bank_account_details": {
"bank_account_number": "026291800001191",
"bank_ifsc": "YESB0000262"
},
"signatory_details": {
"signatory_name": "John Doe",
"signatory_pan": "ABCPV1234D"
},
"additional_details": {
"payment_gateway_use_case": "Payment Gateway required for collecting money from customers for purchasing books",
"payment_gateway_mcc": "5942",
"exporter_type": "Service Exporter",
"gcl_purpose_code": "P0101",
"import_export_code": 123456789,
"gcl_transaction_value": "1 - 5 Lac",
"gcl_transaction_volume": "1 - 5",
"gcl_use_case": "lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem"
}
}
'import requests
url = "https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}"
payload = {
"merchant_name": "John Doe Business",
"poc_phone": "9999999999",
"merchant_site_url": "cashfree.com",
"business_details": {
"business_legal_name": "John Doe Company",
"business_type": "Private Limited",
"business_model": "Both",
"business_category": "Ecommerce",
"business_subcategory": "Books",
"business_pan": "ABCCD8000T",
"business_address": "Flat-101, Apartment Name, Street Name",
"business_city": "Bengaluru",
"business_state": "Karnataka",
"business_postalcode": "560076",
"business_country": "India",
"business_gstin": "29AAICP2912R1ZR",
"business_cin": "L65190MH2003PLC143249"
},
"website_details": {
"website_contact_us": "https://www.cashfree.com/",
"website_privacy_policy": "https://www.cashfree.com/privacypolicy/",
"website_refund_policy": "https://www.cashfree.com/policies/refund-policy",
"website_shop_delivery": "https://www.cashfree.com/policies/shipping-policy",
"website_checkout_page": "https://www.cashfree.com/",
"website_about_us": "https://www.cashfree.com/about-us/",
"website_pricing_policy": "https://www.cashfree.com/payment-gateway-charges/",
"website_product_service": "https://www.cashfree.com/payment-gateway-india/",
"website_address": "https://www.cashfree.com/grievance-redressal-policy",
"website_tnc": "https://www.cashfree.com/tnc/"
},
"bank_account_details": {
"bank_account_number": "026291800001191",
"bank_ifsc": "YESB0000262"
},
"signatory_details": {
"signatory_name": "John Doe",
"signatory_pan": "ABCPV1234D"
},
"additional_details": {
"payment_gateway_use_case": "Payment Gateway required for collecting money from customers for purchasing books",
"payment_gateway_mcc": "5942",
"exporter_type": "Service Exporter",
"gcl_purpose_code": "P0101",
"import_export_code": 123456789,
"gcl_transaction_value": "1 - 5 Lac",
"gcl_transaction_volume": "1 - 5",
"gcl_use_case": "lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem"
}
}
headers = {
"x-partner-apikey": "<x-partner-apikey>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-partner-apikey': '<x-partner-apikey>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_name: 'John Doe Business',
poc_phone: '9999999999',
merchant_site_url: 'cashfree.com',
business_details: {
business_legal_name: 'John Doe Company',
business_type: 'Private Limited',
business_model: 'Both',
business_category: 'Ecommerce',
business_subcategory: 'Books',
business_pan: 'ABCCD8000T',
business_address: 'Flat-101, Apartment Name, Street Name',
business_city: 'Bengaluru',
business_state: 'Karnataka',
business_postalcode: '560076',
business_country: 'India',
business_gstin: '29AAICP2912R1ZR',
business_cin: 'L65190MH2003PLC143249'
},
website_details: {
website_contact_us: 'https://www.cashfree.com/',
website_privacy_policy: 'https://www.cashfree.com/privacypolicy/',
website_refund_policy: 'https://www.cashfree.com/policies/refund-policy',
website_shop_delivery: 'https://www.cashfree.com/policies/shipping-policy',
website_checkout_page: 'https://www.cashfree.com/',
website_about_us: 'https://www.cashfree.com/about-us/',
website_pricing_policy: 'https://www.cashfree.com/payment-gateway-charges/',
website_product_service: 'https://www.cashfree.com/payment-gateway-india/',
website_address: 'https://www.cashfree.com/grievance-redressal-policy',
website_tnc: 'https://www.cashfree.com/tnc/'
},
bank_account_details: {bank_account_number: '026291800001191', bank_ifsc: 'YESB0000262'},
signatory_details: {signatory_name: 'John Doe', signatory_pan: 'ABCPV1234D'},
additional_details: {
payment_gateway_use_case: 'Payment Gateway required for collecting money from customers for purchasing books',
payment_gateway_mcc: '5942',
exporter_type: 'Service Exporter',
gcl_purpose_code: 'P0101',
import_export_code: 123456789,
gcl_transaction_value: '1 - 5 Lac',
gcl_transaction_volume: '1 - 5',
gcl_use_case: 'lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem'
}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'merchant_name' => 'John Doe Business',
'poc_phone' => '9999999999',
'merchant_site_url' => 'cashfree.com',
'business_details' => [
'business_legal_name' => 'John Doe Company',
'business_type' => 'Private Limited',
'business_model' => 'Both',
'business_category' => 'Ecommerce',
'business_subcategory' => 'Books',
'business_pan' => 'ABCCD8000T',
'business_address' => 'Flat-101, Apartment Name, Street Name',
'business_city' => 'Bengaluru',
'business_state' => 'Karnataka',
'business_postalcode' => '560076',
'business_country' => 'India',
'business_gstin' => '29AAICP2912R1ZR',
'business_cin' => 'L65190MH2003PLC143249'
],
'website_details' => [
'website_contact_us' => 'https://www.cashfree.com/',
'website_privacy_policy' => 'https://www.cashfree.com/privacypolicy/',
'website_refund_policy' => 'https://www.cashfree.com/policies/refund-policy',
'website_shop_delivery' => 'https://www.cashfree.com/policies/shipping-policy',
'website_checkout_page' => 'https://www.cashfree.com/',
'website_about_us' => 'https://www.cashfree.com/about-us/',
'website_pricing_policy' => 'https://www.cashfree.com/payment-gateway-charges/',
'website_product_service' => 'https://www.cashfree.com/payment-gateway-india/',
'website_address' => 'https://www.cashfree.com/grievance-redressal-policy',
'website_tnc' => 'https://www.cashfree.com/tnc/'
],
'bank_account_details' => [
'bank_account_number' => '026291800001191',
'bank_ifsc' => 'YESB0000262'
],
'signatory_details' => [
'signatory_name' => 'John Doe',
'signatory_pan' => 'ABCPV1234D'
],
'additional_details' => [
'payment_gateway_use_case' => 'Payment Gateway required for collecting money from customers for purchasing books',
'payment_gateway_mcc' => '5942',
'exporter_type' => 'Service Exporter',
'gcl_purpose_code' => 'P0101',
'import_export_code' => 123456789,
'gcl_transaction_value' => '1 - 5 Lac',
'gcl_transaction_volume' => '1 - 5',
'gcl_use_case' => 'lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}"
payload := strings.NewReader("{\n \"merchant_name\": \"John Doe Business\",\n \"poc_phone\": \"9999999999\",\n \"merchant_site_url\": \"cashfree.com\",\n \"business_details\": {\n \"business_legal_name\": \"John Doe Company\",\n \"business_type\": \"Private Limited\",\n \"business_model\": \"Both\",\n \"business_category\": \"Ecommerce\",\n \"business_subcategory\": \"Books\",\n \"business_pan\": \"ABCCD8000T\",\n \"business_address\": \"Flat-101, Apartment Name, Street Name\",\n \"business_city\": \"Bengaluru\",\n \"business_state\": \"Karnataka\",\n \"business_postalcode\": \"560076\",\n \"business_country\": \"India\",\n \"business_gstin\": \"29AAICP2912R1ZR\",\n \"business_cin\": \"L65190MH2003PLC143249\"\n },\n \"website_details\": {\n \"website_contact_us\": \"https://www.cashfree.com/\",\n \"website_privacy_policy\": \"https://www.cashfree.com/privacypolicy/\",\n \"website_refund_policy\": \"https://www.cashfree.com/policies/refund-policy\",\n \"website_shop_delivery\": \"https://www.cashfree.com/policies/shipping-policy\",\n \"website_checkout_page\": \"https://www.cashfree.com/\",\n \"website_about_us\": \"https://www.cashfree.com/about-us/\",\n \"website_pricing_policy\": \"https://www.cashfree.com/payment-gateway-charges/\",\n \"website_product_service\": \"https://www.cashfree.com/payment-gateway-india/\",\n \"website_address\": \"https://www.cashfree.com/grievance-redressal-policy\",\n \"website_tnc\": \"https://www.cashfree.com/tnc/\"\n },\n \"bank_account_details\": {\n \"bank_account_number\": \"026291800001191\",\n \"bank_ifsc\": \"YESB0000262\"\n },\n \"signatory_details\": {\n \"signatory_name\": \"John Doe\",\n \"signatory_pan\": \"ABCPV1234D\"\n },\n \"additional_details\": {\n \"payment_gateway_use_case\": \"Payment Gateway required for collecting money from customers for purchasing books\",\n \"payment_gateway_mcc\": \"5942\",\n \"exporter_type\": \"Service Exporter\",\n \"gcl_purpose_code\": \"P0101\",\n \"import_export_code\": 123456789,\n \"gcl_transaction_value\": \"1 - 5 Lac\",\n \"gcl_transaction_volume\": \"1 - 5\",\n \"gcl_use_case\": \"lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-partner-apikey", "<x-partner-apikey>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}")
.header("x-partner-apikey", "<x-partner-apikey>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_name\": \"John Doe Business\",\n \"poc_phone\": \"9999999999\",\n \"merchant_site_url\": \"cashfree.com\",\n \"business_details\": {\n \"business_legal_name\": \"John Doe Company\",\n \"business_type\": \"Private Limited\",\n \"business_model\": \"Both\",\n \"business_category\": \"Ecommerce\",\n \"business_subcategory\": \"Books\",\n \"business_pan\": \"ABCCD8000T\",\n \"business_address\": \"Flat-101, Apartment Name, Street Name\",\n \"business_city\": \"Bengaluru\",\n \"business_state\": \"Karnataka\",\n \"business_postalcode\": \"560076\",\n \"business_country\": \"India\",\n \"business_gstin\": \"29AAICP2912R1ZR\",\n \"business_cin\": \"L65190MH2003PLC143249\"\n },\n \"website_details\": {\n \"website_contact_us\": \"https://www.cashfree.com/\",\n \"website_privacy_policy\": \"https://www.cashfree.com/privacypolicy/\",\n \"website_refund_policy\": \"https://www.cashfree.com/policies/refund-policy\",\n \"website_shop_delivery\": \"https://www.cashfree.com/policies/shipping-policy\",\n \"website_checkout_page\": \"https://www.cashfree.com/\",\n \"website_about_us\": \"https://www.cashfree.com/about-us/\",\n \"website_pricing_policy\": \"https://www.cashfree.com/payment-gateway-charges/\",\n \"website_product_service\": \"https://www.cashfree.com/payment-gateway-india/\",\n \"website_address\": \"https://www.cashfree.com/grievance-redressal-policy\",\n \"website_tnc\": \"https://www.cashfree.com/tnc/\"\n },\n \"bank_account_details\": {\n \"bank_account_number\": \"026291800001191\",\n \"bank_ifsc\": \"YESB0000262\"\n },\n \"signatory_details\": {\n \"signatory_name\": \"John Doe\",\n \"signatory_pan\": \"ABCPV1234D\"\n },\n \"additional_details\": {\n \"payment_gateway_use_case\": \"Payment Gateway required for collecting money from customers for purchasing books\",\n \"payment_gateway_mcc\": \"5942\",\n \"exporter_type\": \"Service Exporter\",\n \"gcl_purpose_code\": \"P0101\",\n \"import_export_code\": 123456789,\n \"gcl_transaction_value\": \"1 - 5 Lac\",\n \"gcl_transaction_volume\": \"1 - 5\",\n \"gcl_use_case\": \"lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem\"\n }\n}")
.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::Patch.new(url)
request["x-partner-apikey"] = '<x-partner-apikey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_name\": \"John Doe Business\",\n \"poc_phone\": \"9999999999\",\n \"merchant_site_url\": \"cashfree.com\",\n \"business_details\": {\n \"business_legal_name\": \"John Doe Company\",\n \"business_type\": \"Private Limited\",\n \"business_model\": \"Both\",\n \"business_category\": \"Ecommerce\",\n \"business_subcategory\": \"Books\",\n \"business_pan\": \"ABCCD8000T\",\n \"business_address\": \"Flat-101, Apartment Name, Street Name\",\n \"business_city\": \"Bengaluru\",\n \"business_state\": \"Karnataka\",\n \"business_postalcode\": \"560076\",\n \"business_country\": \"India\",\n \"business_gstin\": \"29AAICP2912R1ZR\",\n \"business_cin\": \"L65190MH2003PLC143249\"\n },\n \"website_details\": {\n \"website_contact_us\": \"https://www.cashfree.com/\",\n \"website_privacy_policy\": \"https://www.cashfree.com/privacypolicy/\",\n \"website_refund_policy\": \"https://www.cashfree.com/policies/refund-policy\",\n \"website_shop_delivery\": \"https://www.cashfree.com/policies/shipping-policy\",\n \"website_checkout_page\": \"https://www.cashfree.com/\",\n \"website_about_us\": \"https://www.cashfree.com/about-us/\",\n \"website_pricing_policy\": \"https://www.cashfree.com/payment-gateway-charges/\",\n \"website_product_service\": \"https://www.cashfree.com/payment-gateway-india/\",\n \"website_address\": \"https://www.cashfree.com/grievance-redressal-policy\",\n \"website_tnc\": \"https://www.cashfree.com/tnc/\"\n },\n \"bank_account_details\": {\n \"bank_account_number\": \"026291800001191\",\n \"bank_ifsc\": \"YESB0000262\"\n },\n \"signatory_details\": {\n \"signatory_name\": \"John Doe\",\n \"signatory_pan\": \"ABCPV1234D\"\n },\n \"additional_details\": {\n \"payment_gateway_use_case\": \"Payment Gateway required for collecting money from customers for purchasing books\",\n \"payment_gateway_mcc\": \"5942\",\n \"exporter_type\": \"Service Exporter\",\n \"gcl_purpose_code\": \"P0101\",\n \"import_export_code\": 123456789,\n \"gcl_transaction_value\": \"1 - 5 Lac\",\n \"gcl_transaction_volume\": \"1 - 5\",\n \"gcl_use_case\": \"lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem\"\n }\n}"
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"
}Update Merchant
Use this API to update a sub-merchant account. You can provide basic details only if the account is not yet active.
curl --request PATCH \
--url https://api-sandbox.cashfree.com/partners/merchants/{merchant_id} \
--header 'Content-Type: application/json' \
--header 'x-partner-apikey: <x-partner-apikey>' \
--data '
{
"merchant_name": "John Doe Business",
"poc_phone": "9999999999",
"merchant_site_url": "cashfree.com",
"business_details": {
"business_legal_name": "John Doe Company",
"business_type": "Private Limited",
"business_model": "Both",
"business_category": "Ecommerce",
"business_subcategory": "Books",
"business_pan": "ABCCD8000T",
"business_address": "Flat-101, Apartment Name, Street Name",
"business_city": "Bengaluru",
"business_state": "Karnataka",
"business_postalcode": "560076",
"business_country": "India",
"business_gstin": "29AAICP2912R1ZR",
"business_cin": "L65190MH2003PLC143249"
},
"website_details": {
"website_contact_us": "https://www.cashfree.com/",
"website_privacy_policy": "https://www.cashfree.com/privacypolicy/",
"website_refund_policy": "https://www.cashfree.com/policies/refund-policy",
"website_shop_delivery": "https://www.cashfree.com/policies/shipping-policy",
"website_checkout_page": "https://www.cashfree.com/",
"website_about_us": "https://www.cashfree.com/about-us/",
"website_pricing_policy": "https://www.cashfree.com/payment-gateway-charges/",
"website_product_service": "https://www.cashfree.com/payment-gateway-india/",
"website_address": "https://www.cashfree.com/grievance-redressal-policy",
"website_tnc": "https://www.cashfree.com/tnc/"
},
"bank_account_details": {
"bank_account_number": "026291800001191",
"bank_ifsc": "YESB0000262"
},
"signatory_details": {
"signatory_name": "John Doe",
"signatory_pan": "ABCPV1234D"
},
"additional_details": {
"payment_gateway_use_case": "Payment Gateway required for collecting money from customers for purchasing books",
"payment_gateway_mcc": "5942",
"exporter_type": "Service Exporter",
"gcl_purpose_code": "P0101",
"import_export_code": 123456789,
"gcl_transaction_value": "1 - 5 Lac",
"gcl_transaction_volume": "1 - 5",
"gcl_use_case": "lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem"
}
}
'import requests
url = "https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}"
payload = {
"merchant_name": "John Doe Business",
"poc_phone": "9999999999",
"merchant_site_url": "cashfree.com",
"business_details": {
"business_legal_name": "John Doe Company",
"business_type": "Private Limited",
"business_model": "Both",
"business_category": "Ecommerce",
"business_subcategory": "Books",
"business_pan": "ABCCD8000T",
"business_address": "Flat-101, Apartment Name, Street Name",
"business_city": "Bengaluru",
"business_state": "Karnataka",
"business_postalcode": "560076",
"business_country": "India",
"business_gstin": "29AAICP2912R1ZR",
"business_cin": "L65190MH2003PLC143249"
},
"website_details": {
"website_contact_us": "https://www.cashfree.com/",
"website_privacy_policy": "https://www.cashfree.com/privacypolicy/",
"website_refund_policy": "https://www.cashfree.com/policies/refund-policy",
"website_shop_delivery": "https://www.cashfree.com/policies/shipping-policy",
"website_checkout_page": "https://www.cashfree.com/",
"website_about_us": "https://www.cashfree.com/about-us/",
"website_pricing_policy": "https://www.cashfree.com/payment-gateway-charges/",
"website_product_service": "https://www.cashfree.com/payment-gateway-india/",
"website_address": "https://www.cashfree.com/grievance-redressal-policy",
"website_tnc": "https://www.cashfree.com/tnc/"
},
"bank_account_details": {
"bank_account_number": "026291800001191",
"bank_ifsc": "YESB0000262"
},
"signatory_details": {
"signatory_name": "John Doe",
"signatory_pan": "ABCPV1234D"
},
"additional_details": {
"payment_gateway_use_case": "Payment Gateway required for collecting money from customers for purchasing books",
"payment_gateway_mcc": "5942",
"exporter_type": "Service Exporter",
"gcl_purpose_code": "P0101",
"import_export_code": 123456789,
"gcl_transaction_value": "1 - 5 Lac",
"gcl_transaction_volume": "1 - 5",
"gcl_use_case": "lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem"
}
}
headers = {
"x-partner-apikey": "<x-partner-apikey>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-partner-apikey': '<x-partner-apikey>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_name: 'John Doe Business',
poc_phone: '9999999999',
merchant_site_url: 'cashfree.com',
business_details: {
business_legal_name: 'John Doe Company',
business_type: 'Private Limited',
business_model: 'Both',
business_category: 'Ecommerce',
business_subcategory: 'Books',
business_pan: 'ABCCD8000T',
business_address: 'Flat-101, Apartment Name, Street Name',
business_city: 'Bengaluru',
business_state: 'Karnataka',
business_postalcode: '560076',
business_country: 'India',
business_gstin: '29AAICP2912R1ZR',
business_cin: 'L65190MH2003PLC143249'
},
website_details: {
website_contact_us: 'https://www.cashfree.com/',
website_privacy_policy: 'https://www.cashfree.com/privacypolicy/',
website_refund_policy: 'https://www.cashfree.com/policies/refund-policy',
website_shop_delivery: 'https://www.cashfree.com/policies/shipping-policy',
website_checkout_page: 'https://www.cashfree.com/',
website_about_us: 'https://www.cashfree.com/about-us/',
website_pricing_policy: 'https://www.cashfree.com/payment-gateway-charges/',
website_product_service: 'https://www.cashfree.com/payment-gateway-india/',
website_address: 'https://www.cashfree.com/grievance-redressal-policy',
website_tnc: 'https://www.cashfree.com/tnc/'
},
bank_account_details: {bank_account_number: '026291800001191', bank_ifsc: 'YESB0000262'},
signatory_details: {signatory_name: 'John Doe', signatory_pan: 'ABCPV1234D'},
additional_details: {
payment_gateway_use_case: 'Payment Gateway required for collecting money from customers for purchasing books',
payment_gateway_mcc: '5942',
exporter_type: 'Service Exporter',
gcl_purpose_code: 'P0101',
import_export_code: 123456789,
gcl_transaction_value: '1 - 5 Lac',
gcl_transaction_volume: '1 - 5',
gcl_use_case: 'lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem'
}
})
};
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 => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'merchant_name' => 'John Doe Business',
'poc_phone' => '9999999999',
'merchant_site_url' => 'cashfree.com',
'business_details' => [
'business_legal_name' => 'John Doe Company',
'business_type' => 'Private Limited',
'business_model' => 'Both',
'business_category' => 'Ecommerce',
'business_subcategory' => 'Books',
'business_pan' => 'ABCCD8000T',
'business_address' => 'Flat-101, Apartment Name, Street Name',
'business_city' => 'Bengaluru',
'business_state' => 'Karnataka',
'business_postalcode' => '560076',
'business_country' => 'India',
'business_gstin' => '29AAICP2912R1ZR',
'business_cin' => 'L65190MH2003PLC143249'
],
'website_details' => [
'website_contact_us' => 'https://www.cashfree.com/',
'website_privacy_policy' => 'https://www.cashfree.com/privacypolicy/',
'website_refund_policy' => 'https://www.cashfree.com/policies/refund-policy',
'website_shop_delivery' => 'https://www.cashfree.com/policies/shipping-policy',
'website_checkout_page' => 'https://www.cashfree.com/',
'website_about_us' => 'https://www.cashfree.com/about-us/',
'website_pricing_policy' => 'https://www.cashfree.com/payment-gateway-charges/',
'website_product_service' => 'https://www.cashfree.com/payment-gateway-india/',
'website_address' => 'https://www.cashfree.com/grievance-redressal-policy',
'website_tnc' => 'https://www.cashfree.com/tnc/'
],
'bank_account_details' => [
'bank_account_number' => '026291800001191',
'bank_ifsc' => 'YESB0000262'
],
'signatory_details' => [
'signatory_name' => 'John Doe',
'signatory_pan' => 'ABCPV1234D'
],
'additional_details' => [
'payment_gateway_use_case' => 'Payment Gateway required for collecting money from customers for purchasing books',
'payment_gateway_mcc' => '5942',
'exporter_type' => 'Service Exporter',
'gcl_purpose_code' => 'P0101',
'import_export_code' => 123456789,
'gcl_transaction_value' => '1 - 5 Lac',
'gcl_transaction_volume' => '1 - 5',
'gcl_use_case' => 'lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}"
payload := strings.NewReader("{\n \"merchant_name\": \"John Doe Business\",\n \"poc_phone\": \"9999999999\",\n \"merchant_site_url\": \"cashfree.com\",\n \"business_details\": {\n \"business_legal_name\": \"John Doe Company\",\n \"business_type\": \"Private Limited\",\n \"business_model\": \"Both\",\n \"business_category\": \"Ecommerce\",\n \"business_subcategory\": \"Books\",\n \"business_pan\": \"ABCCD8000T\",\n \"business_address\": \"Flat-101, Apartment Name, Street Name\",\n \"business_city\": \"Bengaluru\",\n \"business_state\": \"Karnataka\",\n \"business_postalcode\": \"560076\",\n \"business_country\": \"India\",\n \"business_gstin\": \"29AAICP2912R1ZR\",\n \"business_cin\": \"L65190MH2003PLC143249\"\n },\n \"website_details\": {\n \"website_contact_us\": \"https://www.cashfree.com/\",\n \"website_privacy_policy\": \"https://www.cashfree.com/privacypolicy/\",\n \"website_refund_policy\": \"https://www.cashfree.com/policies/refund-policy\",\n \"website_shop_delivery\": \"https://www.cashfree.com/policies/shipping-policy\",\n \"website_checkout_page\": \"https://www.cashfree.com/\",\n \"website_about_us\": \"https://www.cashfree.com/about-us/\",\n \"website_pricing_policy\": \"https://www.cashfree.com/payment-gateway-charges/\",\n \"website_product_service\": \"https://www.cashfree.com/payment-gateway-india/\",\n \"website_address\": \"https://www.cashfree.com/grievance-redressal-policy\",\n \"website_tnc\": \"https://www.cashfree.com/tnc/\"\n },\n \"bank_account_details\": {\n \"bank_account_number\": \"026291800001191\",\n \"bank_ifsc\": \"YESB0000262\"\n },\n \"signatory_details\": {\n \"signatory_name\": \"John Doe\",\n \"signatory_pan\": \"ABCPV1234D\"\n },\n \"additional_details\": {\n \"payment_gateway_use_case\": \"Payment Gateway required for collecting money from customers for purchasing books\",\n \"payment_gateway_mcc\": \"5942\",\n \"exporter_type\": \"Service Exporter\",\n \"gcl_purpose_code\": \"P0101\",\n \"import_export_code\": 123456789,\n \"gcl_transaction_value\": \"1 - 5 Lac\",\n \"gcl_transaction_volume\": \"1 - 5\",\n \"gcl_use_case\": \"lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem\"\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-partner-apikey", "<x-partner-apikey>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api-sandbox.cashfree.com/partners/merchants/{merchant_id}")
.header("x-partner-apikey", "<x-partner-apikey>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_name\": \"John Doe Business\",\n \"poc_phone\": \"9999999999\",\n \"merchant_site_url\": \"cashfree.com\",\n \"business_details\": {\n \"business_legal_name\": \"John Doe Company\",\n \"business_type\": \"Private Limited\",\n \"business_model\": \"Both\",\n \"business_category\": \"Ecommerce\",\n \"business_subcategory\": \"Books\",\n \"business_pan\": \"ABCCD8000T\",\n \"business_address\": \"Flat-101, Apartment Name, Street Name\",\n \"business_city\": \"Bengaluru\",\n \"business_state\": \"Karnataka\",\n \"business_postalcode\": \"560076\",\n \"business_country\": \"India\",\n \"business_gstin\": \"29AAICP2912R1ZR\",\n \"business_cin\": \"L65190MH2003PLC143249\"\n },\n \"website_details\": {\n \"website_contact_us\": \"https://www.cashfree.com/\",\n \"website_privacy_policy\": \"https://www.cashfree.com/privacypolicy/\",\n \"website_refund_policy\": \"https://www.cashfree.com/policies/refund-policy\",\n \"website_shop_delivery\": \"https://www.cashfree.com/policies/shipping-policy\",\n \"website_checkout_page\": \"https://www.cashfree.com/\",\n \"website_about_us\": \"https://www.cashfree.com/about-us/\",\n \"website_pricing_policy\": \"https://www.cashfree.com/payment-gateway-charges/\",\n \"website_product_service\": \"https://www.cashfree.com/payment-gateway-india/\",\n \"website_address\": \"https://www.cashfree.com/grievance-redressal-policy\",\n \"website_tnc\": \"https://www.cashfree.com/tnc/\"\n },\n \"bank_account_details\": {\n \"bank_account_number\": \"026291800001191\",\n \"bank_ifsc\": \"YESB0000262\"\n },\n \"signatory_details\": {\n \"signatory_name\": \"John Doe\",\n \"signatory_pan\": \"ABCPV1234D\"\n },\n \"additional_details\": {\n \"payment_gateway_use_case\": \"Payment Gateway required for collecting money from customers for purchasing books\",\n \"payment_gateway_mcc\": \"5942\",\n \"exporter_type\": \"Service Exporter\",\n \"gcl_purpose_code\": \"P0101\",\n \"import_export_code\": 123456789,\n \"gcl_transaction_value\": \"1 - 5 Lac\",\n \"gcl_transaction_volume\": \"1 - 5\",\n \"gcl_use_case\": \"lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem\"\n }\n}")
.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::Patch.new(url)
request["x-partner-apikey"] = '<x-partner-apikey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_name\": \"John Doe Business\",\n \"poc_phone\": \"9999999999\",\n \"merchant_site_url\": \"cashfree.com\",\n \"business_details\": {\n \"business_legal_name\": \"John Doe Company\",\n \"business_type\": \"Private Limited\",\n \"business_model\": \"Both\",\n \"business_category\": \"Ecommerce\",\n \"business_subcategory\": \"Books\",\n \"business_pan\": \"ABCCD8000T\",\n \"business_address\": \"Flat-101, Apartment Name, Street Name\",\n \"business_city\": \"Bengaluru\",\n \"business_state\": \"Karnataka\",\n \"business_postalcode\": \"560076\",\n \"business_country\": \"India\",\n \"business_gstin\": \"29AAICP2912R1ZR\",\n \"business_cin\": \"L65190MH2003PLC143249\"\n },\n \"website_details\": {\n \"website_contact_us\": \"https://www.cashfree.com/\",\n \"website_privacy_policy\": \"https://www.cashfree.com/privacypolicy/\",\n \"website_refund_policy\": \"https://www.cashfree.com/policies/refund-policy\",\n \"website_shop_delivery\": \"https://www.cashfree.com/policies/shipping-policy\",\n \"website_checkout_page\": \"https://www.cashfree.com/\",\n \"website_about_us\": \"https://www.cashfree.com/about-us/\",\n \"website_pricing_policy\": \"https://www.cashfree.com/payment-gateway-charges/\",\n \"website_product_service\": \"https://www.cashfree.com/payment-gateway-india/\",\n \"website_address\": \"https://www.cashfree.com/grievance-redressal-policy\",\n \"website_tnc\": \"https://www.cashfree.com/tnc/\"\n },\n \"bank_account_details\": {\n \"bank_account_number\": \"026291800001191\",\n \"bank_ifsc\": \"YESB0000262\"\n },\n \"signatory_details\": {\n \"signatory_name\": \"John Doe\",\n \"signatory_pan\": \"ABCPV1234D\"\n },\n \"additional_details\": {\n \"payment_gateway_use_case\": \"Payment Gateway required for collecting money from customers for purchasing books\",\n \"payment_gateway_mcc\": \"5942\",\n \"exporter_type\": \"Service Exporter\",\n \"gcl_purpose_code\": \"P0101\",\n \"import_export_code\": 123456789,\n \"gcl_transaction_value\": \"1 - 5 Lac\",\n \"gcl_transaction_volume\": \"1 - 5\",\n \"gcl_use_case\": \"lorem ipsum dolar cimat lorem ipsum dolar cimat lorem ipsum dolar cimat lorem\"\n }\n}"
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
Partner API Key
API version to be used
Path Parameters
Unique identifier for the merchant
Body
Business brand name
Owner phone number
Business website
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Bank account to receive settlements
Show child attributes
Show child attributes
Beneficial Owner of the Business
Show child attributes
Show child attributes
Pass additional details required by specific products
Show child attributes
Show child attributes
Response
OK
Unique identifier for the merchant. Max 40 characters, Alphanumeric, Hypeh, Underscore allowed.
Registered email address
Business brand name
Timestamp when merchant account was created
Merchant account onboarding status- "Created": Email is not verified, "Email Verified": Email is verified
List of Product KYC Status {"product_name": "PG","product_min_kyc_status": "MIN_KYC_PENDING"}
Show child attributes
Show child attributes
