查询可用通道
GET /api/payment/channels?tenant_id=TENANT_ID&scene=pc_webtenant_id必填- 目标租户 ID。
scene- 推荐传入 pc_web、mobile_web 或 app,未传时保留历史兼容列表。
说明
- 传入 scene 后,创建订单会校验 channel 是否支持相同场景。
- 不要使用旧文档中的固定通道示例。
app_id必填timestamp必填nonce必填sign_type必填sign必填GET /api/payment/channels?tenant_id=TENANT_ID&scene=pc_webtenant_id必填scenePOST /api/payment/open/v1/order/createapp_id必填timestamp必填nonce必填sign_type必填sign必填merchant_order_no必填amount必填channel必填subjectbodynotify_urlreturn_urlscene{
"app_id": "APP_ID",
"merchant_order_no": "ORDER-20260920-001",
"amount": "100.00",
"channel": "alipay_page",
"scene": "pc_web",
"timestamp": 1789862400,
"nonce": "NONCE",
"sign_type": "HMAC-SHA256",
"sign": "SIGN"
}{
"code": 0,
"message": "success",
"data": {
"merchant_order_no": "ORDER-20260920-001",
"platform_order_no": "PAY202609200001",
"amount": "100.00",
"fee_amount": "1.00",
"settlement_amount": "99.00",
"channel": "alipay_page",
"status": 0,
"notify_status": 0,
"paid_time": null,
"settle_time": null,
"payment_status": "unpaid",
"payment_status_code": 0,
"lifecycle_status": "active",
"paid_after_closed": false,
"closed": null,
"pay_url": "https://gateway.example/pay/…",
"pay_params": {}
}
}POST /api/payment/open/v1/order/queryapp_id必填timestamp必填nonce必填sign_type必填sign必填platform_order_nomerchant_order_no{
"app_id": "APP_ID",
"merchant_order_no": "ORDER-20260920-001",
"timestamp": 1789862400,
"nonce": "NONCE",
"sign_type": "HMAC-SHA256",
"sign": "SIGN"
}{
"code": 0,
"message": "success",
"data": {
"merchant_order_no": "ORDER-20260920-001",
"platform_order_no": "PAY202609200001",
"amount": "100.00",
"fee_amount": "1.00",
"settlement_amount": "99.00",
"channel": "alipay_page",
"status": 0,
"notify_status": 0,
"paid_time": null,
"settle_time": null,
"payment_status": "unpaid",
"payment_status_code": 0,
"lifecycle_status": "active",
"paid_after_closed": false,
"closed": null
}
}POST /api/payment/open/v1/order/closeapp_id必填timestamp必填nonce必填sign_type必填sign必填platform_order_nomerchant_order_noclose_sourceclose_source_idclose_reasonclose_message{
"code": 0,
"message": "success",
"data": {
"merchant_order_no": "ORDER-20260920-001",
"platform_order_no": "PAY202609200001",
"amount": "100.00",
"fee_amount": "1.00",
"settlement_amount": "99.00",
"channel": "alipay_page",
"status": 0,
"notify_status": 0,
"paid_time": null,
"settle_time": null,
"payment_status": "unpaid",
"payment_status_code": 0,
"lifecycle_status": "closed",
"paid_after_closed": false,
"closed": {
"closed_at": 1789862400,
"close_source": "merchant",
"close_source_id": null,
"close_reason": "merchant_close",
"close_message": null
}
}
}POST /api/payment/open/v1/refund/createapp_id必填timestamp必填nonce必填sign_type必填sign必填platform_order_nomerchant_order_noamount{
"code": 0,
"message": "success",
"data": {
"merchant_order_no": "ORDER-20260920-001",
"platform_order_no": "PAY202609200001",
"amount": "100.00",
"fee_amount": "1.00",
"settlement_amount": "99.00",
"channel": "alipay_page",
"status": 2,
"notify_status": 0,
"paid_time": null,
"settle_time": null,
"payment_status": "refunded",
"payment_status_code": 2,
"lifecycle_status": "active",
"paid_after_closed": false,
"closed": null
}
}statuspayment_statuspayment_status_codelifecycle_statuspaid_after_closedclosedPOST notify_urlapp_id必填merchant_order_no必填platform_order_no必填amount必填fee_amount必填settlement_amount必填status必填paid_time必填timestamp必填nonce必填sign_type必填sign必填POST webhook_urlevent_type必填merchant_order_no必填platform_order_no必填amount必填payment_status必填lifecycle_status必填paid_time必填paid_after_closed必填closedtimestamp必填nonce必填sign_type必填sign必填POST /api/payment/open/epay/mapipid必填type必填out_trade_no必填notify_url必填name必填money必填clientip必填sign必填sign_typereturn_urldeviceparam{
"pid": "PID",
"type": "alipay",
"out_trade_no": "EPAY-20260920-001",
"notify_url": "https://merchant.example/epay/notify",
"name": "示例订单",
"money": "100.00",
"clientip": "203.0.113.10",
"sign_type": "MD5",
"sign": "LOWERCASE_MD5"
}{
"code": 1,
"msg": "success",
"O_id": "PAY202609200001",
"trade_no": "EPAY-20260920-001",
"payurl": "https://pay.example/checkout/PAY202609200001",
"payurl2": "https://pay.example/checkout/PAY202609200001",
"qrcode": "",
"img": ""
}POST /api/payment/open/epay/submitpid必填type必填out_trade_no必填notify_url必填return_url必填name必填money必填sign必填GET /api/payment/open/epay/api[.php]?act=order|balancepid必填key必填act必填out_trade_notrade_noO_id{
"code": 1,
"msg": "success",
"trade_no": "PAY202609200001",
"out_trade_no": "EPAY-20260920-001",
"status": 1
}POST /api/payment/open/epay/api[.php]?act=refundpid必填key必填act必填out_trade_notrade_nomoney{
"code": 1,
"msg": "退款成功"
}GET notify_urlpid必填name必填money必填out_trade_no必填trade_no必填paramtrade_status必填type必填sign_type必填sign必填