customer
维护客户信息
post
https://{paymentApiUrl}
/V2022-03/customers
创建客户接口

创建客户接口请求报文示例

createCustomer.sh
curl --request POST \
--url https://{paymentApiUrl}/V2022-03/customers \
--header 'Content-Type: application/json' \
--header 'request-id: 58675' \
--header 'request-time: 1651888520935' \
--header 'gateway-no: 12345001' \
--header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \
--data'{
"description": "It's VIP 40210 customer",
"email": "[email protected]",
"firstName": "Smfrvi",
"lastName": "Txwtbs",
"phone": "13924343678"
}'
get
https://{paymentApiUrl}
/V2022-03/customers/{customerId}
获取客户接口

获取客户接口请求报文示例

getCustomer.sh
curl --request GET \
--url https://{paymentApiUrl}/V2022-03/customers/cus_1526753334131306496 \
--header 'Content-Type: application/json' \
--header 'request-id: 58675' \
--header 'request-time: 1651888520935' \
--header 'gateway-no: 12345001' \
--header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

结果对象描述(创建客户接口、获取客户接口)

property name
type
description
code
String
返回码
message
String
返回信息
data
Object
数据对象
customerId
String
客户ID
email
String
邮箱
firstName
String
lastName
String
phone
String
电话
description
String
描述
created
String
创建客户时间
get
https://{paymentApiUrl}
/V2022-03/customers
获取所有客户接口

批量获取客户接口请求报文示例

getCustomerList.sh
curl --request GET \
--url https://{paymentApiUrl}/V2022-03/customers?pageIndex=1&pageSize=100 \
--header 'Content-Type: application/json' \
--header 'request-id: 58675' \
--header 'request-time: 1651888520935' \
--header 'gateway-no: 12345001' \
--header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

结果对象属性描述(获取所有客户接口)

property name
type
description
code
String
返回码
message
String
返回信息
data
Object
数据对象
page
Object
分页对象
pageIndex
Integer
当前页
pageSize
Integer
每页数据条数
total
Integer
总条数
list
Array
列表
customerId
String
客户ID
email
String
邮箱
firstName
String
lastName
String
phone
String
电话
description
String
描述
created
String
创建客户时间
delete
https://{paymentApiUrl}
/V2022-03/customers/{customerId}
删除客户接口

删除客户接口请求报文示例

curl --request DELETE \
--url https://{paymentApiUrl}/V2022-03/customers/cus_1526753334131306496 \
--header 'Content-Type: application/json' \
--header 'request-id: 58675' \
--header 'request-time: 1651888520935' \
--header 'gateway-no: 12345001' \
--header 'sign-info: 787966BF2479A1BE8E1886CD18E6919447FAF4F357E7056188D4F035661B822B' \

结果对象描述(删除客户接口)

property name
type
description
code
String
返回码,"00000"表示删除成功
message
String
返回信息
data
Object
返回null