Merchants
Create a merchant
Create a new merchant.
Merchants represent legal entities which are interacting with the card networks.
Onboarding merchants for an account is a prerequisite for creating network tokens. Depending on the setup of the account, this allows to render complex ecommerce ecosystem setups.
POST
/
merchants
Create a merchant
curl --request POST \
--url https://sandbox.hellgate.io/merchants \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"company_city": "Berlin",
"country_code": "DE",
"legal_name": "Example Merchant",
"website_url": "https://example.com",
"identity_and_verification_enabled": false,
"3ds_enabled": true,
"default_currency": "EUR",
"default_merchant_id": "1234567890",
"schemes": [
{
"name": "visa",
"acquirer_bin": "40001",
"requestor_id": "123456789.visa",
"requestor_name": "3dsclient.local.visa",
"category_code": "3200",
"merchant_id": "",
"merchant_name": ""
}
]
}
'import requests
url = "https://sandbox.hellgate.io/merchants"
payload = {
"company_city": "Berlin",
"country_code": "DE",
"legal_name": "Example Merchant",
"website_url": "https://example.com",
"identity_and_verification_enabled": False,
"3ds_enabled": True,
"default_currency": "EUR",
"default_merchant_id": "1234567890",
"schemes": [
{
"name": "visa",
"acquirer_bin": "40001",
"requestor_id": "123456789.visa",
"requestor_name": "3dsclient.local.visa",
"category_code": "3200",
"merchant_id": "",
"merchant_name": ""
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_city: 'Berlin',
country_code: 'DE',
legal_name: 'Example Merchant',
website_url: 'https://example.com',
identity_and_verification_enabled: false,
'3ds_enabled': true,
default_currency: 'EUR',
default_merchant_id: '1234567890',
schemes: [
{
name: 'visa',
acquirer_bin: '40001',
requestor_id: '123456789.visa',
requestor_name: '3dsclient.local.visa',
category_code: '3200',
merchant_id: '',
merchant_name: ''
}
]
})
};
fetch('https://sandbox.hellgate.io/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://sandbox.hellgate.io/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([
'company_city' => 'Berlin',
'country_code' => 'DE',
'legal_name' => 'Example Merchant',
'website_url' => 'https://example.com',
'identity_and_verification_enabled' => false,
'3ds_enabled' => true,
'default_currency' => 'EUR',
'default_merchant_id' => '1234567890',
'schemes' => [
[
'name' => 'visa',
'acquirer_bin' => '40001',
'requestor_id' => '123456789.visa',
'requestor_name' => '3dsclient.local.visa',
'category_code' => '3200',
'merchant_id' => '',
'merchant_name' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hellgate.io/merchants"
payload := strings.NewReader("{\n \"company_city\": \"Berlin\",\n \"country_code\": \"DE\",\n \"legal_name\": \"Example Merchant\",\n \"website_url\": \"https://example.com\",\n \"identity_and_verification_enabled\": false,\n \"3ds_enabled\": true,\n \"default_currency\": \"EUR\",\n \"default_merchant_id\": \"1234567890\",\n \"schemes\": [\n {\n \"name\": \"visa\",\n \"acquirer_bin\": \"40001\",\n \"requestor_id\": \"123456789.visa\",\n \"requestor_name\": \"3dsclient.local.visa\",\n \"category_code\": \"3200\",\n \"merchant_id\": \"\",\n \"merchant_name\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://sandbox.hellgate.io/merchants")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_city\": \"Berlin\",\n \"country_code\": \"DE\",\n \"legal_name\": \"Example Merchant\",\n \"website_url\": \"https://example.com\",\n \"identity_and_verification_enabled\": false,\n \"3ds_enabled\": true,\n \"default_currency\": \"EUR\",\n \"default_merchant_id\": \"1234567890\",\n \"schemes\": [\n {\n \"name\": \"visa\",\n \"acquirer_bin\": \"40001\",\n \"requestor_id\": \"123456789.visa\",\n \"requestor_name\": \"3dsclient.local.visa\",\n \"category_code\": \"3200\",\n \"merchant_id\": \"\",\n \"merchant_name\": \"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hellgate.io/merchants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_city\": \"Berlin\",\n \"country_code\": \"DE\",\n \"legal_name\": \"Example Merchant\",\n \"website_url\": \"https://example.com\",\n \"identity_and_verification_enabled\": false,\n \"3ds_enabled\": true,\n \"default_currency\": \"EUR\",\n \"default_merchant_id\": \"1234567890\",\n \"schemes\": [\n {\n \"name\": \"visa\",\n \"acquirer_bin\": \"40001\",\n \"requestor_id\": \"123456789.visa\",\n \"requestor_name\": \"3dsclient.local.visa\",\n \"category_code\": \"3200\",\n \"merchant_id\": \"\",\n \"merchant_name\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"created_at": "2023-10-10T00:00:00Z",
"company_city": "Berlin",
"country_code": "DE",
"encryption_key": "eyJhbGciOiJSUzI1NiIsImVudGl0bGVtZW50IjoiYWF4NXdq...",
"legal_name": "Example Merchant",
"website_url": "https://example.com"
}{
"code": 401,
"message": "No valid means of authentication was provided",
"classifier": "UNAUTHORIZED"
}{
"code": 403,
"message": "Not allowed to access this resource or feature",
"classifier": "FORBIDDEN"
}{
"code": 422,
"classifier": "VALIDATION_ERROR",
"message": "Validation error",
"validation_errors": [
{
"path": "json-path",
"message": "human readable error message"
}
]
}Body
application/json
A two letter country code. ISO 3166-1 alpha-2
Example:
"US"
The three letter currency code. See: ISO-4217
Example:
"EUR"
Response
Success response
⌘I
Create a merchant
curl --request POST \
--url https://sandbox.hellgate.io/merchants \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"company_city": "Berlin",
"country_code": "DE",
"legal_name": "Example Merchant",
"website_url": "https://example.com",
"identity_and_verification_enabled": false,
"3ds_enabled": true,
"default_currency": "EUR",
"default_merchant_id": "1234567890",
"schemes": [
{
"name": "visa",
"acquirer_bin": "40001",
"requestor_id": "123456789.visa",
"requestor_name": "3dsclient.local.visa",
"category_code": "3200",
"merchant_id": "",
"merchant_name": ""
}
]
}
'import requests
url = "https://sandbox.hellgate.io/merchants"
payload = {
"company_city": "Berlin",
"country_code": "DE",
"legal_name": "Example Merchant",
"website_url": "https://example.com",
"identity_and_verification_enabled": False,
"3ds_enabled": True,
"default_currency": "EUR",
"default_merchant_id": "1234567890",
"schemes": [
{
"name": "visa",
"acquirer_bin": "40001",
"requestor_id": "123456789.visa",
"requestor_name": "3dsclient.local.visa",
"category_code": "3200",
"merchant_id": "",
"merchant_name": ""
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
company_city: 'Berlin',
country_code: 'DE',
legal_name: 'Example Merchant',
website_url: 'https://example.com',
identity_and_verification_enabled: false,
'3ds_enabled': true,
default_currency: 'EUR',
default_merchant_id: '1234567890',
schemes: [
{
name: 'visa',
acquirer_bin: '40001',
requestor_id: '123456789.visa',
requestor_name: '3dsclient.local.visa',
category_code: '3200',
merchant_id: '',
merchant_name: ''
}
]
})
};
fetch('https://sandbox.hellgate.io/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://sandbox.hellgate.io/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([
'company_city' => 'Berlin',
'country_code' => 'DE',
'legal_name' => 'Example Merchant',
'website_url' => 'https://example.com',
'identity_and_verification_enabled' => false,
'3ds_enabled' => true,
'default_currency' => 'EUR',
'default_merchant_id' => '1234567890',
'schemes' => [
[
'name' => 'visa',
'acquirer_bin' => '40001',
'requestor_id' => '123456789.visa',
'requestor_name' => '3dsclient.local.visa',
'category_code' => '3200',
'merchant_id' => '',
'merchant_name' => ''
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hellgate.io/merchants"
payload := strings.NewReader("{\n \"company_city\": \"Berlin\",\n \"country_code\": \"DE\",\n \"legal_name\": \"Example Merchant\",\n \"website_url\": \"https://example.com\",\n \"identity_and_verification_enabled\": false,\n \"3ds_enabled\": true,\n \"default_currency\": \"EUR\",\n \"default_merchant_id\": \"1234567890\",\n \"schemes\": [\n {\n \"name\": \"visa\",\n \"acquirer_bin\": \"40001\",\n \"requestor_id\": \"123456789.visa\",\n \"requestor_name\": \"3dsclient.local.visa\",\n \"category_code\": \"3200\",\n \"merchant_id\": \"\",\n \"merchant_name\": \"\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://sandbox.hellgate.io/merchants")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"company_city\": \"Berlin\",\n \"country_code\": \"DE\",\n \"legal_name\": \"Example Merchant\",\n \"website_url\": \"https://example.com\",\n \"identity_and_verification_enabled\": false,\n \"3ds_enabled\": true,\n \"default_currency\": \"EUR\",\n \"default_merchant_id\": \"1234567890\",\n \"schemes\": [\n {\n \"name\": \"visa\",\n \"acquirer_bin\": \"40001\",\n \"requestor_id\": \"123456789.visa\",\n \"requestor_name\": \"3dsclient.local.visa\",\n \"category_code\": \"3200\",\n \"merchant_id\": \"\",\n \"merchant_name\": \"\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hellgate.io/merchants")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"company_city\": \"Berlin\",\n \"country_code\": \"DE\",\n \"legal_name\": \"Example Merchant\",\n \"website_url\": \"https://example.com\",\n \"identity_and_verification_enabled\": false,\n \"3ds_enabled\": true,\n \"default_currency\": \"EUR\",\n \"default_merchant_id\": \"1234567890\",\n \"schemes\": [\n {\n \"name\": \"visa\",\n \"acquirer_bin\": \"40001\",\n \"requestor_id\": \"123456789.visa\",\n \"requestor_name\": \"3dsclient.local.visa\",\n \"category_code\": \"3200\",\n \"merchant_id\": \"\",\n \"merchant_name\": \"\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "00000000-0000-0000-0000-000000000000",
"created_at": "2023-10-10T00:00:00Z",
"company_city": "Berlin",
"country_code": "DE",
"encryption_key": "eyJhbGciOiJSUzI1NiIsImVudGl0bGVtZW50IjoiYWF4NXdq...",
"legal_name": "Example Merchant",
"website_url": "https://example.com"
}{
"code": 401,
"message": "No valid means of authentication was provided",
"classifier": "UNAUTHORIZED"
}{
"code": 403,
"message": "Not allowed to access this resource or feature",
"classifier": "FORBIDDEN"
}{
"code": 422,
"classifier": "VALIDATION_ERROR",
"message": "Validation error",
"validation_errors": [
{
"path": "json-path",
"message": "human readable error message"
}
]
}