为客户创建 KYC 链接
curl --request POST \
--url https://api.qbank.cl/platform/v1/kyc/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_customer_id": "cust_123",
"label": "Ana Perez",
"expires_in_days": 14,
"idempotency_key": "kyc-link-cust-123-1"
}
'import requests
url = "https://api.qbank.cl/platform/v1/kyc/links"
payload = {
"external_customer_id": "cust_123",
"label": "Ana Perez",
"expires_in_days": 14,
"idempotency_key": "kyc-link-cust-123-1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_customer_id: 'cust_123',
label: 'Ana Perez',
expires_in_days: 14,
idempotency_key: 'kyc-link-cust-123-1'
})
};
fetch('https://api.qbank.cl/platform/v1/kyc/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/kyc/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_customer_id' => 'cust_123',
'label' => 'Ana Perez',
'expires_in_days' => 14,
'idempotency_key' => 'kyc-link-cust-123-1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/kyc/links"
payload := strings.NewReader("{\n \"external_customer_id\": \"cust_123\",\n \"label\": \"Ana Perez\",\n \"expires_in_days\": 14,\n \"idempotency_key\": \"kyc-link-cust-123-1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.qbank.cl/platform/v1/kyc/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_customer_id\": \"cust_123\",\n \"label\": \"Ana Perez\",\n \"expires_in_days\": 14,\n \"idempotency_key\": \"kyc-link-cust-123-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/kyc/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_customer_id\": \"cust_123\",\n \"label\": \"Ana Perez\",\n \"expires_in_days\": 14,\n \"idempotency_key\": \"kyc-link-cust-123-1\"\n}"
response = http.request(request)
puts response.read_body{
"link_id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"kind": "kyc",
"external_customer_id": "cust_123",
"url": "https://verify.example.com/on/usd/individual/new?invite=def456",
"status": "pending",
"label": "Ana Perez",
"expires_at": 1721209600,
"verification_fee": "1.500000",
"idempotency_key": "kyc-link-cust-123-1",
"created_at": "2026-07-10T12:00:00Z",
"updated_at": "2026-07-10T12:00:00Z"
}{
"error": "idempotency_key_required",
"message": "provide idempotency_key (body or Idempotency-Key header)"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "insufficient_funds",
"message": "account balance is not enough for this operation"
}{
"error": "company_account_required",
"message": "third-party KYC/KYB verification is available to company accounts only"
}为客户创建 KYC 链接
仅限企业账户:为你的终端客户生成托管 KYC 链接。向导涵盖表单、文件与视频活体检测。若配置了固定 kyc_verification 费用则计费(创建失败退款);必须提供 idempotency_key——使用相同键重试会返回原始链接,绝不重复扣费。
POST
/
v1
/
kyc
/
links
为客户创建 KYC 链接
curl --request POST \
--url https://api.qbank.cl/platform/v1/kyc/links \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"external_customer_id": "cust_123",
"label": "Ana Perez",
"expires_in_days": 14,
"idempotency_key": "kyc-link-cust-123-1"
}
'import requests
url = "https://api.qbank.cl/platform/v1/kyc/links"
payload = {
"external_customer_id": "cust_123",
"label": "Ana Perez",
"expires_in_days": 14,
"idempotency_key": "kyc-link-cust-123-1"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_customer_id: 'cust_123',
label: 'Ana Perez',
expires_in_days: 14,
idempotency_key: 'kyc-link-cust-123-1'
})
};
fetch('https://api.qbank.cl/platform/v1/kyc/links', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/kyc/links",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'external_customer_id' => 'cust_123',
'label' => 'Ana Perez',
'expires_in_days' => 14,
'idempotency_key' => 'kyc-link-cust-123-1'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/kyc/links"
payload := strings.NewReader("{\n \"external_customer_id\": \"cust_123\",\n \"label\": \"Ana Perez\",\n \"expires_in_days\": 14,\n \"idempotency_key\": \"kyc-link-cust-123-1\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.qbank.cl/platform/v1/kyc/links")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"external_customer_id\": \"cust_123\",\n \"label\": \"Ana Perez\",\n \"expires_in_days\": 14,\n \"idempotency_key\": \"kyc-link-cust-123-1\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/kyc/links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_customer_id\": \"cust_123\",\n \"label\": \"Ana Perez\",\n \"expires_in_days\": 14,\n \"idempotency_key\": \"kyc-link-cust-123-1\"\n}"
response = http.request(request)
puts response.read_body{
"link_id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
"kind": "kyc",
"external_customer_id": "cust_123",
"url": "https://verify.example.com/on/usd/individual/new?invite=def456",
"status": "pending",
"label": "Ana Perez",
"expires_at": 1721209600,
"verification_fee": "1.500000",
"idempotency_key": "kyc-link-cust-123-1",
"created_at": "2026-07-10T12:00:00Z",
"updated_at": "2026-07-10T12:00:00Z"
}{
"error": "idempotency_key_required",
"message": "provide idempotency_key (body or Idempotency-Key header)"
}{
"error": "unauthorized",
"message": "invalid or missing credentials"
}{
"error": "insufficient_funds",
"message": "account balance is not enough for this operation"
}{
"error": "company_account_required",
"message": "third-party KYC/KYB verification is available to company accounts only"
}授权
会话 JWT(来自注册/登录)或 API key(pk_...)。
也接受 X-API-Key: <token> 作为替代请求头。
请求体
application/json
响应
KYC 链接已创建。
可用选项:
kyc, kyb 分享给被验证个人/企业的托管向导 URL。
可用选项:
pending, opened, completed, expired 链接完成后出现。
最后修改于 2026年7月19日
⌘I