Create Customer
curl --request POST \
--url https://{brand_domain}/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Alice Smith",
"email": "[email protected]",
"phone": "+8801800000000"
}
'import requests
url = "https://{brand_domain}/api/v1/customers"
payload = {
"name": "Alice Smith",
"email": "[email protected]",
"phone": "+8801800000000"
}
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: 'Alice Smith', email: '[email protected]', phone: '+8801800000000'})
};
fetch('https://{brand_domain}/api/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://{brand_domain}/api/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' => 'Alice Smith',
'email' => '[email protected]',
'phone' => '+8801800000000'
]),
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://{brand_domain}/api/v1/customers"
payload := strings.NewReader("{\n \"name\": \"Alice Smith\",\n \"email\": \"[email protected]\",\n \"phone\": \"+8801800000000\"\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://{brand_domain}/api/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Alice Smith\",\n \"email\": \"[email protected]\",\n \"phone\": \"+8801800000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{brand_domain}/api/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\": \"Alice Smith\",\n \"email\": \"[email protected]\",\n \"phone\": \"+8801800000000\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 58,
"uuid": "83b9c9d2-b2f4-4df1-bc1e-b810d1c810d1"
}
}{
"success": false,
"error": "Payment not found",
"errors": [
{
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}{
"success": false,
"error": "amount must be a positive number",
"errors": [
{
"code": "INVALID_AMOUNT",
"message": "amount must be a positive number",
"field": "amount"
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}{
"success": false,
"error": "Payment not found",
"errors": [
{
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}Create Customer
Creates a new customer profile under the active brand. Checks for email uniqueness under this brand scope, and encrypts PII values at rest for GDPR and OWASP compliance.
POST
/
customers
Create Customer
curl --request POST \
--url https://{brand_domain}/api/v1/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Alice Smith",
"email": "[email protected]",
"phone": "+8801800000000"
}
'import requests
url = "https://{brand_domain}/api/v1/customers"
payload = {
"name": "Alice Smith",
"email": "[email protected]",
"phone": "+8801800000000"
}
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: 'Alice Smith', email: '[email protected]', phone: '+8801800000000'})
};
fetch('https://{brand_domain}/api/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://{brand_domain}/api/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' => 'Alice Smith',
'email' => '[email protected]',
'phone' => '+8801800000000'
]),
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://{brand_domain}/api/v1/customers"
payload := strings.NewReader("{\n \"name\": \"Alice Smith\",\n \"email\": \"[email protected]\",\n \"phone\": \"+8801800000000\"\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://{brand_domain}/api/v1/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Alice Smith\",\n \"email\": \"[email protected]\",\n \"phone\": \"+8801800000000\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{brand_domain}/api/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\": \"Alice Smith\",\n \"email\": \"[email protected]\",\n \"phone\": \"+8801800000000\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": 58,
"uuid": "83b9c9d2-b2f4-4df1-bc1e-b810d1c810d1"
}
}{
"success": false,
"error": "Payment not found",
"errors": [
{
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}{
"success": false,
"error": "amount must be a positive number",
"errors": [
{
"code": "INVALID_AMOUNT",
"message": "amount must be a positive number",
"field": "amount"
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}{
"success": false,
"error": "Payment not found",
"errors": [
{
"code": "PAYMENT_NOT_FOUND",
"message": "Payment not found",
"field": null
}
],
"request_id": "8f5a2e9b0c7d4e5f"
}Authorizations
Provide the Bearer API Key generated for your brand.
Body
application/json
Customer full display name.
Example:
"Alice Smith"
Customer email. Must be unique per brand.
Example:
Customer phone.
Example:
"+8801800000000"
Last modified on July 12, 2026
Related topics
Laravel SDK - Fluent Payment Integration for PHP AppsNode.js SDK - TypeScript-First Payment IntegrationDeveloper Quickstart - Build Your First Payment IntegrationInitiate Payment IntentOwnPay API Overview - REST API for Multi-Brand PaymentsWas this page helpful?
⌘I