--- url: >- https://acquirer-api-docs-v4-en.pingpongx.com/notes/zh/subscription/invoice/customer/create/index.md description: >- 创建买家接口用于根据商户侧买家标识(partnerCustomerId)创建买家信息,并返回 PingPong 买家 ID(customerId),供后续订阅、票据等场景引用。 --- # 创建买家 ```apidef endpoint: POST /v4/customers/create name: 创建买家 summary: 创建买家并返回 PingPong 买家 ID tags: Invoice, Customer ``` 创建买家接口用于根据商户侧买家标识(partnerCustomerId)创建买家信息,并返回 PingPong 买家 ID(customerId),供后续订阅、票据等场景引用。 ## 请求参数 | 参数名 | 类型 | 必填 | 说明 | |--------|------|------|------| | clientId | string | M | 商户号。 | | accId | string | M | 店铺号。 | | signType | string | M | 签名类型,MD5,具体见本文签名规约: /notes/zh/onlinePayment/developer/sign/一栏。 | | sign | string | M | 签名值,沿用 V4 签名规范,所有参数均参与签名。 | | version | string | M | 接口版本,固定为 4.0 。 | | bizContent | string | M | 业务参数 JSON 字符串,除公共请求参数外所有请求参数都必须放在这个参数中传递。 该字段内容为 JSON 字符串,反序列化后的结构见 contentSchema。 | | └─ requestId | string | M | 唯一请求号,全局唯一。 | | └─ partnerCustomerId | string | M | 商户侧买家标识,用户在商户网站的会员 ID,同店铺内唯一。 | | └─ firstName | string | O | 名。 | | └─ lastName | string | O | 姓。 | | └─ companyName | string | O | 公司名。 | | └─ email | string | O | 邮箱。 | | └─ phone | string | O | 电话。 | | └─ address | object | O | 地址对象。 | | └─ └─ country | string | O | 国家二字码,ISO 3166 标准。 | | └─ └─ state | string | O | 州/省。 | | └─ └─ city | string | O | 城市。 | | └─ └─ postalCode | string | O | 邮编。 | | └─ └─ line1 | string | O | 地址行 1。 | | └─ └─ line2 | string | O | 地址行 2。 | | └─ language | string | O | 偏好语言地区。 | | └─ metadata | string | O | 商户自定义串。 | ### 请求示例 ```json { "clientId": "20250101123456", "accId": "ACC001", "signType": "MD5", "sign": "SIGN_VALUE", "version": "4.0", "bizContent": "{\"requestId\":\"req_20260507_0001\",\"partnerCustomerId\":\"USER_001\",\"firstName\":\"James\",\"lastName\":\"LeBron\",\"companyName\":\"Example Inc.\",\"email\":\"james@example.com\",\"phone\":\"13800138000\",\"address\":{\"country\":\"US\",\"state\":\"CA\",\"city\":\"San Jose\",\"postalCode\":\"95113\",\"line1\":\"101 First Street\",\"line2\":\"Suite 200\"},\"language\":\"en\",\"metadata\":\"vip-user\"}" } ``` ## 响应参数 | 参数名 | 类型 | 说明 | |--------|------|------| | clientId | string | 商户号。 | | accId | string | 店铺号。 | | signType | string | 签名类型。 | | sign | string | 签名值,沿用 V4 签名规范验签。 | | code | string | 响应码:成功 000000 ;失败透传业务错误码( 102000 参数错误 / 500003 资源不存在 / 910001 业务校验失败 / 910005 当前状态不支持该操作 / 910008 存在处理中的变更任务 / 500000 系统异常等)。 | | description | string | 响应描述。 | | bizContent | string | 业务响应 JSON 字符串。 该字段内容为 JSON 字符串,反序列化后的结构见 contentSchema。 | | └─ requestId | string | 唯一请求号,回显请求。 | | └─ customerId | string | PingPong 买家 ID。 | | └─ partnerCustomerId | string | 商户侧买家标识,用户在商户网站的会员 ID,同店铺内唯一。 | | └─ firstName | string | 名。 | | └─ lastName | string | 姓。 | | └─ companyName | string | 公司名。 | | └─ email | string | 邮箱。 | | └─ phone | string | 电话。 | | └─ address | object | 地址对象,结构同请求 address。 | | └─ └─ country | string | 国家二字码,ISO 3166 标准。 | | └─ └─ state | string | 州/省。 | | └─ └─ city | string | 城市。 | | └─ └─ postalCode | string | 邮编。 | | └─ └─ line1 | string | 地址行 1。 | | └─ └─ line2 | string | 地址行 2。 | | └─ language | string | 偏好语言地区。 | | └─ metadata | string | 商户自定义串。 | | └─ createdAt | string | 创建时间,10 位秒级时间戳字符串。 | | └─ updatedAt | string | 更新时间,10 位秒级时间戳字符串。 | ### 响应示例 ```json { "clientId": "20250101123456", "accId": "ACC001", "signType": "MD5", "sign": "SIGN_VALUE", "code": "000000", "description": "SUCCESS", "bizContent": "{\"requestId\":\"req_20260507_0001\",\"customerId\":\"CUS-260507100000000001\",\"partnerCustomerId\":\"USER_001\",\"firstName\":\"James\",\"lastName\":\"LeBron\",\"email\":\"james@example.com\",\"language\":\"en\",\"createdAt\":\"2026-05-07T00:00:00Z\",\"updatedAt\":\"2026-05-07T00:00:00Z\"}" } ```