Skip to main content
POST
/
merchants
Create Merchant
curl --request POST \
  --url https://api-sandbox.cashfree.com/partners/merchants \
  --header 'Content-Type: application/json' \
  --header 'x-partner-apikey: <x-partner-apikey>' \
  --data @- <<EOF
{
  "merchant_id": "test_merchantid_1",
  "merchant_email": "john@cashfree.com",
  "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": "Description of the merchant's international payment use case and business requirements"
  }
}
EOF
import requests

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

payload = {
"merchant_id": "test_merchantid_1",
"merchant_email": "john@cashfree.com",
"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": "Description of the merchant's international payment use case and business requirements"
}
}
headers = {
"x-partner-apikey": "<x-partner-apikey>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'x-partner-apikey': '<x-partner-apikey>', 'Content-Type': 'application/json'},
body: JSON.stringify({
merchant_id: 'test_merchantid_1',
merchant_email: 'john@cashfree.com',
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: 'Description of the merchant\'s international payment use case and business requirements'
}
})
};

fetch('https://api-sandbox.cashfree.com/partners/merchants', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'merchant_id' => 'test_merchantid_1',
'merchant_email' => 'john@cashfree.com',
'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' => 'Description of the merchant\'s international payment use case and business requirements'
]
]),
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"

payload := strings.NewReader("{\n \"merchant_id\": \"test_merchantid_1\",\n \"merchant_email\": \"john@cashfree.com\",\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\": \"Description of the merchant's international payment use case and business requirements\"\n }\n}")

req, _ := http.NewRequest("POST", 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.post("https://api-sandbox.cashfree.com/partners/merchants")
.header("x-partner-apikey", "<x-partner-apikey>")
.header("Content-Type", "application/json")
.body("{\n \"merchant_id\": \"test_merchantid_1\",\n \"merchant_email\": \"john@cashfree.com\",\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\": \"Description of the merchant's international payment use case and business requirements\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

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

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

request = Net::HTTP::Post.new(url)
request["x-partner-apikey"] = '<x-partner-apikey>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"merchant_id\": \"test_merchantid_1\",\n \"merchant_email\": \"john@cashfree.com\",\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\": \"Description of the merchant's international payment use case and business requirements\"\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 with same id or email already exists.",
"code": "merchant_already_exists",
"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

Body

application/json
merchant_id
string
required

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

merchant_email
string
required

Registered email address.

merchant_name
string
required

Business brand name.

poc_phone
string
required

Owner phone number.

merchant_site_url
string
required

Business website.

business_details
object
website_details
object
bank_account_details
object

Bank account to receive settlements.

signatory_details
object

Beneficial owner of the business.

additional_details
object

Pass additional details required by specific products.

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.