订阅代收
订阅下单
接口说明
订阅下单接口
- 创建订阅订单 ↓
- 返回 PIX 二维码 ↓
- 客户扫码授权 ↓
- 订阅回调:
↓
- 立即扣款首期,回调扣款订单回调信息 ↓
- 每月自动创建扣款订单回调 ↓
- 自动扣款 回调
请求URL
{payUrl}/api/order/subscription/submit
请求方式
- POST
- application/json; charset=utf-8
参数
| Parameter | Type | Description | Required | Default Value |
|---|---|---|---|---|
| merchantId | Integer | 商户id | true | |
| merchantOrderId | String | 商户订单id | true | |
| amount | BigDecimal | 金额 | true | |
| sign | String | 签名 | true | |
| notifyUrl | String | 异步通知地址 | false | |
| name | String | 客户名字 | true | 必须真实 |
| mobile | String | 客户电话 | true | 必须真实 |
| String | 邮箱 | true | 必须真实 | |
| sourceAccount | String | cpf | true | cpf |
| frequency | String | 扣费周期 | true | WEEKLY 每周订阅 自动 Pix 扣款将按每周执行一次 MONTHLY 每月订阅 自动 Pix 扣款将按每月执行一次(最常用的订阅频率) SEMIANNUALLY 每半年订阅 自动 Pix 扣款将按每 6 个月执行一次 ANNUALLY 每年订阅 自动 Pix 扣款将按每年执行一次 |
请求CURL
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -i https://xxx/api/order/subscription/submit --data '{
"merchantId":925,
"merchantOrderId":"82",
"amount":330,
"sign":"ntuir0",
"notifyUrl":"https://www.alla-mcdermott.org",
"name":"dionna.haag",
"mobile":"1-703-315-9307",
"email":"ahmed.huel@gmail.com",
"sourceAccount":"31324227036",
"frequency":"WEEKLY"
}'返回示例
{
"data": {
"h5Url":"www.alla-mcdermott.org",
"orderId":"100000",
"payType":1
},
"code": 0,
"error": "success"
}返回参数说明
| Field | Type | Description | Since |
|---|---|---|---|
| data | Object | 响应结构体 | - |
| └─h5Url | String | 收银台H5地址 | - |
| └─orderId | String | 平台订单号 | - |
| └─payType | Integer | 支付模式 | - |
| code | Integer | 响应码 0 成功 | - |
| error | String | 错误消息 | - |