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": {}
}
]
}Creates a new customer record for the authenticated provider. Customers represent end-users who will purchase your products. Email is required and must be unique per provider. The name field is optional but recommended for better tracking.
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": {}
}
]
}Customer creation data
Customer created successfully
Customer reference identifier
"cus_3c4d5e6f7g8h"
Customer full name
"John Doe"
Customer email address
"customer@example.com"
External reference ID from your auth system (if set during creation or update)
"auth_user_12345"
Active purchases
Show child attributes