Edit a customer
Edit a customer's profile. The `reference_number` can not update.
Edit a customer
PUT /svc/payment/api/v1/openapi/customers/:id
Edit a customer's profile. The reference_number can not update.
Request
Path Parameters
id stringrequired
Example:{{uuid}}
- application/json
Body
name stringrequired
The customer's name
Possible values:<= 255 characters
Example: <Your Customer's name>
email string
The customer's email
Possible values:<= 255 characters
Example: abc@def.com
dial_code string
The customer's mobile phone country code
Possible values:<= 6 characters
Example: +852
phone stringrequired
Possible values:<= 255 characters
Example: 12345678
company_name string
The customer's company name
Possible values:<= 255 characters
Example: Universal Group Limited
default_payment_method string
Possible values: [Credit Card, Alipay, Wechat Pay]
Example: Credit Card
default_payment_token string<uuid>
Set a default payment token of this customer
Example: 1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed
Responses
- 200
Response Headers
-
application/json
-
Schema
-
Example (auto)
Schema
code numberrequired
message stringrequired
data objectrequired
customer objectrequired
name string
The customer's name
email string
The customer's email
dial_code stringrequired
The customer mobile phone country code
Example: +852
phone string
The customer's mobile phone
reference_number stringrequired
Your side unique number
default_payment_method string
The customer's default payment method
uuid stringrequired
Wonder side unique id
default_payment_token object
If the customer set a default payment token
token_type stringrequired
The token type
Possible values: [CreditCard, WechatPayAutoDebit, AlipayAutoDebit]
Example: CreditCard
token stringrequired
The token value
state stringrequired
default booleanrequired
If it's default token
error_code string
if bind card failed, will return the specific error code
error_msg string
if bind card failed, will return the specific error message
credit_card object
if token_type is CreditCard
number string
exp_month string
exp_year string
holder_name string
brand string
billing_currency string
{
"code": 0,
"message": "string",
"data": {
"customer": {
"name": "string",
"email": "string",
"dial_code": "+852",
"phone": "string",
"reference_number": "string",
"default_payment_method": "string",
"uuid": "string",
"default_payment_token": {
"token_type": "CreditCard",
"token": "string",
"state": "string",
"default": true,
"error_code": "string",
"error_msg": "string",
"credit_card": {
"number": "string",
"exp_month": "string",
"exp_year": "string",
"holder_name": "string",
"brand": "string",
"billing_currency": "string"
}
}
}
}
}-
csharp
-
curl
-
dart
-
go
-
http
-
java
-
javascript
-
kotlin
-
c
-
nodejs
-
objective-c
-
ocaml
-
php
-
powershell
-
python
-
r
-
ruby
-
rust
-
shell
-
swift
-
HTTPCLIENT
-
RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://developer.wonder.today/svc/payment/api/v1/openapi/customers/:id");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"name\": \"<Your Customer's name>\",\n \"email\": \"abc@def.com\",\n \"dial_code\": \"+852\",\n \"phone\": \"12345678\",\n \"company_name\": \"Universal Group Limited\",\n \"default_payment_method\": \"Credit Card\",\n \"default_payment_token\": \"1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());Request Collapse all
Parameters
id — pathrequired
Body
- Example (from schema)
- Example
{
"name": "<Your Customer's name>",
"email": "abc@def.com",
"dial_code": "+852",
"phone": "12345678",
"company_name": "Universal Group Limited",
"default_payment_method": "Credit Card",
"default_payment_token": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed"
}