Update a customer
update_customerModify a customer's email, name, phone, or metadata by customer ID; metadata changes are merged, and idempotency keys prevent duplicate actions on retries.
Instructions
Update a customer.
Update a customer’s email, name or phone. metadata is merged into the existing metadata. Changing the email to one another customer uses returns 409 customer_exists. Set a metadata key to "" to delete it; the merged metadata may have at most 50 keys (400 metadata_too_large).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The customer id (`cus_…`). | |
| name | No | ||
| No | |||
| phone | No | ||
| metadata | No | Merged into existing metadata | |
| idempotency_key | No | Optional. A unique key for this request; retrying with the same key returns the original result instead of acting twice. One is generated if omitted. |