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": "john.doe@example.com",
  "type": "INDIVIDUAL",
  "phoneCountryCode": "44",
  "phoneNumber": "7911123456",
  "address": "123 High Street",
  "city": "London",
  "postcode": "SW1A 1AA"
}'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "fullName": "John Doe",
  "email": "john.doe@example.com",
  "type": "INDIVIDUAL",
  "phoneCountryCode": "44",
  "phoneNumber": "7911123456",
  "address": "123 High Street",
  "city": "London",
  "postcode": "SW1A 1AA",
  "createdAt": "2025-06-15T10:30:00.000Z"
}

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.

For high-value card payment, we might collect customer details in the UI for a high success rate.

Authorization

Bearer <accessSecret>

Request Body Schema

fullName
string
required

Customer’s full name. Must be 2-30 characters and not blank.

email
string

Customer’s email address. Must be a valid email format. Either email or phone number is required.

type
string
default: "INDIVIDUAL"

Customer type.

phoneCountryCode
string

Phone country code, digits only. Max 5 characters. Example: 44 for UK.

phoneNumber
string

Phone number without country code, digits only. Max 15 characters.

address
string

Customer’s address. Max 100 characters.

city
string

Customer’s city. Max 30 characters.

postcode
string

Customer’s postcode. 4-8 characters, letters, numbers and spaces only. Example: SW1A 1AA.

vatNumber
string

VAT number for business customers. Must be 9 digits, optionally prefixed with GB. Example: 123456789 or GB123456789.

Response

id
string

Unique identifier for the customer (UUID).

fullName
string

Customer’s full name.

email
string

Customer’s email address.

type
string

Customer type (INDIVIDUAL or BUSINESS).

phoneCountryCode
string

Phone country code.

phoneNumber
string

Phone number.

address
string

Customer’s address.

city
string

Customer’s city.

postcode
string

Customer’s postcode.

vatNumber
string

VAT number (business customers only).

createdAt
string

ISO 8601 creation timestamp.