A valid request URL is required to generate request examples{
"id": "<string>",
"object": "customer",
"merchant_id": "<string>",
"livemode": true,
"test_clock": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"billing_address": {
"line1": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>"
},
"shipping": {
"name": "<string>",
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>"
}
},
"creation_source": "api",
"payment_settings": {
"default_payment_method": "<string>"
},
"metadata": {},
"deleted": true,
"created_at": 123,
"updated_at": 123
}{
"error": {
"code": "INVALID_REQUEST",
"message": "invalid request body"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "CUSTOMER_NOT_FOUND",
"message": "customer not found"
}
}{
"error": {
"code": "CUSTOMER_EMAIL_ALREADY_EXISTS",
"message": "a customer with this email already exists for this merchant"
}
}{
"error": {
"code": "CUSTOMER_ALREADY_DELETED",
"message": "customer is already deleted"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Update a customer
Updates contact fields, addresses, or metadata. All body fields are
optional; only those present are changed. Pass null explicitly for
billing_address or shipping to remove the address. Updating a
deleted customer returns 422.
A valid request URL is required to generate request examples{
"id": "<string>",
"object": "customer",
"merchant_id": "<string>",
"livemode": true,
"test_clock": "<string>",
"email": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"phone": "<string>",
"billing_address": {
"line1": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>"
},
"shipping": {
"name": "<string>",
"phone": "<string>",
"address": {
"line1": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>",
"line2": "<string>"
}
},
"creation_source": "api",
"payment_settings": {
"default_payment_method": "<string>"
},
"metadata": {},
"deleted": true,
"created_at": 123,
"updated_at": 123
}{
"error": {
"code": "INVALID_REQUEST",
"message": "invalid request body"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "CUSTOMER_NOT_FOUND",
"message": "customer not found"
}
}{
"error": {
"code": "CUSTOMER_EMAIL_ALREADY_EXISTS",
"message": "a customer with this email already exists for this merchant"
}
}{
"error": {
"code": "CUSTOMER_ALREADY_DELETED",
"message": "customer is already deleted"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Merchant ID when an authorized Platform acts for a connected Merchant. Omit when authenticating directly as that Merchant.
^mer_[0-9A-Za-z]{14}$Path Parameters
The customer id (cus_…).
Body
All fields are optional. Only fields present in the body are changed. Pass null for billing_address or shipping to clear the address.
New email address. Must be unique per merchant and mode.
New first name.
New last name.
New phone number.
Updated billing address, or null to clear.
Show child attributes
Show child attributes
Updated shipping details, or null to clear.
Show child attributes
Show child attributes
Replaces the customer's metadata map in full.
Show child attributes
Show child attributes
Response
The updated customer.
Unique customer identifier (cus_…).
customer ID of the account that owns the customer (mer_…).
Whether this customer was created with a live (true) or test (false) key.
The immutable logical billing clock attached at creation; null when this customer uses wall-clock time.
Customer email address.
Empty string when not set.
Empty string when not set.
Empty string when not set.
Billing address; null when not set.
Show child attributes
Show child attributes
Shipping details; null when not set.
Show child attributes
Show child attributes
How the customer was created (for example api).
api, checkout, import, dashboard, platform Payment configuration stored for the customer.
Show child attributes
Show child attributes
Custom key-value pairs for your use.
Show child attributes
Show child attributes
True when the customer has been soft-deleted.
Unix epoch seconds.
Unix epoch seconds when the customer was last updated.

