curl --request POST \
--url https://api.globalstack.io/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"country_code": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<string>"
}
}
'import requests
url = "https://api.globalstack.io/v1/customers"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"country_code": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: 'jsmith@example.com',
country_code: '<string>',
metadata: {},
merchant_reference: '<string>',
profile: {
phone: '<string>',
address: '<string>',
date_of_birth: '<string>',
id_number: '<string>',
id_type: '<string>',
business_licence: '<string>'
}
})
};
fetch('https://api.globalstack.io/v1/customers', 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.globalstack.io/v1/customers",
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([
'name' => '<string>',
'email' => 'jsmith@example.com',
'country_code' => '<string>',
'metadata' => [
],
'merchant_reference' => '<string>',
'profile' => [
'phone' => '<string>',
'address' => '<string>',
'date_of_birth' => '<string>',
'id_number' => '<string>',
'id_type' => '<string>',
'business_licence' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.globalstack.io/v1/customers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"country_code\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.globalstack.io/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"country_code\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"country_code\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Customer created successfully",
"code": "ok",
"data": {
"id": "cust_01HXYZABC1234567890ABCDEFG",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"merchant_reference": "ref_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"country_code": "NG",
"tier": "tier_0",
"kyc_status": "not_started",
"metadata": {
"source": "checkout"
},
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z",
"profile": {
"phone": "+2348012345678",
"address": "1 Marina Rd, Lagos",
"date_of_birth": "01/15/1990",
"id_number": "A12345678",
"id_type": "passport",
"business_licence": "RC123456"
}
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Create a customer
Creates a new customer scoped to the calling merchant’s integration.
Body
-
type— required. One ofindividual,business. -
name— required. Full name of the customer. Max 255 chars. -
email— required. Valid email. Max 255 chars. Per-integration uniqueness is enforced case-insensitively. -
country_code— required. ISO-3166-1 alpha-2 (e.g.NG,KE). Countries on the compliance prohibited list are rejected with400 prohibited_country. -
metadata— optional. Free-formRecord<string, string>. -
merchant_reference— optional. Max 128 chars. Auto-generated asref_<ULID>when omitted. Per-integration unique. -
profile— optional object carrying the identity fields required to convert (onramp/offramp). When supplied it must be complete for the customertype:individualrequiresphone,address,date_of_birth,id_number,id_type.businessrequiresphone,business_licence.
Fields:
phone,address,id_number,id_type,business_licenceare strings;date_of_birthmust bemm/dd/yyyy. A supplied-but-incompleteprofilefor thetypereturns400 invalid_input.
Example
POST /v1/customers
{
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"country_code": "NG",
"profile": {
"phone": "+2348012345678",
"address": "1 Marina Rd, Lagos",
"date_of_birth": "01/15/1990",
"id_number": "A12345678",
"id_type": "passport"
}
}
curl --request POST \
--url https://api.globalstack.io/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"email": "jsmith@example.com",
"country_code": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<string>"
}
}
'import requests
url = "https://api.globalstack.io/v1/customers"
payload = {
"name": "<string>",
"email": "jsmith@example.com",
"country_code": "<string>",
"metadata": {},
"merchant_reference": "<string>",
"profile": {
"phone": "<string>",
"address": "<string>",
"date_of_birth": "<string>",
"id_number": "<string>",
"id_type": "<string>",
"business_licence": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
email: 'jsmith@example.com',
country_code: '<string>',
metadata: {},
merchant_reference: '<string>',
profile: {
phone: '<string>',
address: '<string>',
date_of_birth: '<string>',
id_number: '<string>',
id_type: '<string>',
business_licence: '<string>'
}
})
};
fetch('https://api.globalstack.io/v1/customers', 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.globalstack.io/v1/customers",
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([
'name' => '<string>',
'email' => 'jsmith@example.com',
'country_code' => '<string>',
'metadata' => [
],
'merchant_reference' => '<string>',
'profile' => [
'phone' => '<string>',
'address' => '<string>',
'date_of_birth' => '<string>',
'id_number' => '<string>',
'id_type' => '<string>',
'business_licence' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.globalstack.io/v1/customers"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"country_code\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.globalstack.io/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"country_code\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.globalstack.io/v1/customers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"country_code\": \"<string>\",\n \"metadata\": {},\n \"merchant_reference\": \"<string>\",\n \"profile\": {\n \"phone\": \"<string>\",\n \"address\": \"<string>\",\n \"date_of_birth\": \"<string>\",\n \"id_number\": \"<string>\",\n \"id_type\": \"<string>\",\n \"business_licence\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Customer created successfully",
"code": "ok",
"data": {
"id": "cust_01HXYZABC1234567890ABCDEFG",
"type": "individual",
"name": "Alice Johnson",
"email": "alice@example.com",
"merchant_reference": "ref_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"country_code": "NG",
"tier": "tier_0",
"kyc_status": "not_started",
"metadata": {
"source": "checkout"
},
"created_at": "2026-04-16T16:14:08.000Z",
"updated_at": "2026-04-16T16:14:08.000Z",
"profile": {
"phone": "+2348012345678",
"address": "1 Marina Rd, Lagos",
"date_of_birth": "01/15/1990",
"id_number": "A12345678",
"id_type": "passport",
"business_licence": "RC123456"
}
},
"meta": {
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}{
"status": false,
"message": "Resource not found",
"code": "not_found",
"data": null,
"meta": {
"next_steps": {
"action": "Verify the resource identifier and retry.",
"docs_url": "https://docs.globalstack.io/errors#not_found"
},
"request_id": "req_01HXYZ4K5ABCDEFGHJKLMNPQRS",
"timestamp": "2026-05-14T15:43:55.732Z",
"version": "1"
}
}Authorizations
API key issued during merchant onboarding.
Headers
Optional client-supplied key. Identical key + identical body within 24h replays the original response. Identical key + different body returns 409 idempotency_conflict. The hash is over raw bytes — clients retrying must send the byte-identical body; a re-serialised JSON payload will produce a different hash and a 409. Strongly recommended for retry-safe clients.
^[A-Za-z0-9_\-]{8,255}$Body
CreateCustomerDto
individual, business 1 - 255255^[A-Z]{2}$128Show child attributes
Show child attributes
Response
Customer created successfully