隐藏的表单字段可能名为 checkify_token,但其值为 Checkify request_id。
在您的业务仪表板中,打开 开发者 并为您正在集成的站点创建一个站点 API 密钥。仅将其存储在服务器环境变量中 - 切勿将其发送到浏览器。
您无需手动调用 GET /v1/qr/pass/{PASS_ID}/start。Checkify 和 JavaScript 嵌入代码会自动启动会话、接收请求 ID 并将其写入您的表单。
您的后端只需要:
用户完成验证后,前端 SDK 会将 Checkify 的 request_id 写入一个隐藏的表单字段。默认字段名为 checkify_token——这只是字段名称,并非单独的令牌类型。将该字段值作为 request_id 发送到验证端点。
移动应用切换时,页面 URL 中可能会返回 checkify_request_id。SDK 会在页面加载时读取该值;您的服务器仍然会验证相同的 request_id 值。
前端表单 POST
{
"email": "user@example.com",
"checkify_token": "56a57761-ff5b-42f0-9c97-6c13e223e017"
}
验证来自后端的请求
{
"request_id": "56a57761-ff5b-42f0-9c97-6c13e223e017",
"required_claims": ["human_verified"],
"required_fields": [],
"consume": true
}
仅手动前端集成
后端开发人员通常不会调用 `/start`。仅当构建自定义前端或在不嵌入代码的情况下进行测试时才使用此部分。在 zsh/bash 中,URL 需要加引号,以避免 `?` 被视为通配符。
Pass start 仅适用于已注册的网站域名。浏览器会自动发送 Origin 参数;cURL 不会。请发送 Origin 参数(或 X-Checkify-Site-Url 参数),并指定“站点”→“允许的域名”下列出的主机名。主机名必须完全匹配——checkify.me 和 www.checkify.me 是不同的。
最常见的测试问题
如果 /start 返回 HTTP 403 错误,您的 Pass ID 可能仍然有效。通常的原因是请求的域名不在允许的域名列表中,或者已注册了 www.example.com 但使用了 example.com(反之亦然)。
使用专用测试站点,并在您的 Checkify 控制面板中通过集成测试。站点 API 密钥使用 csk_ 前缀;没有单独的测试密钥格式。在确认成功和拒绝流程之前,请勿针对生产环境进行测试。
# Step A — start a session (replace PASS_ID and YOUR_REGISTERED_DOMAIN)
curl -sS \
-H "Accept: application/json" \
-H "Origin: https://YOUR_REGISTERED_DOMAIN" \
"https://checkify.me/v1/qr/pass/chk_live_YOUR_PASS_ID/start?request_type=human"
# Response includes request_id and qr_url — open qr_url and complete verification
# Step B — verify on your server (after the user completes verification)
curl -sS -X POST "https://checkify.me/v1/qr/results/verify" \
-H "Authorization: Bearer $CHECKIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "PASTE_request_id_FROM_STEP_A",
"required_claims": ["human_verified"],
"consume": true
}'
仅在验证调用中使用您的站点密钥 API。请在调用验证调用之前完成应用程序中的验证,否则您将收到“待处理”状态。
设置 required_claims 以匹配受保护操作所需的证明。声明名称必须与 Checkify 为该验证会话批准的名称一致。年龄检查使用 age_over_{N}(例如 age_over_18)。当嵌入请求匹配的请求类型时,支持 10 到 110 之间的动态阈值。
| 用例 | 建议的必需声明 | 笔记 |
|---|---|---|
| 机器人/CAPTCHA替换 | ["human_verified"] |
确认真实用户已完成 Checkify 流程。 |
| 13岁以上内容或面向青少年的产品 | ["age_over_13"] |
当您的通行证要求年龄超过 13 岁时使用。 |
| 16岁以上内容或地区年龄限制 | ["age_over_16"] |
当您的通行证要求年龄超过 16 岁时使用。 |
| 电子烟、酒精或18岁以上结账 | ["age_over_18"] |
根据产品和市场情况选择合适的年龄门槛。 |
| 21岁以上人士可购买限制产品(如适用) | ["age_over_21"] |
当您的通行证要求年龄超过 21 岁时使用。 |
| 挑战25美元或更严格的零售政策 | ["age_over_25"] |
当您的通行证要求年龄超过 25 岁时使用。 |
| 自定义年龄阈值 | ["age_over_N"] |
使用 age_over_N,其中 N 为 10–110,与您的嵌入请求类型一致。 |
浏览器请求类型必须与您在服务器端验证的声明相匹配。
| 嵌入请求类型 | 必需声明 |
|---|---|
human | ["human_verified"] |
age_over_13 | ["age_over_13"] |
age_over_16 | ["age_over_16"] |
age_over_18 | ["age_over_18"] |
age_over_21 | ["age_over_21"] |
age_over_25 | ["age_over_25"] |
age_over_N | ["age_over_N"] (N = 10–110) |
除 required_claims 外,当集成已收集时,您还可以要求特定的已批准身份字段(例如国家或年龄段)。在 required_fields 中传入字段名——若批准结果中缺失,verify 会返回 missing_required_fields,并在 error.details 中提供 missing_fields。
在授予访问权限之前,请使用您网站的 API 密钥调用 POST /v1/qr/results/verify 请求。在 Checkify 确认结果之前,请将浏览器引用(请求 ID 或旧版轮询令牌)视为不可信。
POST https://checkify.me/v1/qr/results/verify
Authorization: Bearer YOUR_SITE_API_KEY
Content-Type: application/json
{
"request_id": "56a57761-ff5b-42f0-9c97-6c13e223e017",
"required_claims": ["human_verified"],
"consume": true
}
您也可以发送
token
而不是
request_id.
API 键的作用域限定于您的 Checkify 站点——您无需在请求正文中发送 site_id。
# checkify_token from your form POST is sent as request_id
curl -sS -X POST "https://checkify.me/v1/qr/results/verify" \
-H "Authorization: Bearer $CHECKIFY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "56a57761-ff5b-42f0-9c97-6c13e223e017",
"required_claims": ["human_verified"],
"consume": true
}'
import express from "express";
const app = express();
app.use(express.json());
const CHECKIFY_API_KEY = process.env.CHECKIFY_API_KEY;
const CHECKIFY_BASE_URL = process.env.CHECKIFY_BASE_URL || "https://checkify.me";
async function verifyCheckifyResult(requestId, requiredClaims = ["human_verified"]) {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 10000);
try {
const res = await fetch(`${CHECKIFY_BASE_URL}/v1/qr/results/verify`, {
method: "POST",
headers: {
Authorization: `Bearer ${CHECKIFY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
request_id: requestId,
required_claims: requiredClaims,
consume: true,
}),
signal: controller.signal,
});
let body = null;
try {
body = await res.json();
} catch {
body = null;
}
if (!res.ok) {
const details = body?.error?.details || {};
console.warn("Checkify verification failed", {
requestId,
code: body?.error?.code,
missingClaims: details.missing_claims,
missingFields: details.missing_fields,
reason: details.reason,
});
return {
allow: false,
reason: body?.error?.code || "verification_failed",
userMessage: "Verification could not be completed for this action.",
};
}
if (!body || body.status === "pending" || body.success === false) {
return {
allow: false,
reason: body?.status || "pending",
userMessage: "Verification could not be completed for this action.",
};
}
const approved = requiredClaims.every(
(claim) => body.approved_claims?.[claim] === true
);
return {
allow: approved,
reason: approved ? "approved" : "verification_failed",
userMessage: approved
? null
: "Verification could not be completed for this action.",
result: body,
};
} finally {
clearTimeout(timeout);
}
}
app.post("/signup", async (req, res) => {
const requestId = (req.body.checkify_token || "").trim();
if (!requestId) {
return res.status(403).json({ error: "Verification required" });
}
try {
const verdict = await verifyCheckifyResult(requestId);
if (!verdict.allow) {
return res.status(403).json({ error: verdict.userMessage });
}
return res.json({ ok: true });
} catch (err) {
console.error("Checkify verification unavailable", err);
return res.status(403).json({
error: "Verification is temporarily unavailable. Please try again.",
});
}
});
import { Checkify } from "@checkify/server";
const checkify = new Checkify({
apiKey: process.env.CHECKIFY_SITE_API_KEY,
});
app.post("/signup", async (req, res) => {
const requestId = String(req.body.checkify_token || "").trim();
if (!requestId) {
return res.status(403).json({ error: "Verification required" });
}
try {
const result = await checkify.verifyHuman({ requestId, consume: true });
if (!result.success || !result.approved) {
return res.status(403).json({
error: "Verification could not be completed for this action.",
});
}
return res.json({ ok: true });
} catch (err) {
console.error("Checkify verification failed", err);
return res.status(403).json({
error: "Verification is temporarily unavailable. Please try again.",
});
}
});
import os
import httpx
from fastapi import FastAPI, HTTPException
app = FastAPI()
CHECKIFY_API_KEY = os.environ["CHECKIFY_API_KEY"]
CHECKIFY_BASE_URL = os.getenv("CHECKIFY_BASE_URL", "https://checkify.me")
USER_MESSAGE = "Verification could not be completed for this action."
UNAVAILABLE = "Verification is temporarily unavailable. Please try again."
def verify_checkify_result(request_id: str, required_claims=None) -> dict:
required_claims = required_claims or ["human_verified"]
try:
response = httpx.post(
f"{CHECKIFY_BASE_URL}/v1/qr/results/verify",
headers={
"Authorization": f"Bearer {CHECKIFY_API_KEY}",
"Content-Type": "application/json",
},
json={
"request_id": request_id,
"required_claims": required_claims,
"consume": True,
},
timeout=10.0,
)
except httpx.RequestError as exc:
print("Checkify verification unavailable", exc)
return {"allow": False, "reason": "unavailable", "user_message": UNAVAILABLE}
try:
body = response.json()
except ValueError:
body = None
if response.status_code >= 400:
error = (body or {}).get("error") if isinstance(body, dict) else None
details = (error or {}).get("details", {})
print(
"Checkify verification failed",
{
"request_id": request_id,
"code": (error or {}).get("code"),
"missing_claims": details.get("missing_claims"),
"missing_fields": details.get("missing_fields"),
"reason": details.get("reason"),
},
)
return {
"allow": False,
"reason": (error or {}).get("code", "verification_failed"),
"user_message": USER_MESSAGE,
}
if not isinstance(body, dict) or body.get("status") == "pending" or body.get("success") is False:
return {"allow": False, "reason": "pending", "user_message": USER_MESSAGE}
approved = all((body.get("approved_claims") or {}).get(claim) is True for claim in required_claims)
return {
"allow": approved,
"reason": "approved" if approved else "verification_failed",
"user_message": None if approved else USER_MESSAGE,
"result": body,
}
@app.post("/signup")
def signup(email: str, checkify_token: str):
request_id = (checkify_token or "").strip()
if not request_id:
raise HTTPException(status_code=403, detail="Verification required")
verdict = verify_checkify_result(request_id)
if not verdict["allow"]:
raise HTTPException(status_code=403, detail=verdict["user_message"])
return {"ok": True}
<?php
$checkifyApiKey = getenv('CHECKIFY_API_KEY');
$baseUrl = getenv('CHECKIFY_BASE_URL') ?: 'https://checkify.me';
function verify_checkify_result(string $requestId, array $requiredClaims = ['human_verified']): array {
global $checkifyApiKey, $baseUrl;
$payload = json_encode([
'request_id' => $requestId,
'required_claims' => $requiredClaims,
'consume' => true,
]);
$ch = curl_init($baseUrl . '/v1/qr/results/verify');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $checkifyApiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => $payload,
CURLOPT_TIMEOUT => 10,
]);
$raw = curl_exec($ch);
$status = (int) curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($raw === false) {
error_log('Checkify verification unavailable');
return ['allow' => false, 'user_message' => 'Verification is temporarily unavailable. Please try again.'];
}
$body = json_decode($raw ?: 'null', true);
if ($status >= 400) {
$error = is_array($body) ? ($body['error'] ?? null) : null;
$details = is_array($error) ? ($error['details'] ?? []) : [];
error_log('Checkify verification failed: ' . json_encode([
'code' => is_array($error) ? ($error['code'] ?? null) : null,
'missing_claims' => $details['missing_claims'] ?? null,
]));
return ['allow' => false, 'user_message' => 'Verification could not be completed for this action.'];
}
if (!is_array($body) || ($body['status'] ?? '') === 'pending' || ($body['success'] ?? true) === false) {
return ['allow' => false, 'user_message' => 'Verification could not be completed for this action.'];
}
foreach ($requiredClaims as $claim) {
if (($body['approved_claims'][$claim] ?? false) !== true) {
return ['allow' => false, 'user_message' => 'Verification could not be completed for this action.'];
}
}
return ['allow' => true, 'result' => $body];
}
$requestId = trim($_POST['checkify_token'] ?? '');
if ($requestId === '') {
http_response_code(403);
echo json_encode(['error' => 'Verification required']);
exit;
}
$verdict = verify_checkify_result($requestId);
if (!$verdict['allow']) {
http_response_code(403);
echo json_encode(['error' => $verdict['user_message']]);
exit;
}
// continue protected action...
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"strings"
"time"
)
type verifyResponse struct {
Success bool `json:"success"`
Status string `json:"status"`
Message string `json:"message"`
ApprovedClaims map[string]bool `json:"approved_claims"`
}
type errorResponse struct {
Error struct {
Code string `json:"code"`
Message string `json:"message"`
Details map[string]interface{} `json:"details"`
} `json:"error"`
}
func verifyCheckifyResult(requestID string, requiredClaims []string) (bool, string, error) {
apiKey := os.Getenv("CHECKIFY_API_KEY")
baseURL := os.Getenv("CHECKIFY_BASE_URL")
if baseURL == "" {
baseURL = "https://checkify.me"
}
payload, _ := json.Marshal(map[string]interface{}{
"request_id": requestID,
"required_claims": requiredClaims,
"consume": true,
})
req, err := http.NewRequest(http.MethodPost, baseURL+"/v1/qr/results/verify", bytes.NewReader(payload))
if err != nil {
return false, "", err
}
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 10 * time.Second}
res, err := client.Do(req)
if err != nil {
return false, "", err
}
defer res.Body.Close()
if res.StatusCode >= 400 {
var errBody errorResponse
_ = json.NewDecoder(res.Body).Decode(&errBody)
fmt.Printf("Checkify verification failed code=%s details=%v\n", errBody.Error.Code, errBody.Error.Details)
return false, "Verification could not be completed for this action.", nil
}
var body verifyResponse
if err := json.NewDecoder(res.Body).Decode(&body); err != nil {
return false, "Verification could not be completed for this action.", nil
}
if body.Status == "pending" || !body.Success {
return false, "Verification could not be completed for this action.", nil
}
for _, claim := range requiredClaims {
if !body.ApprovedClaims[claim] {
return false, "Verification could not be completed for this action.", nil
}
}
return true, "", nil
}
func signupHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
http.Error(w, "method not allowed", http.StatusMethodNotAllowed)
return
}
if err := r.ParseForm(); err != nil {
http.Error(w, "invalid form", http.StatusBadRequest)
return
}
requestID := strings.TrimSpace(r.FormValue("checkify_token"))
if requestID == "" {
http.Error(w, "Verification required", http.StatusForbidden)
return
}
allowed, message, err := verifyCheckifyResult(requestID, []string{"human_verified"})
if err != nil {
fmt.Println("Checkify verification unavailable", err)
http.Error(w, "Verification is temporarily unavailable. Please try again.", http.StatusForbidden)
return
}
if !allowed {
http.Error(w, message, http.StatusForbidden)
return
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte(`{"ok":true}`))
}
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
var apiKey = Environment.GetEnvironmentVariable("CHECKIFY_API_KEY");
var baseUrl = Environment.GetEnvironmentVariable("CHECKIFY_BASE_URL") ?? "https://checkify.me";
async Task<(bool Allow, string UserMessage)> VerifyCheckifyAsync(string requestId)
{
using var client = new HttpClient { Timeout = TimeSpan.FromSeconds(10) };
using var req = new HttpRequestMessage(HttpMethod.Post, $"{baseUrl}/v1/qr/results/verify");
req.Headers.Authorization = new AuthenticationHeaderValue("Bearer", apiKey);
req.Content = new StringContent(JsonSerializer.Serialize(new
{
request_id = requestId,
required_claims = new[] { "human_verified" },
consume = true,
}), Encoding.UTF8, "application/json");
HttpResponseMessage res;
try
{
res = await client.SendAsync(req);
}
catch (Exception ex)
{
Console.Error.WriteLine($"Checkify verification unavailable: {ex.Message}");
return (false, "Verification is temporarily unavailable. Please try again.");
}
var raw = await res.Content.ReadAsStringAsync();
using var doc = JsonDocument.Parse(string.IsNullOrWhiteSpace(raw) ? "{}" : raw);
var root = doc.RootElement;
if (!res.IsSuccessStatusCode)
{
if (root.TryGetProperty("error", out var err) && err.TryGetProperty("details", out var details))
{
Console.WriteLine($"Checkify verification failed details={details}");
}
return (false, "Verification could not be completed for this action.");
}
if (root.TryGetProperty("status", out var status) && status.GetString() == "pending")
{
return (false, "Verification could not be completed for this action.");
}
if (root.TryGetProperty("approved_claims", out var claims)
&& claims.TryGetProperty("human_verified", out var human)
&& human.GetBoolean())
{
return (true, string.Empty);
}
return (false, "Verification could not be completed for this action.");
}
// In your signup endpoint:
// var requestId = form["checkify_token"];
// var (allow, message) = await VerifyCheckifyAsync(requestId);
// if (!allow) return Results.Forbid();
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import java.net.URI;
import java.net.http.*;
import java.time.Duration;
public class CheckifyVerify {
private static final String API_KEY = System.getenv("CHECKIFY_API_KEY");
private static final String BASE_URL =
System.getenv().getOrDefault("CHECKIFY_BASE_URL", "https://checkify.me");
private static final ObjectMapper MAPPER = new ObjectMapper();
static boolean verifyCheckifyResult(String requestId) {
String payload = "{\"request_id\":\"" + requestId + "\","
+ "\"required_claims\":[\"human_verified\"],\"consume\":true}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(BASE_URL + "/v1/qr/results/verify"))
.timeout(Duration.ofSeconds(10))
.header("Authorization", "Bearer " + API_KEY)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(payload))
.build();
try {
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
JsonNode root = MAPPER.readTree(response.body() == null ? "{}" : response.body());
if (response.statusCode() >= 400) {
System.err.println("Checkify verification failed: " + root);
return false;
}
if ("pending".equals(root.path("status").asText()) || !root.path("success").asBoolean(false)) {
return false;
}
return root.path("approved_claims").path("human_verified").asBoolean(false);
} catch (Exception ex) {
System.err.println("Checkify verification unavailable: " + ex.getMessage());
return false;
}
}
}
对最终受保护的操作使用 consume: true — 结账、注册、密码重置、年龄限制购买、受保护的内容访问
仅当 — 测试、调试或非最终检查,其结果需要稍后再次验证。
对于受监管或高风险的操作,建议使用 consume: true,这样同一个验证结果就不能用于多个受保护的决策。
如果您的后端无法连接到 Checkify,则在没有确认服务器端结果的情况下,不得允许年龄限制结账、赌博访问、成人内容访问、电子烟或酒精购买或其他受保护的操作。
使用较短的 HTTP 超时时间(例如 10 秒)。对于瞬态 5xx 错误或网络错误,重试一到两次,然后拒绝访问。在服务器端记录事件,并显示对用户安全的提示信息。不要向客户暴露内部 Checkify 错误详情。
try {
const verdict = await verifyCheckifyResult(requestId);
if (!verdict.allow) {
return res.status(403).json({ error: "Verification required" });
}
// Continue protected action
} catch (err) {
console.error("Checkify verification unavailable", err);
return res.status(403).json({
error: "Verification is temporarily unavailable. Please try again.",
});
}
The Checkify monorepo includes @checkify/server (Node.js) and checkify-server (Python) packages for server-side verify calls. There is no published OpenAPI spec or Postman collection yet — use the examples on this page and POST /v1/qr/results/verify directly.
@checkify/server v1.0.0 已发布在 npm 上。Python checkify-server 包包含在 Checkify SDK monorepo 中。
已完成的验证将在 QR_RESULT_MAX_AGE_SECONDS 秒后过期(默认值为 900 秒/15 分钟)。过期后,验证将返回 result_expired,并提示用户重新验证。
JavaScript 和 SDK 处理标准嵌入式应用的会话状态。仅当您构建自定义前端并手动调用 GET /v1/qr/pass/{pass_id}/start 时才使用这些。
GET /v1/qr/status?token={poll_token}GET /v1/qr/status/request/{request_id}?status_token={status_token}成功时,Checkify 返回 HTTP 200,其中 success: true,status: completed。仅当存在必需的声明(例如 human_verified: true)时才允许访问。
{
"success": true,
"status": "completed",
"message": "Verification result confirmed",
"request_id": "56a57761-ff5b-42f0-9c97-6c13e223e017",
"site_id": "YOUR_SITE_ID",
"business_id": "YOUR_BUSINESS_ID",
"approved_claims": {
"human_verified": true
},
"approved_fields": [],
"signed_result": {
"payload": { "...": "..." },
"signature": "...",
"signature_algorithm": "EdDSA",
"key_id": "checkify:default"
}
}
signed_result 对象可让您的后端保存防篡改审计记录,证明 Checkify 在核验时批准了所需声明。大多数集成只需 approved_claims。受监管或高风险业务也可存储 signed_result。嵌套的 proof_metadata 可能包含密码学或运营证据(例如 assurance 元数据、证据类型或同意哈希)——不是身份证件或原始出生日期。请勿将嵌套 assurance 字段视为认证或信任保证;请检查 certification_status 与您自身的政策。请勿存储超出必要范围的个人信息。
如果用户尚未完成应用内的操作,Checkify 将返回 HTTP 200 状态码,其中 success: false,status: pending。拒绝受保护的操作,并要求用户完成验证。
{
"success": false,
"status": "pending",
"message": "Verification is not completed yet",
"request_id": "56a57761-ff5b-42f0-9c97-6c13e223e017",
"approved_claims": {},
"signed_result": null
}
| 字段 | 含义 |
|---|---|
success | true 验证完成且要求匹配时 |
status | completed 或 pending |
approved_claims | 声明Checkify已批准,例如 human_verified: true |
signed_result | 用于审计跟踪的可选签名负载 |
当验证无法进行时,Checkify 返回 HTTP 4xx/5xx 错误,并附带结构化的 JSON 响应体。检查 error.code 并将 error.details 记录到服务器端。向最终用户返回通用消息。
{
"success": false,
"error": {
"code": "verification_failed",
"message": "The verification did not include all required claims.",
"details": {
"missing_claims": ["age_over_18"]
}
}
}
| 代码 | HTTP | 意义 | 建议采取的措施 |
|---|---|---|---|
missing_authorization | 401 | 未发送授权标头。 | 仅通过服务器端代码发送授权:Bearer YOUR_SITE_API_KEY。 |
invalid_token | 401 | Bearer 令牌缺失、格式错误或不是有效的站点 API 密钥。 | 在您的业务仪表板中验证密钥,并将其存储在环境变量中。 |
expired_token | 401 | 站点 API 密钥已被撤销。 | 创建一个新的站点 API 密钥,并在您的服务器上轮换使用。 |
missing_required_field | 400 / 422 | JSON 请求体中缺少 request_id 或 token。 | 传递隐藏表单字段中的 request_id,或者如果您的集成仍然使用 poll token,则传递 poll token。 |
invalid_request_id | 400 | 规范化后,引用无法解析或为空。 | 请确保前端提交的 Checkify 请求 ID 保持不变。 |
result_not_found | 404 | 该参考编号不存在验证请求。 | 拒绝此操作。用户可能篡改了隐藏字段或提交了旧的会话。 |
result_expired | 410 | 验证完成时间过长,不足以用于此操作。 | 请用户再次扫描并使用新的 request_id 调用 verify。 |
verification_failed | 403 / 409 | 站点/业务不匹配、结果已被消费(HTTP 409),或一般核验失败。 | 拒绝访问。检查 error.details。声明/字段缺口请参见 missing_required_claims 与 missing_required_fields。 |
missing_required_claims | 403 | developers_server.err_missing_required_claims_meaning | developers_server.err_missing_required_claims_action |
missing_required_fields | 403 | developers_server.err_missing_required_fields_meaning | developers_server.err_missing_required_fields_action |
unknown_required_attributes | 400 | developers_server.err_unknown_required_attributes_meaning | developers_server.err_unknown_required_attributes_action |
business_not_operational | 403 | 企业账户已被锁定、存档或无法使用。 | 请联系企业主或Checkify支持团队。账户激活前,请勿执行受保护的操作。 |
validation_errors | 422 | JSON 正文模式验证失败(HTTP 422)。 | 检查 error.details.validation_errors 中的字段级错误信息。在重试之前,修复 request_id、required_claims 或 required_fields 的类型。 |
rate_limited | 429 | 短时间内验证呼叫次数过多。 | 使用指数退避算法重试。仅在受保护的操作中进行验证,而不是在每次页面浏览时都进行验证。 |
server_error | 500+ | 由于服务器暂时出现问题,Checkify 无法完成验证。 | 重试一两次,如果失败则关闭并记录事件。 |
目前,服务器验证是同步的:后端会在用户提交受保护的操作时验证 request_id。对于结账、注册和访问控制流程,这是推荐的方法。标准集成不需要通用验证 Webhook。GoHighLevel 和其他合作伙伴集成可以在业务控制面板中使用单独的出站 Webhook 配置。
将隐藏字段视为不可信参考,而不是证据。在授予访问权限之前,请务必使用服务器上的站点 API 密钥进行验证。使用
consume: true
进行注册或密码重置等一次性操作。