1. 客户
Merchant API Documentation
  • 引言
  • 签名&加密算法
  • 信用测试卡
  • 开启正式模式
  • 本地付测试
  • 客户
    • 创建客户
      POST
    • 更新客户
      PUT
    • 查询客户
      GET
    • 查询客户列表
      GET
    • 查询客户列表【完整地址】
      GET
    • 删除客户
      DELETE
  • 收款(代收)
    • 创建收款订单(收银台)
      POST
    • 创建收款订单(本地支付直连)
      POST
    • 查询收款订单
      GET
  • 退款
    • 发起退款
      POST
    • 查询退款订单
      GET
  • 代付
    • 创建代付订单
      POST
    • 查询代付订单
      GET
    • 取消代付订单
      POST
  • 账户
    • 查询账户余额
      GET
  • 异步通知
    • 交易结果通知(V2,加密)
    • 收款结果通知(V1)
    • 代付结果通知(V1)
  • 订阅
    • 创建订阅(待发布)
    • 检索订阅(待发布)
    • 取消订阅(待发布)
  • 重复性支付
    • 首次重复性支付(直连)(待发布)
    • 首次重复性支付【收银台】(待发布)
    • 首次重复性支付【SDK】(待发布)
    • 后续重复性支付(待发布)
  • 数据模型
    • 代收模型
      • 信用卡信息
        • CARD
      • 代收请求体
      • 设备信息
      • 代收响应体
      • option配置项
      • option配置项
    • 资金模型
      • 资金响应体
    • 客户模型
      • 客户请求体
      • 客户响应体
      • 收货地址 shipping
      • 产品/服务信息 product
    • 退款模型
      • 退款请求体
      • 退款响应体
    • 代付模型
      • 代付请求体
      • 代付响应体
      • 代付取消请求体
    • 订阅模型
      • 订阅请求体
      • 订阅响应体
      • 订阅计划请求体
      • 订阅计划响应体
      • 其他订阅请求体
    • 响应体基本模型
    • 请求头
  1. 客户

更新客户

PUT
/pay-api/mer/customers/{customerId}

请求参数

Authorization
JWT Bearer
在 Header 添加参数
Authorization
示例:
Authorization: ********************
or
Path 参数

Body 参数application/json

示例
{
  "firstname": "{{test_firstname}}",
  "lastname": "{{test_lastname}} ",
  "email": "cg{{test_email}}",
  "phone": "{{test_phone}}",
  "identityType": "CPF",
  "identityNo": "{{test_country}}",
  "country": "{{test_country}}",
  "state": "{{test_state}}",
  "city": "{{test_city}}",
  "address": "{{test_address}} 修改地址",
  "zipcode": "{{test_zip}}"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --globoff --request PUT '/pay-api/mer/customers/{{customerId}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "firstname": "{{test_firstname}}",
  "lastname": "{{test_lastname}} ",
  "email": "cg{{test_email}}",
  "phone": "{{test_phone}}",
  "identityType": "CPF",
  "identityNo": "{{test_country}}",
  "country": "{{test_country}}",
  "state": "{{test_state}}",
  "city": "{{test_city}}",
  "address": "{{test_address}} 修改地址",
  "zipcode": "{{test_zip}}"
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "data": {
        "customerId": "cus_HZ7Ue85pKPJh4L1",
        "firstname": "ABC",
        "lastname": "Gabriel",
        "email": "thiago@example.com",
        "phone": "",
        "identityType": "CPF",
        "identityNo": "123.456.789-09",
        "country": "BR",
        "state": "SP",
        "city": "sao paulo",
        "address": "Rua 9 de setembro",
        "zipcode": "04849333",
        "createTime": 1748939992000
    },
    "msg": "",
    "livemode": true
}
🔴500失败
修改于 2026-07-07 08:42:00
上一页
创建客户
下一页
查询客户
Built with