Update Customer
Introduction
Update a customer
Interface
PUT /v1/customers/:customer_id
Request Params
Field | Name | Type | Range | Example | Default | Optional | Remark | Rule |
---|---|---|---|---|---|---|---|---|
reference | Reference | string | [1, 64] | 2022123 | optional | Refer to merchant side's customer ID, see Unique Reference Mode | ||
first_name | First Name | string | [1,64] | David | optional | First name(and middle name if exists) of customer | ||
last_name | Last Name | string | [1,64] | Smith | optional | Last name of customer | ||
company | Company | string | [1,64] | company name | optional | Customer's company | ||
description | Description | string | company description | optional | yyyy-mm-dd | |||
birth_date | Birth Date | string | optional | Customer's birth date | ||||
string | optional | Email of customer | E.164 | |||||
phone | Phone | string | optional | Phone of customer | ||||
country | Country | string | optional | Customer's country | ISO 3166 alpha-2 |
Response Params
Response Example
200 success:
{
"id": "cst_un9WL8ervLWDqTGW",
"object": "customer",
"account": "acct_yz50aD",
"time_created": "2022-07-15T14:00:46+08:00",
"livemode": true,
"reference": "2022000000000",
"first_name": "David",
"last_name": "Smith",
"company": "comany name",
"country": null,
"description": "company description",
"birth_date": "2020-01-01",
"email": "test@company.com",
"phone": "+8613000000000",
"address": {
"country": "US",
"state": "Washington DC",
"city": "Washington",
"line1": "detail address 1",
"line2": "detail address 2",
"postal_code": "200000",
"time_created": "2022-07-15T14:00:46+08:00"
},
"deleted": false
}
400 error:
{
"error": {
"type": "invalid_request_error",
"message": "reference duplicated: 2022050500002",
"code": "request_param_error"
}
}