Customers

Get customer by reference, externalRef, or email

Retrieves a customer's details using their unique reference ID, externalRef, or email. Use query parameter 'reference' to look up by customer reference, 'externalRef' for external auth ID, or 'email' for customer email. Exactly one parameter must be provided. Returns the customer's name, email, and active purchases. Only customers owned by the authenticated provider can be accessed.

get/v1/sdk/customers

Query parameters

referencestring
Example:cus_3c4d5e6f7g8h

Customer reference identifier (use exactly one query parameter)

externalRefstring
Example:auth_user_12345

External reference ID from your auth system (use exactly one query parameter)

emailstring
Example:customer@example.com

Customer email address (use exactly one query parameter)

Response

Customer retrieved 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 7 of the 27 revisions of this API.517

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

      response-body-type-changed

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

      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

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

      response-body-type-changed

    • added the optional property purchases/items/planRef to the response with the 200 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 200 status

      response-optional-property-removed

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

      response-optional-property-added

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

      response-optional-property-added

    • added the optional property purchases/items/originalAmount to the response with the 200 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 200 status

      response-required-property-removed

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

      response-optional-property-added

    • added the required property purchases/items/productName to the response with the 200 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