chinPay 统一支付网关

网关现在只做订单托管和转发,不再定义支付业务参数。子商户把汇付公共参数传进来,支付页进入实际客户端后再补渠道差异参数。微信内如果开启了网关公众号 OAuth,会先授权拿 openid,再发起预下单。

下单接口:

POST /api/payments

汇付回调:

/api/callbacks/huifu

统一支付下单示例:

{
  "merchant_no": "sub-001",
  "merchant_order_id": "ORD-20260428-001",
  "notify_url": "https://merchant.example.com/pay/callback",
  "return_url": "https://merchant.example.com/pay/result",
  "checkout": {
    "common_params": {
      "huifu_id": "6666000100000000",
      "trans_amt": "0.10",
      "goods_desc": "会员充值",
      "hosting_data": {
        "project_title": "商户支付",
        "project_id": "PROJECT-20260428-001",
        "callback_url": "https://merchant.example.com/pay/result"
      }
    },
    "alipay_params": {
      "trans_type": "A_JSAPI",
      "app_data": {
        "app_schema": "your-app-schema"
      }
    }
  }
}

说明:

1. common_params 存公共字段,商户建单时即可确定
2. 渠道差异字段在页面里按实际客户端再补
3. 页面点支付按钮时,网关才转发到汇付预下单
4. 网关只补 req_date / req_seq_id / pre_order_type / notify_url