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
Parameter | Type | Required | Description |
---|---|---|---|
app-id | string | Yes | Merchant Application ID |
Content-Type | string | Yes | application/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
Field | Type | Description |
---|---|---|
code | integer | Response code, 0 indicates success |
data | array | Payment channel list |
msg | string | Response message |
Channel Object Fields
Field | Type | Description |
---|---|---|
channelShowName | string | Channel display name |
iconName | string | Channel icon path |
name | string | Channel internal name |
state | boolean | Channel 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
Field | Type | Description |
---|---|---|
code | integer | Response code, 0 indicates success |
data | array | Currency list |
msg | string | Response message |
Currency Object Fields
Field | Type | Description |
---|---|---|
chain | string | Chain name |
token | string | Token name |
contract | string | Contract address |
protocol | string | Protocol name |
logo | string | Logo path |
decimal | integer | Decimal places |
currencyId | string | Currency ID |
Request Examples
cURL Example
curl -X GET "/v2/currency?channel=payway" \
-H "Content-Type: application/json" \
-H "app-id: your-app-id"