Skip to main content

Channels and Currencies

API Description

Before integrating payment, you first need to obtain the supported payment channels and the currencies supported by the channels.

Request Header Parameters

ParameterTypeRequiredDescription
app-idstringYesMerchant Application ID
Content-TypestringYesapplication/json

Channels API

Interface Information

  • Interface URL: GET /v2/payChannel
  • Content-Type: application/json
  • Authentication: Need to pass app-id and signature verification in Header

Request Parameters

This interface does not require request parameters.

Response Parameters

Success Response

{
"code": 0,
"data": [
{
"channelShowName": "xpay",
"iconName": "",
"name": "xpay",
"state": true
},
{
"channelShowName": "abaPayWay",
"iconName": "",
"name": "payway",
"state": true
}
],
"msg": "success"
}

Response Field Description

FieldTypeDescription
codeintegerResponse code, 0 indicates success
dataarrayPayment channel list
msgstringResponse message

Channel Object Fields

FieldTypeDescription
channelShowNamestringChannel display name
iconNamestringChannel icon path
namestringChannel internal name
statebooleanChannel status, true means enabled

Request Examples

cURL Example

curl -X GET "/v2/payChannel" \
-H "Content-Type: application/json" \
-H "app-id: your-app-id"

Currencies API

Interface Information

  • Interface URL: GET /v2/currency?channel=payway
  • Content-Type: application/json
  • Authentication: Need to pass app-id and signature verification in Header

Request Parameters

This interface does not require request parameters.

Response Parameters

query param channel=xxxx

Success Response

{
"code": 0,
"data": [
{
"chain": "",
"token": "USD",
"contract": "",
"protocol": "",
"logo": "",
"decimal": 0,
"currencyId": "USD"
}
],
"msg": "success"
}

Response Field Description

FieldTypeDescription
codeintegerResponse code, 0 indicates success
dataarrayCurrency list
msgstringResponse message

Currency Object Fields

FieldTypeDescription
chainstringChain name
tokenstringToken name
contractstringContract address
protocolstringProtocol name
logostringLogo path
decimalintegerDecimal places
currencyIdstringCurrency ID

Request Examples

cURL Example

curl -X GET "/v2/currency?channel=payway" \
-H "Content-Type: application/json" \
-H "app-id: your-app-id"