Utopia PaymentsDocs
Customers

Update a customer

Changes a customer's name, email, phone number or metadata. Fields you leave out keep their values, and `metadata` replaces what was stored rather than merging into it. The new email must be free in this merchant and mode (`409 CUSTOMER_EXISTS`). Payments and subscriptions already taken keep the name, email and phone number they were paid with; they are not rewritten.

PATCH
/customers/{id}

Changes a customer's name, email, phone number or metadata. Fields you leave out keep their values, and metadata replaces what was stored rather than merging into it. The new email must be free in this merchant and mode (409 CUSTOMER_EXISTS). Payments and subscriptions already taken keep the name, email and phone number they were paid with; they are not rewritten.

Authorization

secretKey
AuthorizationBearer <token>

Your secret key: sk_live_… or sk_test_….

In: header

Path Parameters

id*string

The customer's id, which starts with cus_.

Match^cus_[0-9a-f]{32}$

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X PATCH "https://example.com/customers/cus_3f2b8c1e9a4d4e7b8c2a1d5e6f7a8b9c" \  -H "Content-Type: application/json" \  -d '{}'
{  "object": "customer",  "customer_id": "cus_3f2b8c1e9a4d4e7b8c2a1d5e6f7a8b9c",  "name": "string",  "email": "user@example.com",  "phone_number": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "created_at": "2019-08-24T14:15:22Z"}