v20

latestOpenAPI 3.0.0raw.githubusercontent.com2026-07-214885191.3 KB
Customers

Create a new customer

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.

post/v1/sdk/customers

Request body

descriptionstring
emailstring email required
externalRefstring
metadataobject required
namestring

Response

Customer created successfully

emailstring required

Customer email address

externalRefstring

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

namestring required

Customer full name

referencestring required

Customer reference identifier

Example response

{
  "email": "customer@example.com",
  "externalRef": "auth_user_12345",
  "name": "John Doe",
  "purchases": [
    {
      "amount": 9900,
      "cancellationReason": "Customer request",
      "cancelledAt": "2025-10-28T10:00:00Z",
      "currency": "GBP",
      "endDate": "2025-11-27T10:00:00Z",
      "exchangeRate": 1.32,
      "originalAmount": 7500,
      "planRef": "pln_abc123",
      "productName": "API Gateway Manager",
      "productRef": "prd_abc123",
      "reference": "pur_1A2B3C4D",
      "startDate": "2025-10-27T10:00:00Z",
      "status": "active"
    }
  ],
  "reference": "cus_3c4d5e6f7g8h"
}