Skip to navigation

Patch Customer

View as Markdown

Partially update a customer.

Exists because PUT /customers/{id} is a whole-object replace: an omitted field there means “clear it”, which is the wrong default for a note a merchant wrote. Here an omitted field means “leave it alone”, so a caller can set or clear the note without restating the rest of the customer.

Currently carries the inline note only.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

customer_idstringRequired
account_idstringRequired

Request

This endpoint expects an object.
notestring or nullOptional

Free-text note for this customer. Omit to leave any existing note untouched; send null or an empty string to delete it.

Response

Successful Response
idstring
namestring or null
first_namestring or null
last_namestring or null
emailstring or null
phonestring or null
billing_emailstring or null
business_namestring or null
addressobject or null
shipping_addressobject or null
tax_idslist of strings or null
currencyenum or null
ISO 4217 currency codes.
languagestring or null
invoice_settingsmap from strings to any or null
total_spentobject or null

Cash captured from this customer, minus refunds and chargebacks. Null when no cash was captured — including invoices settled outside the platform and customers who were fully refunded.

metadatamap from strings to any or null
created_atdatetime
updated_atdatetime
credit_balanceobject or nullOptional

Primary credit balance (largest currency). Deprecated: use credit_balances.

credit_balanceslist of objects or nullOptional
Credit balances per currency
processor_overridesmap from strings to any or nullOptional

Per-processor overrides keyed by processor id, e.g. {“proc_…”: {“email”: “institutional@edu”}}. Currently Stripe + email only. When set, the override email is used for that processor instead of the primary email; the primary email is never mutated and non-Stripe processors are unaffected.

custom_fieldsmap from strings to any or nullOptional

Custom field values. Only included when expand=custom_fields is specified.

notestring or nullOptional

Free-text note attached to this customer, from the notes side-table. Merchant-private — never returned on customer-facing surfaces.

ip_addresseslist of strings or nullOptional

Distinct IP addresses collected across this customer’s checkout attempts, most-recently-seen first, capped at the 20 most recent. Opt-in: populated only on GET /customers/{id} when the request asks for it with expand=ip_addresses; null otherwise, and never present on list responses.

Errors

422
Unprocessable Entity Error