商户
获取 Woovi 活体检测 URL
获取或重新生成 Woovi 活体检测 URL,个人商户需完成该检测才能激活 BRL Pix - Woovi 账户。
POST
/
v2
/
merchant
/
woovi
/
liveness
获取 Woovi 活体检测 URL
curl --request POST \
--url https://api-test.velafi.com/v2/merchant/woovi/liveness \
--header 'Content-Type: application/json' \
--header 'X-BH-TOKEN: <api-key>' \
--data '
{
"merchantId": 123,
"generateNewLiveness": true
}
'import requests
url = "https://api-test.velafi.com/v2/merchant/woovi/liveness"
payload = {
"merchantId": 123,
"generateNewLiveness": True
}
headers = {
"X-BH-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BH-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchantId: 123, generateNewLiveness: true})
};
fetch('https://api-test.velafi.com/v2/merchant/woovi/liveness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api-test.velafi.com/v2/merchant/woovi/liveness")
.header("X-BH-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": 123,\n \"generateNewLiveness\": true\n}")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"livenessId": "<string>",
"livenessUrl": "<string>",
"expiresAt": "<string>",
"status": "<string>",
"failReason": "<string>"
}
}使用此接口为通过 Woovi 服务商激活 BRL Pix 账户的个人商户获取 Woovi 活体检测 URL。在你使用
trench: "Pix - Woovi" 调用激活个人商户之前,商户必须在返回的 URL 上完成活体检测。如果商户尚未完成检测且之前的 URL 已过期,再次调用此接口会返回新的 URL。
所有请求都必须携带
X-BH-TOKEN 请求头和 Content-Type: application/json。此接口仅适用于 KYC 验证已通过(商户状态为 2)且账户可使用 Pix - Woovi 通道的个人商户。请在激活请求之前调用:在完成活体检测之前,激活会以错误码 -5059 失败。接口地址
POST https://api.velafi.com/v2/merchant/woovi/liveness
请求参数
number
必填
需要进行活体检测的商户 ID。
boolean
当前会被忽略:API 不会转发该值,因此始终按
false 处理。如需在之前的 URL 过期后获取新 URL,请再次调用此接口。响应字段
number
HTTP 风格的响应码。
200 表示成功。string
可读的状态信息,例如
SUCCESS。object
示例
cURL
curl -X POST https://api.velafi.com/v2/merchant/woovi/liveness \
-H "X-BH-TOKEN: YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"merchantId": 151209,
"generateNewLiveness": false
}'
Response
{
"code": 200,
"msg": "SUCCESS",
"data": {
"livenessId": "035236af-c51e-4b12-af1a-7cbd26e59c0b",
"livenessUrl": "https://app.sandbox.avenia.io/liveness/3744e440-2880-468c-8204-b992e4213e90?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiresAt": "1788244424",
"status": "PENDING",
"failReason": ""
}
}
livenessUrl 包含一个短期有效的 JWT,并在 expiresAt 所示的时间过期。如果 URL 在商户完成检测之前过期,请再次调用此接口以获取新的 URL。⌘I
获取 Woovi 活体检测 URL
curl --request POST \
--url https://api-test.velafi.com/v2/merchant/woovi/liveness \
--header 'Content-Type: application/json' \
--header 'X-BH-TOKEN: <api-key>' \
--data '
{
"merchantId": 123,
"generateNewLiveness": true
}
'import requests
url = "https://api-test.velafi.com/v2/merchant/woovi/liveness"
payload = {
"merchantId": 123,
"generateNewLiveness": True
}
headers = {
"X-BH-TOKEN": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BH-TOKEN': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({merchantId: 123, generateNewLiveness: true})
};
fetch('https://api-test.velafi.com/v2/merchant/woovi/liveness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.post("https://api-test.velafi.com/v2/merchant/woovi/liveness")
.header("X-BH-TOKEN", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"merchantId\": 123,\n \"generateNewLiveness\": true\n}")
.asString();{
"code": 123,
"msg": "<string>",
"data": {
"livenessId": "<string>",
"livenessUrl": "<string>",
"expiresAt": "<string>",
"status": "<string>",
"failReason": "<string>"
}
}
