Version 2.4.8 · latest

Payment channels payment-channels

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

Pick an endpoint to see its example call on the right.

BillingAuthentication: Admin only3 endpoints

Authentication

Send the X-API-Key header (create a key on the API Keys page; the key is shown only once at creation). An Authorization: Bearer token obtained by logging in also works.

X-API-Key

Authentication failures return 401; forbidden returns 403 (code such as insufficient_scope).

Conventions

Paging uses page (from 1) and page_size; sort with sort=field or sort=-field.

Times are RFC 3339 (UTC); amounts are in cents.

Writes return 200/201/204 on success; duplicates of a unique key return 409.

PUT/api/v2/payment-channelsUpdate payment channels

Authentication: Admin only

Request body application/json

FieldTypeDescription
alipayAlipayGateway Merchant parameters of the Alipay gateway.
codepayCodepayGateway Merchant parameters of the Codepay gateway.
default_methodstring The method selected by default on the recharge page; transfer = bank transfer (transfer must be enabled).
Values ["","alipay","wxpay","usdt","transfer"]
epayEpayGateway Merchant parameters of the Epay gateway.
methodsPaymentMethodSet Enable switch and gateway for each online payment method.
notify_basestring 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_urlstring Page to return to after payment (used by Alipay desktop website payment and Epay); empty = no redirect.
transferPaymentTransfer Offline transfer settings.
usdtUsdtConf USDT (TRC20) receiving parameters.
wxpayWxpayGateway Merchant parameters of the WeChat Pay gateway.
POST/api/v2/payment-channels/usdt-rateFetch USDT rate now

Authentication: Admin only

Request body application/json

FieldTypeDescription
currencyRequiredstring Currency code.
markup_pctstring Markup percentage (-50 to 100, decimals allowed); empty = 0.
sourceRequiredstring Market source: okx/binance (C2C) for CNY, coinbase/kraken for USD, usd (converted via USD) for other currencies.
Values ["okx","binance","coinbase","kraken","usd"]

Payment channels object

FieldTypeDescription
alipayAlipayGateway Merchant parameters of the Alipay gateway.
codepayCodepayGateway Merchant parameters of the Codepay gateway.
currencyRequiredstring Currency code.
default_methodstring The method selected by default on the recharge page; transfer = bank transfer (transfer must be enabled).
Values ["","alipay","wxpay","usdt","transfer"]
epayEpayGateway Merchant parameters of the Epay gateway.
marketstring Fetched market price: 1 USDT = market units of the currency.
markup_pctstring Markup percentage (-50 to 100, decimals allowed); empty = 0.
methodsPaymentMethodSet Enable switch and gateway for each online payment method.
notify_basestring 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.
ratestring Rate after applying the markup.
return_urlstring Page to return to after payment (used by Alipay desktop website payment and Epay); empty = no redirect.
sourceRequiredstring Market source: okx/binance (C2C) for CNY, coinbase/kraken for USD, usd (converted via USD) for other currencies.
Values ["okx","binance","coinbase","kraken","usd"]
transferPaymentTransfer Offline transfer settings.
updated_atstring Fetch time (server clock); if this draft is adopted when the settings are saved, it becomes the row's update time.
usdtUsdtConf USDT (TRC20) receiving parameters.
wxpayWxpayGateway Merchant parameters of the WeChat Pay gateway.

Responses and errors

Success returns the resource JSON directly (HTTP 2xx); failures return application/problem+json (code, detail, plus errors on validation failures); lists carry items + total.

Success
{
  "id": 1,
  "name": "example"
}
List
{
  "items": [
    {
      "id": 1
    }
  ],
  "page": 1,
  "page_size": 20,
  "total": 1
}
Error
{
  "code": "validation_failed",
  "detail": "Invalid request parameters",
  "errors": [
    {
      "code": "required",
      "field": "/name",
      "message": "name is required"
    }
  ],
  "request_id": "0123456789abcdef",
  "status": 422,
  "title": "Unprocessable Entity",
  "type": "about:blank"
}
Get started

Try the live demo

Open the live demo, or contact us for a quote and the install command