## 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.gocdn888.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","usdt","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. |
| `usdt` | UsdtConf |  | USDT (TRC20) receiving parameters. |
| `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"
```

### POST `/api/v2/payment-channels/usdt-rate`

Fetch USDT rate now · Authentication: Admin only

Request body:

| Field | Type | Required | Description |
|---|---|---|---|
| `currency` | string | Yes | Currency code. |
| `markup_pct` | string |  | Markup percentage (-50 to 100, decimals allowed); empty = 0. |
| `source` | string | Yes | Market source: okx/binance (C2C) for CNY, coinbase/kraken for USD, usd (converted via USD) for other currencies. Values: ["okx","binance","coinbase","kraken","usd"] |

```sh
curl -X POST "https://panel.example.com/api/v2/payment-channels/usdt-rate" \
  -H "X-API-Key: $GOCDN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"currency":"CNY","markup_pct":"1.5","source":"okx"}'
```

Payment channels object:

| Field | Type | Required | Description |
|---|---|---|---|
| `alipay` | AlipayGateway |  | Merchant parameters of the Alipay gateway. |
| `codepay` | CodepayGateway |  | Merchant parameters of the Codepay gateway. |
| `currency` | string | Yes | Currency code. |
| `default_method` | string |  | The method selected by default on the recharge page; transfer = bank transfer (transfer must be enabled). Values: ["","alipay","wxpay","usdt","transfer"] |
| `epay` | EpayGateway |  | Merchant parameters of the Epay gateway. |
| `market` | string |  | Fetched market price: 1 USDT = market units of the currency. |
| `markup_pct` | string |  | Markup percentage (-50 to 100, decimals allowed); empty = 0. |
| `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. |
| `rate` | string |  | Rate after applying the markup. |
| `return_url` | string |  | Page to return to after payment (used by Alipay desktop website payment and Epay); empty = no redirect. |
| `source` | string | Yes | Market source: okx/binance (C2C) for CNY, coinbase/kraken for USD, usd (converted via USD) for other currencies. Values: ["okx","binance","coinbase","kraken","usd"] |
| `transfer` | PaymentTransfer |  | Offline transfer settings. |
| `updated_at` | string |  | Fetch time (server clock); if this draft is adopted when the settings are saved, it becomes the row's update time. |
| `usdt` | UsdtConf |  | USDT (TRC20) receiving parameters. |
| `wxpay` | WxpayGateway |  | Merchant parameters of the WeChat Pay gateway. |
