Create a customer vault case
curl --request POST \
--url https://sandbox.elementpay.net/api/v1/partner/customers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"partner_customer_ref": "cust-ke-001",
"type": "individual",
"profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
}
'import requests
url = "https://sandbox.elementpay.net/api/v1/partner/customers"
payload = {
"partner_customer_ref": "cust-ke-001",
"type": "individual",
"profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
}
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({
partner_customer_ref: 'cust-ke-001',
type: 'individual',
profile: {
first_name: 'Jane',
last_name: 'Doe',
email: 'jane@example.com',
date_of_birth: '1990-01-15',
country_of_residence: 'GB',
phone: '+447700900123',
gender: 'f',
address: {
line_1: '1 Example Street',
city: 'London',
country: 'GB',
postal_code: 'E1 6AN'
}
}
})
};
fetch('https://sandbox.elementpay.net/api/v1/partner/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://sandbox.elementpay.net/api/v1/partner/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([
'partner_customer_ref' => 'cust-ke-001',
'type' => 'individual',
'profile' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'email' => 'jane@example.com',
'date_of_birth' => '1990-01-15',
'country_of_residence' => 'GB',
'phone' => '+447700900123',
'gender' => 'f',
'address' => [
'line_1' => '1 Example Street',
'city' => 'London',
'country' => 'GB',
'postal_code' => 'E1 6AN'
]
]
]),
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.elementpay.net/api/v1/partner/customers"
payload := strings.NewReader("{\n \"partner_customer_ref\": \"cust-ke-001\",\n \"type\": \"individual\",\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\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.elementpay.net/api/v1/partner/customers")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partner_customer_ref\": \"cust-ke-001\",\n \"type\": \"individual\",\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elementpay.net/api/v1/partner/customers")
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 \"partner_customer_ref\": \"cust-ke-001\",\n \"type\": \"individual\",\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "error",
"message": "Validation error",
"data": {
"field": "country"
}
}Customers
Create a customer vault case
Create an incomplete customer case (idempotent on partner_customer_ref).
POST
/
partner
/
customers
Create a customer vault case
curl --request POST \
--url https://sandbox.elementpay.net/api/v1/partner/customers \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"partner_customer_ref": "cust-ke-001",
"type": "individual",
"profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
}
'import requests
url = "https://sandbox.elementpay.net/api/v1/partner/customers"
payload = {
"partner_customer_ref": "cust-ke-001",
"type": "individual",
"profile": {
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
}
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({
partner_customer_ref: 'cust-ke-001',
type: 'individual',
profile: {
first_name: 'Jane',
last_name: 'Doe',
email: 'jane@example.com',
date_of_birth: '1990-01-15',
country_of_residence: 'GB',
phone: '+447700900123',
gender: 'f',
address: {
line_1: '1 Example Street',
city: 'London',
country: 'GB',
postal_code: 'E1 6AN'
}
}
})
};
fetch('https://sandbox.elementpay.net/api/v1/partner/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://sandbox.elementpay.net/api/v1/partner/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([
'partner_customer_ref' => 'cust-ke-001',
'type' => 'individual',
'profile' => [
'first_name' => 'Jane',
'last_name' => 'Doe',
'email' => 'jane@example.com',
'date_of_birth' => '1990-01-15',
'country_of_residence' => 'GB',
'phone' => '+447700900123',
'gender' => 'f',
'address' => [
'line_1' => '1 Example Street',
'city' => 'London',
'country' => 'GB',
'postal_code' => 'E1 6AN'
]
]
]),
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.elementpay.net/api/v1/partner/customers"
payload := strings.NewReader("{\n \"partner_customer_ref\": \"cust-ke-001\",\n \"type\": \"individual\",\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\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.elementpay.net/api/v1/partner/customers")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partner_customer_ref\": \"cust-ke-001\",\n \"type\": \"individual\",\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.elementpay.net/api/v1/partner/customers")
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 \"partner_customer_ref\": \"cust-ke-001\",\n \"type\": \"individual\",\n \"profile\": {\n \"first_name\": \"Jane\",\n \"last_name\": \"Doe\",\n \"email\": \"jane@example.com\",\n \"date_of_birth\": \"1990-01-15\",\n \"country_of_residence\": \"GB\",\n \"phone\": \"+447700900123\",\n \"gender\": \"f\",\n \"address\": {\n \"line_1\": \"1 Example Street\",\n \"city\": \"London\",\n \"country\": \"GB\",\n \"postal_code\": \"E1 6AN\"\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"status": "error",
"message": "Validation error",
"data": {
"field": "country"
}
}Authorizations
Body
application/json
Partner's stable customer reference (unique per tenant).
Required string length:
1 - 128Example:
"cust-ke-001"
individual or business
Example:
"individual"
Identity / KYB fields (see GET /customers/requirements).
Example:
{
"first_name": "Jane",
"last_name": "Doe",
"email": "jane@example.com",
"date_of_birth": "1990-01-15",
"country_of_residence": "GB",
"phone": "+447700900123",
"gender": "f",
"address": {
"line_1": "1 Example Street",
"city": "London",
"country": "GB",
"postal_code": "E1 6AN"
}
}
Response
Successful Response
⌘I