Skip to navigation

Update Customer

View as Markdown
Update a customer by ID.

Authentication

AuthorizationBearer

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

Path parameters

customer_idstringRequired
account_idstringRequired

Headers

Idempotency-Keystring or nullOptional>=8 characters
A unique key for this request. A retry with the same key returns the first response instead of running again, for 24 hours. Keys are per caller.

Request

This endpoint expects an object.
emailstringRequired
Customer email
first_namestring or nullOptional
Customer first name
last_namestring or nullOptional
Customer last name
phonestring or nullOptional
Customer phone
billing_emailstring or nullOptional
Customer billing email
business_namestring or nullOptional
Customer business name
addressobject or nullOptional

Billing address. An address with every field empty or blank (e.g. {}) is not stored: on create it is ignored, and on update it removes the customer’s billing address.

shipping_addressobject or nullOptional

Shipping address. An address with every field empty or blank (e.g. {}) is not stored: on create it is ignored, and on update it removes the customer’s shipping address.

tax_idslist of strings or nullOptional
Customer tax IDs
currencyenum or nullOptional
Customer currency
languagestring or nullOptional

Customer language as an ISO 639-1 code, e.g. ‘es’

invoice_settingsmap from strings to any or nullOptional
Customer invoice settings
metadatamap from strings to any or nullOptional
Customer metadata
processor_overridesmap from strings to any or nullOptional

Per-processor email overrides keyed by processor id, e.g. {“proc_…”: {“email”: “institutional@edu”}}. Stripe + email only for now; rejected (422) for non-Stripe processors or unknown fields. Set to {} to clear. Omit to leave unchanged.

custom_fieldsmap from strings to any or nullOptional
Custom field values to set on this customer. Keys must match defined field keys for the customer entity type. Set a key to null to delete that field's value.
allow_duplicate_emailbooleanOptionalDefaults to false
When true, skip duplicate email check and create a new customer even if one with the same email exists.
simulation_idstring or nullOptional

Simulation ID - creates customer in simulation context for test clock scenarios

notestring or nullOptional

Optional free-text note to attach to the customer on creation. Merchant-private. Ignored on PUT — use PATCH to edit or clear 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

Deprecated: use total_spent_by_currency. Cash captured from this customer, minus refunds and chargebacks, added across currencies and labelled with one of them. 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
total_spent_by_currencylist of objectsOptional
Cash captured from this customer, minus refunds and chargebacks, one entry per currency with a positive amount, largest first. Amounts in different currencies are never added together. Empty when no cash was captured, including customers who were fully refunded.
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