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

Path Parameters

reference
string
required

Customer reference identifier

Example:

"cus_3c4d5e6f7g8h"

Body

application/json

Fields to update (all optional)

email
string<email>
externalRef
string
metadata
any
name
string
telephone
string

Response

Customer updated successfully

email
string
required

Customer email address

Example:

"customer@example.com"

name
string
required

Customer full name

Example:

"John Doe"

reference
string
required

Customer reference identifier

Example:

"cus_3c4d5e6f7g8h"

externalRef
string

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

Example:

"auth_user_12345"

purchases
object[]

Active purchases