收款人
获取支持的支付方式
列出某个国家和法币可用的付款支付方式,以及每种方式的模板字段。
GET
/
v2
/
payments
/
support
/
templates
获取支持的支付方式
curl --request GET \
--url https://api-test.velafi.com/v2/payments/support/templates \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/payments/support/templates"
headers = {"X-BH-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BH-TOKEN': '<api-key>'}};
fetch('https://api-test.velafi.com/v2/payments/support/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api-test.velafi.com/v2/payments/support/templates")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"payments": [
{
"paymentId": 123,
"country": "<string>",
"paymentMethodName": "<string>",
"paymentType": 123,
"fieldList": {}
}
]
}
}使用此接口查询某个国家和法币可用的付款支付方式,以及每种方式所需的模板字段。它返回的字段映射与获取支付方式模板相同,但会在一次调用中返回所有符合条件的支付方式。
所有请求都必须包含
X-BH-TOKEN 请求头,其值为通过 GET /v2/token/generate 获取的业务令牌。接口地址
GET https://api.velafi.com/v2/payments/support/templates
查询参数
string
必填
英文国家名称,例如
Mexico、Brazil 或 United States。string
法币代码,例如
MXN。如果省略,payments 将为空。响应字段
number
200 表示成功。string
成功时为
SUCCESS。object
显示 data 字段
显示 data 字段
array
在指定国家和法币下可用于付款的支付方式。
示例
cURL
curl -G https://api.velafi.com/v2/payments/support/templates \
-H "X-BH-TOKEN: YOUR_TOKEN" \
--data-urlencode "country=Mexico" \
--data-urlencode "fiat=MXN"
⌘I
获取支持的支付方式
curl --request GET \
--url https://api-test.velafi.com/v2/payments/support/templates \
--header 'X-BH-TOKEN: <api-key>'import requests
url = "https://api-test.velafi.com/v2/payments/support/templates"
headers = {"X-BH-TOKEN": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-BH-TOKEN': '<api-key>'}};
fetch('https://api-test.velafi.com/v2/payments/support/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api-test.velafi.com/v2/payments/support/templates")
.header("X-BH-TOKEN", "<api-key>")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"payments": [
{
"paymentId": 123,
"country": "<string>",
"paymentMethodName": "<string>",
"paymentType": 123,
"fieldList": {}
}
]
}
}
