PAYMENT
02
收银台下单
此接口用于用户前台直接发起支付,通过 form 表单提交后自动跳转到收银台页面,由用户选择支付方式完成付款。V2
请求参数
| 字段名 | 变量名 | 必填 | 类型 | 示例值 | 描述 |
|---|---|---|---|---|---|
| 商户 ID | pid | 是 | Int | 1001 | 商户 ID |
| 支付方式 | type | 否 | String | alipay | 不传则跳转收银台选择 |
| 商户订单号 | out_trade_no | 是 | String | 20260908001 | 商户系统内唯一 |
| 异步通知地址 | notify_url | 是 | String | https://xxx/notify.php | 服务器异步回调地址 |
| 跳转通知地址 | return_url | 是 | String | https://xxx/return.php | 支付完成跳转地址 |
| 商品名称 | name | 是 | String | VIP 会员 | 超过 127 字节自动截取 |
| 商品金额 | money | 是 | String | 1.00 | 单位:元,最大 2 位小数 |
| 业务扩展参数 | param | 否 | String | 支付后原样返回 | |
| 当前时间戳 | timestamp | 是 | String | 1721206072 | 10 位整数(秒) |
| 签名字符串 | sign | 是 | String | 参考 RSA 签名算法 | |
| 签名类型 | sign_type | 是 | String | RSA | 默认为 RSA |
表单示例
<form action="https://api.alldaypay.cn/api/pay/submit" method="post">
<input type="hidden" name="pid" value="1001">
<input type="hidden" name="out_trade_no" value="20260908001">
<input type="hidden" name="name" value="VIP会员">
<input type="hidden" name="money" value="1.00">
<input type="hidden" name="notify_url" value="https://xxx/notify.php">
<input type="hidden" name="return_url" value="https://xxx/return.php">
<input type="hidden" name="timestamp" value="1792400567">
<input type="hidden" name="sign" value="签名结果">
<input type="hidden" name="sign_type" value="RSA">
<input type="submit" value="立即支付">
</form>