## 在线支付 (`payments`)

发起在线充值:建一张待支付订单并向支付网关预下单,返回付款地址。

鉴权: 用户 · 文档: https://www-demo.kuxitong.com/zh/docs/api/payments

### POST `/api/v2/payments/{provider}/orders`

发起在线支付 · 鉴权: 用户

请求体:

| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `amount_cents` | integer | 有 | 充值金额(分)。 |

```sh
curl -X POST "https://panel.example.com/api/v2/payments/{provider}/orders" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

在线支付对象:

| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
| `amount_cents` | integer | 有 | 充值金额(分)。 |
| `gateway` | string |  | 实际下单的支付网关。 可选值: ["alipay","wxpay","codepay","epay"] |
| `mch_order_no` | string |  | 商户订单号(网关侧的订单号)。 |
| `order_id` | integer |  | 待支付订单 ID。 |
| `pay_url` | string |  | 付款地址:跳转网址,或微信 weixin:// 与支付宝当面付的二维码串。 |
