Customers

Update Customer

Update an existing customer's information. All fields are optional—only provided fields will be updated. Email uniqueness is enforced unless dangerouslyAllowSameEmailForDifferentCustomers is true. Cannot update merchantId or id.

POST
/customers/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

Use your secret API key as the bearer token

In: header

Path Parameters

id*string

Lumen customer ID (must start with cus_)

Match^cus_[a-z0-9]+$

Request Body

application/json

name?string

Customer name

email?string

Customer email

Formatemail
phoneNumber?string

Customer phone number

externalCustomerId?string

Your application's user ID

pspCustomerId?string

Payment provider customer ID

billingAddressLine1?string

Billing address line 1

billingAddressLine2?string

Billing address line 2

billingCity?string

Billing city

billingStateProvince?string

Billing state or province

billingPostalCode?string

Billing postal/ZIP code

billingCountry?string

Billing country (ISO 3166-1 alpha-2 code)

businessName?string

Business name

taxId?string

Tax ID / VAT number

taxExempt?boolean

Tax exemption status

taxExemptionReason?string

Tax exemption reason

taxExemptionCertificate?string

Tax exemption certificate URL

taxRateDefinitionId?string

Manual tax rate definition ID

taxCalculationMethod?string

Tax calculation method

Value in"auto" | "manual"
invoicePrefix?string

Custom invoice prefix

Lengthlength <= 20
preferredLanguage?string

Language code

timezone?string

Timezone identifier

preferredCurrency?string

Currency code

metadata?

Custom metadata

dangerouslyAllowSameEmailForDifferentCustomers?boolean

Bypass email uniqueness check

Defaultfalse

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.getlumen.dev/v1/customers/cus_01hrwzqrz4ytkwv07syv8k7g3z" \  -H "Content-Type: application/json" \  -d '{    "name": "Jane Smith",    "email": "jane.smith@example.com",    "phoneNumber": "+19876543210"  }'
{
  "customer": {
    "id": "cus_01hrwzqrz4ytkwv07syv8k7g3z",
    "merchantId": "mrc_01hptv3p6xj173pfv96pxd5pke",
    "name": "Jane Smith",
    "email": "jane.smith@example.com",
    "phoneNumber": "+19876543210",
    "externalCustomerId": "user_ext_abc123",
    "pspCustomerId": "cus_stripe_abc123",
    "billingAddressLine1": "456 Oak Avenue",
    "billingAddressLine2": "Suite 200",
    "billingCity": "Austin",
    "billingStateProvince": "TX",
    "billingPostalCode": "78701",
    "billingCountry": "US",
    "preferredCurrency": "USD",
    "timezone": "America/Chicago",
    "createdAt": "2024-12-01T10:00:00.000Z",
    "updatedAt": "2025-02-20T16:30:45.128Z",
    "deletedAt": null
  }
}
{
  "error": "Customer not found or access denied"
}
{
  "error": "Another customer with this email already exists. Use dangerouslyAllowSameEmailForDifferentCustomers to allow."
}
{
  "error": "Failed to update customer",
  "details": "Database connection error"
}