curl --request POST \
--url https://api.atoa.me/api/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}'
import requests
url = "https://api.atoa.me/api/customers"
payload = {
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.atoa.me/api/customers", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
fullName: "John Doe",
email: "[email protected]",
type: "INDIVIDUAL",
phoneCountryCode: "44",
phoneNumber: "7911123456",
address: "123 High Street",
city: "London",
postcode: "SW1A 1AA",
}),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"fullName" => "John Doe",
"email" => "[email protected]",
"type" => "INDIVIDUAL",
"phoneCountryCode" => "44",
"phoneNumber" => "7911123456",
"address" => "123 High Street",
"city" => "London",
"postcode" => "SW1A 1AA"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/customers"
payload := strings.NewReader(`{
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}`)
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, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\"fullName\":\"John Doe\",\"email\":\"[email protected]\",\"type\":\"INDIVIDUAL\",\"phoneCountryCode\":\"44\",\"phoneNumber\":\"7911123456\",\"address\":\"123 High Street\",\"city\":\"London\",\"postcode\":\"SW1A 1AA\"}")
.asString();
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA",
"createdAt": "2025-06-15T10:30:00.000Z"
}
{
"name": "BAD_REQUEST",
"message": "Full name must be at least 2 characters.",
"status": 400,
"errors": []
}
{
"name": "CONFLICT",
"message": "Customer with this email already exists",
"status": 409,
"errors": []
}
Customers
Create Customer | Customers API
Create customer via the Atoa Customers API, request parameters, response schema and code samples in cURL, Python, JavaScript, PHP, Go and Java.
POST
/
api
/
customers
curl --request POST \
--url https://api.atoa.me/api/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}'
import requests
url = "https://api.atoa.me/api/customers"
payload = {
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.atoa.me/api/customers", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
fullName: "John Doe",
email: "[email protected]",
type: "INDIVIDUAL",
phoneCountryCode: "44",
phoneNumber: "7911123456",
address: "123 High Street",
city: "London",
postcode: "SW1A 1AA",
}),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"fullName" => "John Doe",
"email" => "[email protected]",
"type" => "INDIVIDUAL",
"phoneCountryCode" => "44",
"phoneNumber" => "7911123456",
"address" => "123 High Street",
"city" => "London",
"postcode" => "SW1A 1AA"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/customers"
payload := strings.NewReader(`{
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}`)
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, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\"fullName\":\"John Doe\",\"email\":\"[email protected]\",\"type\":\"INDIVIDUAL\",\"phoneCountryCode\":\"44\",\"phoneNumber\":\"7911123456\",\"address\":\"123 High Street\",\"city\":\"London\",\"postcode\":\"SW1A 1AA\"}")
.asString();
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA",
"createdAt": "2025-06-15T10:30:00.000Z"
}
{
"name": "BAD_REQUEST",
"message": "Full name must be at least 2 characters.",
"status": 400,
"errors": []
}
{
"name": "CONFLICT",
"message": "Customer with this email already exists",
"status": 409,
"errors": []
}
Create a customer if you want to save card details and make future payments. Guest checkout or one-off payment doesn’t mandate you to create a customer.
Response
For high-value card payment, we might collect customer details in the UI for a high success rate.
Authorization
Bearer<accessSecret>
Request Body Schema
string
required
Customer’s full name. Must be 2-30 characters and not blank.
string
Customer’s email address. Must be a valid email format. Either email or phone number is required.
string
default:"INDIVIDUAL"
Customer type.
Possible values
Possible values
INDIVIDUAL- Individual customer (default)BUSINESS- Business customer
string
Phone country code, digits only. Max 5 characters. Example:
44 for UK.string
Phone number without country code, digits only. Max 15 characters.
string
Customer’s address. Max 100 characters.
string
Customer’s city. Max 30 characters.
string
Customer’s postcode. 4-8 characters, letters, numbers and spaces only. Example:
SW1A 1AA.string
VAT number for business customers. Must be 9 digits, optionally prefixed with
GB. Example: 123456789 or GB123456789.string
Unique identifier for the customer (UUID).
string
Customer’s full name.
string
Customer’s email address.
string
Customer type (
INDIVIDUAL or BUSINESS).string
Phone country code.
string
Phone number.
string
Customer’s address.
string
Customer’s city.
string
Customer’s postcode.
string
VAT number (business customers only).
string
ISO 8601 creation timestamp.
curl --request POST \
--url https://api.atoa.me/api/customers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}'
import requests
url = "https://api.atoa.me/api/customers"
payload = {
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const response = await fetch("https://api.atoa.me/api/customers", {
method: "POST",
headers: {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
},
body: JSON.stringify({
fullName: "John Doe",
email: "[email protected]",
type: "INDIVIDUAL",
phoneCountryCode: "44",
phoneNumber: "7911123456",
address: "123 High Street",
city: "London",
postcode: "SW1A 1AA",
}),
});
const data = await response.json();
console.log(data);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.atoa.me/api/customers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
"fullName" => "John Doe",
"email" => "[email protected]",
"type" => "INDIVIDUAL",
"phoneCountryCode" => "44",
"phoneNumber" => "7911123456",
"address" => "123 High Street",
"city" => "London",
"postcode" => "SW1A 1AA"
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.atoa.me/api/customers"
payload := strings.NewReader(`{
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA"
}`)
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, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
HttpResponse<String> response = Unirest.post("https://api.atoa.me/api/customers")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\"fullName\":\"John Doe\",\"email\":\"[email protected]\",\"type\":\"INDIVIDUAL\",\"phoneCountryCode\":\"44\",\"phoneNumber\":\"7911123456\",\"address\":\"123 High Street\",\"city\":\"London\",\"postcode\":\"SW1A 1AA\"}")
.asString();
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"fullName": "John Doe",
"email": "[email protected]",
"type": "INDIVIDUAL",
"phoneCountryCode": "44",
"phoneNumber": "7911123456",
"address": "123 High Street",
"city": "London",
"postcode": "SW1A 1AA",
"createdAt": "2025-06-15T10:30:00.000Z"
}
{
"name": "BAD_REQUEST",
"message": "Full name must be at least 2 characters.",
"status": 400,
"errors": []
}
{
"name": "CONFLICT",
"message": "Customer with this email already exists",
"status": 409,
"errors": []
}
⌘I