## Payment channels (`payment-channels`)

Admin settings for which gateway each payment method uses and each gateways merchant parameters; secrets are write-only.

Authentication: Admin only · Docs: https://www-demo.kuxitong.com/en/docs/api/payment-channels

### GET `/api/v2/payment-channels`

Get payment channel settings · Authentication: Admin only

```sh
curl "https://panel.example.com/api/v2/payment-channels" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

### PUT `/api/v2/payment-channels`

Update payment channels · Authentication: Admin only

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `alipay` | AlipayGateway |  | Merchant parameters of the Alipay gateway. |
| `codepay` | CodepayGateway |  | Merchant parameters of the Codepay gateway. |
| `default_method` | string |  | The method selected by default on the recharge page; transfer = bank transfer (transfer must be enabled). Values: ["","alipay","wxpay","transfer"] |
| `epay` | EpayGateway |  | Merchant parameters of the Epay gateway. |
| `methods` | PaymentMethodSet |  | Enable switch and gateway for each online payment method. |
| `notify_base` | string |  | Root URL of the panel reachable by the gateways (for example https://panel.example.com); callback URLs are built from it, and empty = orders cannot be placed. |
| `return_url` | string |  | Page to return to after payment (used by Alipay desktop website payment and Epay); empty = no redirect. |
| `transfer` | PaymentTransfer |  | Offline transfer settings. |
| `wxpay` | WxpayGateway |  | Merchant parameters of the WeChat Pay gateway. |

```sh
curl -X PUT "https://panel.example.com/api/v2/payment-channels" \
  -H "X-API-Key: $GOCDN_API_KEY"
```

Payment channels object:

| Field | Type | Required | Description |
|---|---|---|---|
| `alipay` | AlipayGateway |  | Merchant parameters of the Alipay gateway. |
| `codepay` | CodepayGateway |  | Merchant parameters of the Codepay gateway. |
| `default_method` | string |  | The method selected by default on the recharge page; transfer = bank transfer (transfer must be enabled). Values: ["","alipay","wxpay","transfer"] |
| `epay` | EpayGateway |  | Merchant parameters of the Epay gateway. |
| `methods` | PaymentMethodSet |  | Enable switch and gateway for each online payment method. |
| `notify_base` | string |  | Root URL of the panel reachable by the gateways (for example https://panel.example.com); callback URLs are built from it, and empty = orders cannot be placed. |
| `return_url` | string |  | Page to return to after payment (used by Alipay desktop website payment and Epay); empty = no redirect. |
| `transfer` | PaymentTransfer |  | Offline transfer settings. |
| `wxpay` | WxpayGateway |  | Merchant parameters of the WeChat Pay gateway. |
