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
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"
}

Changes

Changed in 9 of the 27 revisions of this API.7311

    • the request property metadata became optional

      request-property-became-optional

    This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • bbc2ff2bc849222See the full diff
    • added the pattern ^[\p{L}\p{N} .,'"&\/()+:\-]*$ to the request property name

      request-property-pattern-added

    • the telephone request property type/format changed from string/ to /

      request-property-type-changed

    • the externalRef request property's maxLength was set to 50

      request-property-max-length-set

    • the name request property's maxLength was set to 100

      request-property-max-length-set

    • added the new optional request property description

      new-optional-request-property

    • added subschema #1 subschema #2 to the telephone request property oneOf list

      request-property-one-of-added

    • the response's body type/format changed from object/ to / for status 400

      response-body-type-changed

    This revision also has 192 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response's body type/format changed from / to object/ for status 400

      response-body-type-changed

    • added the optional property purchases/items/planRef to the response with the 201 status

      response-optional-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • removed the optional property purchases/items/productReference from the response with the 201 status

      response-optional-property-removed

    • added the optional property purchases/items/productRef to the response with the 201 status

      response-optional-property-added

    • added the new required request property metadata

      new-required-request-property

    • the email request property type/format changed from string/ to string/email

      request-property-type-changed

    • added the new optional request property telephone

      new-optional-request-property

    • added the optional property purchases/items/exchangeRate to the response with the 201 status

      response-optional-property-added

    • added the optional property purchases/items/originalAmount to the response with the 201 status

      response-optional-property-added

    This revision also has 44 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 0e1cded2ee5d12See the full diff
    • removed the required property purchases/items/planName from the response with the 201 status

      response-required-property-removed

    • added the optional property purchases/items/planSnapshot to the response with the 201 status

      response-optional-property-added

    • added the required property purchases/items/productName to the response with the 201 status

      response-required-property-added

    This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • endpoint added

      endpoint-added

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog