## Online payments (`payments`)

Start an online recharge: creates an unpaid order, pre-orders it at the payment gateway and returns the payment URL.

Authentication: User · Docs: https://www-demo.kuxitong.com/en/docs/api/payments

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

Create online payment · Authentication: User

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `amount_cents` | integer | Yes | Recharge amount in cents. |

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

Online payments object:

| Field | Type | Required | Description |
|---|---|---|---|
| `amount_cents` | integer | Yes | Recharge amount in cents. |
| `gateway` | string |  | The payment gateway the order was placed with. Values: ["alipay","wxpay","codepay","epay"] |
| `mch_order_no` | string |  | Merchant order number (the gateway-side order number). |
| `order_id` | integer |  | ID of the unpaid order. |
| `pay_url` | string |  | Payment address: a redirect URL, or a QR code string for weixin:// and Alipay face-to-face payment. |
