创建代收订单
EndPoint
POST baseUrl
+ /api/payIn
请求参数
参数名 | 必选 | 类型 | 说明 | 示例值 |
---|---|---|---|---|
currency | Y | string(32) | 货币代码(COP ) | COP |
payType | Y | int | 支付产品类型 | 请参考代收paytype枚举 |
amount | Y | decimal(20,2) | 金额10000-5000000 | 10000 |
mchOrderNo | Y | string(32) | 商户订单号(不允许重复) | mchOrderNo1234 |
notifyUrl | Y | string(250) | 回调地址 | https://merchant.com/webhooks |
nonceStr | Y | string(32) | 随机字符串 | 1863484722378907648 |
realName | Y | string(32) | 用户姓名不能有特殊字符、限制最长64个字符 | Jeck |
phone | Y | string(32) | 手机号格式要正确,尽量传真实的手机号 | +57xxxxxxx |
email | Y | string(64) | 邮箱 邮箱格式要正确,尽量传真实的邮箱 | example@gmail.com |
idType | Y | string(32) | 付款人证件类型 | 请参考代收付款人证件类型 |
idCard | Y | string(32) | 付款人证件号 | 我们不校验真实性和合法性,错误的证件号可能导致部分交易失败 |
reusableStatus | N | boolean | 是否允许重复支付 只能false | 不传默认 false (false=不允许 true=允许) |
expireTime | N | long | 过期时间(单位:秒)不传默认24小时,部分通道支持 | 3600 |
remark | N | string(32) | 备注 (请使用英文字符或不带重音的西语) | 不传默认 remark |
userType | N | String(16) | 用户类型 payType=157(PSE)必传 | 请参考用户类型 |
bankId | N | int | 银行IdpayType=157(PSE)必传 | 请参考代收银行列表查询 |
请求示例
bash
curl -L 'baseUrl/api/payIn' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"amount":30000,"idType":"1","mchOrderNo":"order00000001","idCard":"1103412345","remark":"payin","nonceStr":"123456789","realName":"Julian","reusableStatus":false,"payType":154,"expireTime":3600,"phone":"573016612345","notifyUrl":"https://xxxx.com/testCallback","currency":"COP","userType":"1","email":"julianandresgonzalezpineda@gmail.com"}'
1
2
3
4
5
2
3
4
5
响应参数
参数名 | 类型 | 说明 |
---|---|---|
merchantId | long | 商户Id |
mchOrderNo | string(32) | 商户订单号 |
orderNo | string(32) | 平台订单号 |
amount | decimal(20,2) | 金额 |
orderFee | decimal(20,2) | 手续费 |
payCode | string(32) | 付款账户 VA |
payUrl | string(250) | 收银台支付地址 |
响应示例
json
{
"msg": "SUCCESS",
"code": 200,
"data": {
"merchantId": "1002001",
"mchOrderNo": "order00000001",
"orderNo": "PAYIN00000000000000000001",
"payCode": "350-Rivotech-29231858-PAYIN00000000000000000001",
"payUrl": "350-Rivotech-29231858-PAYIN00000000000000000001",
"payDeskUrl": "https://testxxxxx.cashypro.com/index.html?PAYIN00000000000000000001",
"amount": "30000",
"orderFee": "800"
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
json
{
"msg": "Payin_Order_Error",
"code": 500
}
1
2
3
4
2
3
4
查询代收订单
API EndPoint
POST baseUrl
+ /api/payInQuery
请求参数
参数名 | 必选 | 类型 | 示例值 | 字段说明 |
---|---|---|---|---|
mchOrderNo | N | string(32) | 1386556575370063873 | 商户订单号 |
orderNo | N | string(32) | PAYIN8551843837024997376 | 平台订单号 |
nonceStr | Y | string(32) | 9459931608 | 随机字符串 |
TIP
我们建议优先使用orderNo(平台订单号),平台订单号和商户订单号至少需要传递一个。
请求示例
bash
curl -L 'baseUrl/api/payInQuery' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"mchOrderNo":"1386556575370063873","nonceStr":"9459931608","orderNo":"PAYIN8551843837024997376"}'
1
2
3
4
5
2
3
4
5
响应参数
参数名 | 类型 | 字段说明 |
---|---|---|
merchantId | int | 商户Id |
mchOrderNo | string(32) | 商户订单号 |
orderNo | string(32) | 平台订单号 |
channelOrderNo | string(32) | 渠道订单号 |
payType | string(32) | 代收PayType枚举 |
payCode | string(32) | 支付码 |
payUrl | string(250) | 付款二维码 |
amount | decimal(20,0) | 金额 |
fee | decimal(20,4) | 手续费 |
orderStatus | string(32) | 代收订单状态枚举 |
completionTime | date | 完成时间 |
响应示例
json
{
"msg": "SUCCESS",
"code": 200,
"data": {
"merchantId": "1002001",
"mchOrderNo": "1386556575370063873",
"orderNo": "PAYIN8551843837024997376",
"payType": "43",
"payCode": "",
"payUrl": "https://m.dana.id/link/pay?bizNo=202412021112128001101660361270",
"payDeskUrl": "https://idpaydesk2.brcashypro.com/views/pay.html?PAYIN8551843837024997376",
"amount": "20000",
"fee": "1700",
"orderStatus": "PAYING",
"completionTime": null,
"nonceStr": null
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
json
{
"msg": "SUCCESS",
"code": 200,
"data": {
"merchantId": "1002001",
"mchOrderNo": "1386556575370063873",
"orderNo": "PAYIN8551843837024997376",
"payType": "43",
"payCode": "",
"payUrl": "https://m.dana.id/link/pay?bizNo=202412021112128001101660361270",
"payDeskUrl": "https://idpaydesk2.brcashypro.com/views/pay.html?PAYIN8551843837024997376",
"amount": "20000",
"fee": "1700",
"orderStatus": "SUCCESS",
"completionTime": "2024-12-02 15:40:50",
"nonceStr": null
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
代收订单结果通知
通知地址由商户提供
POST Merchant NotifyUrl
异步通知请求参数
参数名 | 类型 | 说明 |
---|---|---|
merchantId | int | 商户Id |
mchOrderNo | string(32) | 商户订单号 |
orderNo | string(32) | 平台订单号 |
channelOrderNo | string(32) | 渠道订单号 |
payType | string(32) | 代收PayType枚举 |
payCode | string(32) | 支付码 |
payUrl | string(250) | 付款二维码 |
amount | decimal(20,0) | 金额 |
fee | decimal(20,4) | 手续费 |
orderStatus | string(32) | 代收订单状态枚举 |
completionTime | date | 完成时间 |
异步通知请求示例
bash
curl -L 'merchant.com/webhooks/payin' \
-H 'MerchantId: 1002001' \
-H 'Sign: A6FC73F7D22EC8B4A064C8FFCC592CBF' \
-H 'Content-Type: application/json' \
-d '{"amount":20000.00,"completionTime":"2024-12-02 12:07:06","fee":2500.0000,"mchOrderNo":"1386503284355244033","merchantId":"1002001","nonceStr":"1733116026894","orderNo":"PAYIN8551790545658687488","orderStatus":"SUCCESS","payCode":"OR.GPNQR..INOPROID_BS","payType":"41","payUrl":"https://payurl.com"}'
1
2
3
4
5
2
3
4
5
json
{
"amount": 20000.0,
"completionTime": "2024-12-02 12:07:06",
"fee": 2500.0,
"mchOrderNo": "1386503284355244033",
"merchantId": "1002001",
"nonceStr": "1733116026894",
"orderNo": "PAYIN8551790545658687488",
"orderStatus": "SUCCESS",
"payCode": "OR.GPNQR..INOPROID_BS",
"payType": "41",
"payUrl": "https://payurl.com"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
json
{
"amount": 20000.0,
"completionTime": "2024-12-02 12:07:06",
"fee": 2500.0,
"mchOrderNo": "1386503284355244033",
"merchantId": "1002001",
"nonceStr": "1733116026894",
"orderNo": "PAYIN8551790545658687488",
"orderStatus": "FAIL",
"payCode": "OR.GPNQR..INOPROID_BS",
"payType": "41",
"payUrl": "https://payurl.com"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
TIP
当回调响应HTTP状态码为200、301或302时,我们认为商户已经成功接收并处理回调, 其它状态我们会认为商户处理回调失败。
回调失败后会在1,2,4,8,16,32,64,128,256,512分钟
重试,一共重试回调10次