Skip to main content
POST
/
v1
/
sdk
/
customers
curl --request POST \
  --url https://api.example.com/v1/sdk/customers \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "customer@example.com",
  "name": "John Doe"
}
'
{
  "reference": "cus_3c4d5e6f7g8h",
  "name": "John Doe",
  "email": "customer@example.com",
  "externalRef": "auth_user_12345",
  "purchases": [
    {
      "reference": "pur_1A2B3C4D",
      "productName": "API Gateway Manager",
      "status": "active",
      "startDate": "2025-10-27T10:00:00Z",
      "amount": 9900,
      "currency": "GBP",
      "productRef": "prd_abc123",
      "originalAmount": 7500,
      "exchangeRate": 1.32,
      "endDate": "2025-11-27T10:00:00Z",
      "cancelledAt": "2025-10-28T10:00:00Z",
      "cancellationReason": "Customer request",
      "planRef": "pln_abc123",
      "planSnapshot": {}
    }
  ]
}

Body

application/json

Customer creation data

email
string<email>
required
metadata
object
required
name
string
telephone
string
externalRef
string

Response

Customer created successfully

reference
string
required

Customer reference identifier

Example:

"cus_3c4d5e6f7g8h"

name
string
required

Customer full name

Example:

"John Doe"

email
string
required

Customer email address

Example:

"customer@example.com"

externalRef
string

External reference ID from your auth system (if set during creation or update)

Example:

"auth_user_12345"

purchases
object[]

Active purchases