{
"deposit_session_id": "<string>",
"customer_id": "<string>",
"status": "active",
"allow_multiple_deposits": true,
"expires_at": 123,
"url": "<string>",
"metadata": {},
"created": 123
}{
"deposit_session_id": "<string>",
"customer_id": "<string>",
"status": "active",
"allow_multiple_deposits": true,
"expires_at": 123,
"url": "<string>",
"metadata": {},
"created": 123
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}创建客户充值支付
根据商户系统的 10 位客户 ID 创建充值支付及托管收银台链接。客户不存在时会在当前商户范围内自动创建。
external_customer_id 必须为 10 位数字,allow_multiple_deposits 必填。创建请求还必须携带 Idempotency-Key。
{
"deposit_session_id": "<string>",
"customer_id": "<string>",
"status": "active",
"allow_multiple_deposits": true,
"expires_at": 123,
"url": "<string>",
"metadata": {},
"created": 123
}{
"deposit_session_id": "<string>",
"customer_id": "<string>",
"status": "active",
"allow_multiple_deposits": true,
"expires_at": 123,
"url": "<string>",
"metadata": {},
"created": 123
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}{
"code": 123,
"message": "<string>",
"errorCode": "<string>",
"data": null
}授权
Bearer API Key,例如 Bearer sk_live_xxx。
Unix 时间戳(秒)。必须与服务端时间相差不超过 5 分钟。
防重放随机字符串,长度 16-64 个字符。
使用商户 API Secret 计算的 HMAC-SHA256 小写 hex 签名。
请求头
Unix 时间戳(秒)。必须与服务端时间相差不超过 5 分钟。
防重放随机字符串,长度 16-64 个字符,建议每次请求使用新的 UUID。
16 - 64使用商户 API Secret 对 {timestamp}.{nonce}.{requestBody} 计算 HMAC-SHA256,结果为小写 hex。GET 请求的 requestBody 为空字符串。
商户范围内的请求幂等键,最长 128 个字符。
1 - 128请求体
商户系统客户 ID,必须为 10 位数字。
^[0-9]{10}$是否允许同一个充值链接多次充值。
客户姓名。客户首次创建时保存;已存在客户的资料不会被覆盖。
255客户邮箱。客户首次创建时保存;已存在客户的资料不会被覆盖。
255客户手机号。客户首次创建时保存;已存在客户的资料不会被覆盖。
50过期时间,Unix 秒;必须晚于当前时间。省略表示永久有效,响应中返回 null。
充值支付描述。
500支付成功后的跳转地址,必须是绝对 HTTPS URL。
1024用户取消支付后的跳转地址,必须是绝对 HTTPS URL。
1024商户自定义元数据,最多 50 项;键长 1-64 个字符,值最长 500 个字符。
Show child attributes
Show child attributes
响应
幂等重放,返回已创建的同一个充值支付。
充值支付 ID。
StablePay 客户 ID。
充值支付状态。
active, closed, expired 是否允许使用同一个链接多次充值。
过期时间,Unix 秒;永久有效时固定返回 null。
托管收银台 URL。
商户自定义元数据。
Show child attributes
Show child attributes
创建时间,Unix 秒。
此页面对您有帮助吗?
