商户通过 JSON 提交 L2 进阶认证
代会员调用 · 必带
x-on-behalf-of
需 x-idempotency-key
主 L1 审核通过后直接提交参数,无需创建 session 或打开托管页面。证明文件先通过 POST /v1/kyc/files 上传,仅接受当前会员已上传且存在的文件。POST 必须签名;JSON 请求体最多 128 KiB。提交成功只表示等待审核。同一会员已有未驳回申请时不能重复新建。快捷 KYC 绑定不满足真实 L1 前置。详细字段规则及完整示例见 L2 接入指南。
请求头
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
x-on-behalf-of |
string | 必填 | |
x-idempotency-key |
string | 必填 |
请求体
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
profile |
object | 必填 | |
profile.nickname |
string | 必填 | |
profile.postal_code |
string | 必填 | |
profile.tax_number |
string | 可选 | |
profile.employment_status |
string | 必填 | 配置对应 value |
profile.industry |
string | 必填 | 配置对应 value |
profile.job_title |
string | 必填 | 配置对应 value |
profile.company_name |
string | 必填 | 英文数字空格及指定符号 |
profile.annual_income |
string | 必填 | 正数,美元年收入 |
profile.account_purpose |
string[] | 必填 | 配置对应 value 数组 |
profile.other_purpose |
string | 可选 | 用途含 OTHERS 时必填 |
profile.banking_countries |
string[] | 必填 | |
profile.banking_currencies |
string[] | 必填 | 配置 currencies 内的值 |
profile.internationally |
"0" | "1" | 可选 | |
profile.turnover_monthly |
string | 必填 | 配置对应 value |
profile.turnover_monthly_currency |
string | 必填 | 配置 currencies 内的值 |
profile.proof_of_address |
string | 必填 | 地址证明 file_url |
profile.source_of_funds |
string | 必填 | 资金来源证明 file_url |
profile.income_proof |
string | 可选 | 选填收入证明 file_url |
profile.other_proof |
string | 可选 | 选填其他证明 file_url |
tos_acceptance |
object | 必填 | |
tos_acceptance.accepted |
"true" | 必填 | |
tos_acceptance.ip |
string | 必填 | 会员真实 IPv4,不能用商户服务器地址替代 |
tos_acceptance.user_agent |
string | 必填 | 会员实际设备信息 |
tos_acceptance.accepted_at |
string | 必填 | 会员确认的 UTC ISO 时间,Z 结尾且最多三位毫秒,最多领先服务端 5 分钟 |
响应
201已提交,等待审核
400invalid_fields / invalid_request / kyc_required / state_invalid
403insufficient_scope
404member_not_found
409idempotency_key_reused / idempotency_in_progress
请求
curl -X POST 'https://api.zinfra.vip/v1/kyc/l2/applications' \
-H 'x-auth-token: Bearer $TOKEN' \
-H 'x-on-behalf-of: $MEMBER_ID' \
-H 'x-idempotency-key: $IDEMPOTENCY_KEY' \
-H 'content-type: application/json' \
-d '{
"profile": "…",
"tos_acceptance": "…"
}'const res = await fetch("https://api.zinfra.vip/v1/kyc/l2/applications", {
method: "POST",
headers: {
"x-auth-token": "Bearer $TOKEN",
"x-on-behalf-of": "$MEMBER_ID",
"x-idempotency-key": "$IDEMPOTENCY_KEY",
"content-type": "application/json",
},
body: JSON.stringify({
"profile": "…",
"tos_acceptance": "…"
}),
});
// 金额按字符串读,别让它变成 number
const data = await res.json();import requests
res = requests.post(
"https://api.zinfra.vip/v1/kyc/l2/applications",
headers={
"x-auth-token": "Bearer $TOKEN",
"x-on-behalf-of": "$MEMBER_ID",
"x-idempotency-key": "$IDEMPOTENCY_KEY",
"content-type": "application/json",
},
json={
"profile": "…",
"tos_acceptance": "…"
},
)
# 金额用 Decimal(str(...)),不要 float
data = res.json()req, _ := http.NewRequest("POST", "https://api.zinfra.vip/v1/kyc/l2/applications",
strings.NewReader(`{
"profile": "…",
"tos_acceptance": "…"
}`))
req.Header.Set("x-auth-token", "Bearer $TOKEN")
req.Header.Set("x-on-behalf-of", "$MEMBER_ID")
req.Header.Set("x-idempotency-key", "$IDEMPOTENCY_KEY")
req.Header.Set("content-type", "application/json")
res, err := http.DefaultClient.Do(req)
// 金额字段用 string 接,不要 float64HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.zinfra.vip/v1/kyc/l2/applications"))
.header("x-auth-token", "Bearer $TOKEN")
.header("x-on-behalf-of", "$MEMBER_ID")
.header("x-idempotency-key", "$IDEMPOTENCY_KEY")
.header("content-type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"profile": "…",
"tos_acceptance": "…"
}
"""))
.build();
// 金额字段用 String / BigDecimal,不要 double$ch = curl_init('https://api.zinfra.vip/v1/kyc/l2/applications');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-auth-token: Bearer $TOKEN',
'x-on-behalf-of: $MEMBER_ID',
'x-idempotency-key: $IDEMPOTENCY_KEY',
'content-type: application/json',
],
CURLOPT_POSTFIELDS => <<<'JSON'
{
"profile": "…",
"tos_acceptance": "…"
}
JSON,
]);
$res = curl_exec($ch);
// 金额用 bcmath / 字符串,不要 floatval
201
// spec 里还没有这个 operation 的响应示例