Skip to content

错误码 ​

Brand OpenAPI 的所有响应(无论成功还是失败)都使用同一个 JSON 信封:

字段何时出现含义
code总是业务码。0 表示成功。错误使用 5 位业务码(40000、40100、50000 …),不是 HTTP 状态码。
message总是人类可读文案,按 Accept-Language 本地化(见多语言)。仅用于展示和日志,不要据此做分支判断。
error_key每个错误响应都有;成功响应没有稳定的机器可读 key(如 card_is_closing),程序判断用这个,不随语言变化。
data成功时;部分错误业务数据(列表接口在这里放分页对象)。错误时不出现,但带结构化详情的持卡人错误除外(如 {"field": "last_name"})—— 40000、40400 与 50000 响应都可能带,见持卡人。
json
{
  "code": 0,
  "message": "成功",
  "data": { "card_id": "card_12345", "status": 2 }
}
json
{
  "code": 40000,
  "message": "卡片正在注销中",
  "error_key": "card_is_closing"
}

先看 code,不要只看 HTTP 状态码

大部分业务错误(参数校验失败、余额不足、卡状态不符、接口内部已处理的服务端异常)都以 HTTP 200 返回。HTTP 200 本身不代表成功:读取 data 之前务必先判断 code == 0。

/api/v1/openapi/* 下返回的每一个错误都带 error_key:业务错误、鉴权失败(401)、访问受限(403)、卡不存在(404)、幂等冲突(409)、限流(429)、内部错误,甚至服务端未捕获的崩溃(500)。

HTTP 状态码与业务码 ​

场景HTTPcodeerror_key 示例
成功(含幂等回放)2000—
业务 / 参数校验不通过(ID 格式错、金额、卡状态、余额不足、缺少 Idempotency-Key …)20040000openapi_invalid_card_id、insufficient_balance、card_is_closing
请求体无法解析(不是 JSON,或字段的 JSON 类型不对)20040001validation_failed
鉴权失败(签名 / 时间戳 / nonce / AppID / 凭证或账号被停用)40140100openapi_invalid_credentials
鉴权通过但被限制(敏感信息二次验证、非激活卡取敏感信息、管理员封禁、解冻被平台冻结的卡)40340300email_code_required、invalid_pin、openapi_sensitive_card_only_active、card_sensitive_access_banned、unauthorized_unfreeze_admin
卡不存在 / 不属于当前账号(持卡人接口上还包括持卡人、持卡人影像与卡头)40440400card_not_found、cardholder_not_found、cardholder_file_not_found、cardholder_header_not_found
Idempotency-Key 被复用但请求体不同,或同 key 的请求仍在处理中40940900openapi_idempotency_key_conflict、openapi_idempotency_key_in_progress
限流(按 (AppID, 客户端 IP) 计数的应用层限流、敏感信息验证锁定 / 发码冷却,或 API 前面的网关)42942900too_many_requests(并带 Retry-After 响应头)
接口内部已处理的服务端异常20050000openapi_recharge_failed、openapi_internal_error
服务端未捕获的崩溃50050000internal_error(message 固定为 Internal Server Error,不做本地化)

如何解读 code:

code含义处理方式
0成功读取 data。
40000 / 40001请求或当前状态不满足规则按 error_key 分支;修正参数或等待状态变化。原样重试只会得到同样的错误。
40100鉴权失败见 401 错误处理。
40300鉴权通过,但本次请求不被允许按 error_key 分支(补交 / 更正二次验证,或停止)。
40400卡(或持卡人 / 影像 / 卡头)不存在或不属于你停止;核对你保存的 ID。
40900幂等冲突…_in_progress:稍后用同一个 key 重试;…_conflict:不要重试,见幂等键。
42900被限流等待 Retry-After 秒后重试。
50000服务端异常稍后重试。写接口在换用新的 Idempotency-Key 之前,先确认实际结果(见充值)。

没有信封的响应

代理 / 负载均衡的错误页、请求不存在的路径、或使用了非 POST 方法时,响应可能不是上面的 JSON 信封。此时按 HTTP 状态码兜底:例如任何 HTTP 429 都按限流处理,任何 5xx 都按临时服务端错误处理。

完整 error_key 字典 ​

zh-CN / en-US 两列是对每个 key 的说明,实际 message 文案可能略有不同。不要按 message 匹配。

通用 ​

error_keyzh-CNen-USHTTPcode
validation_failed请求体无法解析(不是合法 JSON,或字段类型不对)Request body could not be parsed (invalid JSON, or a field with the wrong JSON type)20040001
too_many_requests请求过于频繁,按 Retry-After 等待(见限流)Too many requests — honor Retry-After42942900
internal_error服务端未捕获的异常(message 固定为 Internal Server Error)Unhandled server crash (message is always Internal Server Error)50050000

鉴权与凭证 ​

error_keyzh-CNen-USHTTPcode
openapi_invalid_credentials无效的 OpenAPI 凭证(所有鉴权失败统一返回,见 401 错误处理)Invalid OpenAPI credentials40140100

ID 校验 ​

error_keyzh-CNen-USHTTPcode
openapi_invalid_header_idheader_id 不合法:缺前缀、格式错误,或卡头不存在 / 不可用Invalid header_id: missing prefix, malformed, or the header does not exist / is not available20040000
openapi_invalid_package_idpackage_id 缺失或格式不正确(应为 pkg_ 加数字,如 pkg_123)Invalid package_id: missing or malformed (expected pkg_ followed by digits, e.g. pkg_123)20040000
openapi_invalid_card_idcard_id 缺失或格式不正确(应为 card_ 加数字,如 card_123)Invalid card_id: missing or malformed (expected card_ followed by digits, e.g. card_123)20040000
openapi_invalid_cardholder_idcardholder_id 缺失或格式不正确(应为 chd_ 加数字)Invalid cardholder_id: missing or malformed (expected chd_ followed by digits)20040000
openapi_invalid_cardholder_file_id持卡人影像 ID 格式不正确(应为 chf_ 加数字),data.field 指明字段A cardholder file ID is malformed (expected chf_ followed by digits); data.field names the field20040000

格式正确、但不存在或属于其他账号的 card_id,在所有卡接口上都返回 HTTP 404 / 40400 card_not_found。见 ID 与前缀。

幂等 ​

error_keyzh-CNen-USHTTPcode
openapi_idempotency_key_required缺少 Idempotency-Key 请求头Missing Idempotency-Key header20040000
openapi_idempotency_key_too_longIdempotency-Key 超长(最大 128 字符)Idempotency-Key too long (max 128 chars)20040000
openapi_idempotency_key_invalid_charsIdempotency-Key 含非法字符(仅允许可见 ASCII,不含空格)Idempotency-Key contains invalid characters20040000
openapi_idempotency_key_conflict同一 Idempotency-Key 但请求体不同Same Idempotency-Key with a different request body40940900
openapi_idempotency_key_in_progress同 Idempotency-Key 的请求仍在处理中,请稍后重试A request with the same Idempotency-Key is still being processed40940900

业务规则 ​

由 /card/apply、/card_configs/list、/card/first_deposit/preview 及各卡接口返回。

error_keyzh-CNen-USHTTPcode
openapi_card_type_not_supported暂不支持该卡类型,仅虚拟卡Not supported (virtual cards only)20040000
account_manager_bind_required该卡头需绑定客户经理后才能开通Account-manager-controlled header; bind an account manager first20040000
account_manager_unavailable绑定的客户经理已失效,请联系客服Your account manager is no longer active; contact support20040000
account_manager_open_disabled您的客户经理尚未对该账号开放此卡头 / 套餐Header / package not opened for your account by your account manager20040000
card_not_found卡片不存在 / 不属于当前账号Card not found, or not owned by your account40440400
insufficient_balance钱包余额不足(不冻结任何资金)Insufficient wallet balance (nothing is frozen)20040000
kyc_required账号需先完成平台实名认证(KYC)The account must complete platform identity verification (KYC) first20040000
card_open_risk_blocked历史拒付率 / 授权异常率过高,风控暂停开卡,请联系客服Card opening blocked by risk control; contact support20040000
card_open_risk_card_quota_exceeded风控限制当前最多只能持有 1 张卡Risk control limits the account to 1 card for now20040000
card_deposit_insufficient_balance押金余额不足Insufficient balance for the card security deposit20040000
card_deposit_config_invalid该卡的押金配置不完整(平台配置问题)Security-deposit configuration incomplete (platform configuration)20040000
card_deposit_asset_not_found押金币种不存在或已下架(平台配置问题)Security-deposit currency does not exist or was removed (platform configuration)20040000
card_deposit_already_exists该卡已存在押金记录A deposit record already exists for this card20040000
virtual_g_name_invalid(G 卡)持卡人姓名不满足 ASCII 字母 / 单空格 / ≤40 字符规则(G card) cardholder name fails the rule20040000
virtual_g_required_fields_missing(G 卡)开卡资料不完整(G card) apply payload incomplete20040000
virtual_a_required_fields_missing(A 卡)first_name / last_name 缺失或为空白,或开卡资料不完整(A card) name missing/blank or apply payload incomplete20040000
virtual_s921_required_fields_missing(S921 卡)开卡配置不完整(卡头配置不完整或币种非 USD),请联系客服(S921 card) the card configuration is incomplete (header not fully configured or currency not USD) — contact support20040000
virtual_s921_unified_webhook_not_subscribed(S921 卡)平台侧该卡型的事件订阅不完整,暂不能开卡,冻结金额已退回钱包,请联系客服(S921 card) the platform-side event subscription for this card type is incomplete, so the card cannot be opened yet; frozen funds refunded — contact support20040000

本页早期版本列出的 kyc_not_approved 从不返回:账号未满足实名要求时,一律返回 kyc_required。

首充(自定义金额) ​

当自定义 first_deposit_amount 不可受理时,由 /card/apply 作为 error_key 返回(HTTP 200 / 40000),由 /card/first_deposit/preview 作为成功响应(code: 0)中的 invalid_reason 返回。

error_keyzh-CNen-USHTTPcode
invalid_first_deposit_amountfirst_deposit_amount 必须是非负整数first_deposit_amount must be a non-negative integer20040000
first_recharge_below_base首充低于配置底额First deposit below the config base20040000
first_recharge_below_min首充低于套餐首充最低金额(min_first_deposit)First deposit below the package minimum (min_first_deposit)20040000
first_recharge_exceeds_max超额超过最大充值Excess exceeds max recharge20040000
first_recharge_limit_exceeded超额超过充值限额Excess exceeds the recharge limit20040000
first_recharge_asset_mismatch开卡费资产与充值资产不一致Open-fee asset differs from recharge asset20040000
first_recharge_excess_too_small超额扣费取整后过小Excess too small after fee + rounding20040000

充值 ​

由 /card/recharge 返回。该请求同样会经过上面的 ID 校验、幂等与通用检查。

error_keyzh-CNen-USHTTPcode
amount_requiredamount 为必填amount is required20040000
card_not_found卡片不存在 / 不属于当前账号Card not found, or not owned by your account40440400
invalid_recharge_amountamount 不是合法金额amount is not a valid amount20040000
recharge_amount_too_small低于套餐最小充值金额(message 含最小值)Below the package minimum (the message includes the minimum)20040000
recharge_amount_too_large高于套餐最大充值金额(message 含最大值)Above the package maximum (the message includes the maximum)20040000
recharge_limit_exceeded超出账号充值限额Account recharge limit exceeded20040000
recharge_amount_below_fee充值金额不足以支付手续费(未冻结)The amount does not cover the recharge fee (nothing frozen)20040000
insufficient_balance钱包余额不足(不冻结资金、不创建订单)Wallet cannot cover the amount (nothing is frozen, no order)20040000
card_is_closing卡片正在注销中(status=4)The card is being closed (status=4)20040000
card_not_active卡片未激活(开卡中 / 已冻结 / 已注销 / 开卡失败,或已被提供方标记注销)The card is not active (pending / frozen / closed / failed, or flagged as closed by the provider)20040000
card_number_not_ready卡号尚未下发(VIRTUAL-S921 开卡后短时间内,通常几秒、最长约 90 秒),请稍后重试,不冻结资金Card number not issued yet (VIRTUAL-S921 right after opening); retry later, nothing frozen20040000
card_recharge_disabled账号已被禁止充值Recharge is disabled for your account20040000
user_not_active账号未处于正常状态The account is not active20040000
recharge_disabled该卡类型 / 卡头 / 套餐的充值已关闭Recharge is switched off for this card type / header / package20040000
card_type_not_support_recharge该卡类型不支持充值This card type does not support recharge20040000
recharge_not_supported该套餐未配置充值资产The package has no recharge asset20040000
card_type_mismatch套餐与卡类型不匹配(平台数据问题)Package / card type mismatch (platform data)20040000
account_currency_not_configured卡内账户币种未配置(平台配置问题)Card account currency not configured (platform configuration)20040000
same_currency_not_allowed充值币种与卡内币种相同(平台配置问题)Recharge asset equals the card currency (platform configuration)20040000
unsupported_card_provider暂不支持该卡提供商(平台配置问题)Card provider not supported (platform configuration)20040000
exchange_rate_not_available汇率暂不可用,请稍后重试Exchange rate temporarily unavailable — retry later20040000
card_status_not_rechargeable提供方因卡状态拒绝充值(已注销 / 注销中 / 冻结 / 未激活),资金已退回钱包The provider refused because of the card's status; funds already returned to the wallet20040000
recharge_rejected提供方同步拒绝充值(如低于提供方最低金额),资金已退回钱包The provider refused the recharge synchronously; funds already returned to the wallet20040000
openapi_recharge_failed服务端异常,不保证已建单;重试前先查 /card/transactions/listUnexpected server error — an order is not guaranteed; check the transactions before retrying20050000

结果未知不是错误

如果调用提供方超时或结果不明,订单已经创建、资金已经冻结。自 v1.5 起,接口此时返回正常的成功信封,status: 1(处理中);最终结果通过 card.recharged / card.recharge_failed webhook 通知。这种情况下不要换新的 Idempotency-Key 重发。

业务错误同样会被回放 24 小时

HTTP 200 的错误(40000 / 50000)会像成功响应一样存进该 Idempotency-Key:24 小时内用同一个 key + 同一个 body 重发,拿到的是同一个错误。排除原因后(为钱包充值、等待 card_number_not_ready 恢复 …),请使用新的 key。见幂等键。

敏感卡片信息 ​

下列错误码由 /openapi/card/info(with_sensitive=true 前提不满足时)与 /openapi/card/sensitive/send_code 返回。敏感字段要求卡处于 status=2 (active),并通过用户二次验证或凭证免验证特权二者之一。

error_keyzh-CNen-USHTTPcode
email_code_required请输入邮箱验证码Please enter email verification code40340300
sms_code_required请输入短信验证码Please enter SMS verification code40340300
pin_required请输入 PIN 码Please enter PIN40340300
2fa_code_required请输入 2FA 验证码Please enter 2FA code40340300
invalid_email_code邮箱验证码错误Invalid email verification code40340300
invalid_sms_code短信验证码错误Invalid SMS verification code40340300
invalid_pinPIN 码错误Invalid PIN40340300
invalid_2fa_code2FA 验证码错误Invalid 2FA code40340300
email_not_verified邮箱未验证Email not verified40340300
phone_not_verified手机号未验证Phone not verified40340300
no_usable_auth_method无可用的认证方式No usable authentication method40340300
card_sensitive_access_banned通过 API 获取敏感卡片信息的权限已被管理员关闭Sensitive card info access via API has been disabled by the administrator40340300
openapi_sensitive_card_only_active仅激活状态的卡片可获取敏感信息Sensitive card info is only available for active cards.40340300
too_many_requests请求过于频繁(验证锁定 / 发码冷却,遵循 Retry-After)Too many requests (verification locked / send cooldown; honor Retry-After)42942900
sms_country_not_supported该国家/地区的手机号暂时不在支持范围内(不发码,冷却已释放)Phone numbers from this country or region are not supported at the moment (no code sent, cooldown released)20040000
send_code_failed验证码发送失败(冷却已释放,可立即重试)Failed to send verification code (cooldown released, retry allowed)20050000

openapi_sensitive_card_info_disabled(403)不再返回:未开通免验证特权的凭证现在会落入用户二次验证路径,而不是被直接拒绝。

卡列表过滤 ​

由 /cards/list 返回。

error_keyzh-CNen-USHTTPcode
openapi_conflicting_card_filtersusable_only 与 statuses 不能同时传usable_only and statuses cannot be used together20040000
openapi_invalid_status_valuestatuses 含非法状态值(仅允许 1-6)statuses contains an invalid value (only 1-6 allowed)20040000
invalid_min_balance最小余额必须是合法非负数字(如 0 或 10.5)min_balance must be a valid non-negative number20040000
invalid_max_balance最大余额必须是合法非负数字max_balance must be a valid non-negative number20040000
min_balance_exceeds_max_balance最小余额不能大于最大余额min_balance must not exceed max_balance20040000
invalid_date_formatstart_date / end_date 必须为 YYYY-MM-DDstart_date / end_date must be YYYY-MM-DD20040000

交易明细过滤 ​

由 /transactions/list 与 /card/transactions/list 返回。

error_keyzh-CNen-USHTTPcode
openapi_invalid_card_idcard_id 缺失(/card/transactions/list 必填)或格式不正确card_id missing (required on /card/transactions/list) or malformed20040000
card_not_foundcard_id 对应的卡不存在或不属于当前账号The card_id does not exist or is not yours40440400
invalid_date_format交易时间格式必须为 YYYY-MM-DD HH:MM:SS(message 文案写的是 YYYY-MM-DD,此处必须带时分秒)transaction_time_from/to must be YYYY-MM-DD HH:MM:SS20040000
invalid_params参数无效:金额格式错误,或 type_category 不在允许取值内Invalid parameters — bad amount format, or an invalid type_category20040000

冻结 / 解冻 ​

由 /card/freeze 与 /card/unfreeze 返回。两个接口同样可能返回 openapi_invalid_card_id(格式错误)、card_not_found(404)与 openapi_card_type_not_supported。

error_keyzh-CNen-USHTTPcode
card_already_frozen(冻结)卡片已被冻结,可视为已处于目标状态(freeze) Card is already frozen20040000
card_status_cannot_freeze(冻结)当前卡状态不可冻结(开卡中 / 注销中 / 已注销 / 开卡失败)(freeze) Current card status does not allow freezing20040000
card_not_frozen(解冻)卡片未被冻结(unfreeze) Card is not frozen20040000
card_type_mismatch卡类型与配置不匹配Card type does not match20040000
operation_not_supported该操作不支持Operation not supported for this card type20040000
recharge_unfreeze_disabled该卡不允许通过充值自动解冻Recharge-based unfreeze is not available20040000
unauthorized_unfreeze_admin(解冻)该卡片被管理员冻结,用户无法自行解冻(unfreeze) Frozen by admin — cannot self-unfreeze40340300
unauthorized_unfreeze_risk(解冻)该卡片被风控冻结(unfreeze) Frozen by risk control — cannot self-unfreeze40340300
unauthorized_unfreeze_system(解冻)该卡片被系统冻结(unfreeze) Frozen by system — cannot self-unfreeze40340300
openapi_freeze_card_failed / openapi_unfreeze_card_failed服务端异常Unexpected server error20050000

v1.5 之前,冻结一张已冻结的卡返回 card_status_cannot_freeze;现在返回 card_already_frozen。冻结 / 解冻成功时还会推送 card.status_changed webhook。

销卡 ​

由 /card/close 返回(v1.3 —— 端点自 v1.2 起已上线但此前未收录文档)。同样可能返回 openapi_invalid_card_id、card_not_found(404)、openapi_card_type_not_supported、card_type_mismatch 与 operation_not_supported。

error_keyzh-CNen-USHTTPcode
card_is_closing卡片正在注销中Card is being closed20040000
card_already_closed卡片已注销Card is already closed20040000
card_frozen_cannot_close卡片已冻结,无法注销Card is frozen and cannot be cancelled20040000
card_status_cannot_close当前卡状态不可注销Current card status does not allow cancellation20040000
close_not_accepted_by_upstream销卡未被上游受理,卡片已恢复为可用状态,请稍后重试Closure not accepted by the provider; card restored to active — retry later20040000
card_upstream_closed_pending_reconcile该卡已被上游直接注销,正在等待人工对账退款Card already closed by the provider; awaiting manual refund reconciliation20040000
card_config_not_found卡配置不存在Card configuration not found20040000
openapi_close_card_failed销卡失败Failed to close card20050000

持卡人姓名 / 账单地址 ​

由 /card/holder_name/update、/card/billing_address/generate、/card/billing_address/update 返回(v1.5.1)。同样可能返回 openapi_invalid_card_id、card_not_found(404)与 openapi_card_type_not_supported。字段级错误的 message 带出字段名 / 上限,error_key 不变。

error_keyzh-CNen-USHTTPcode
card_holder_info_not_editable仅激活状态(status=2)的卡片可修改持卡人姓名和账单地址The cardholder name and billing address can only be changed while the card is active (status=2)20040000
billing_address_managed_by_cardholder该卡使用持卡人开立,账单地址取自持卡人资料,不能重新生成或修改(v1.6.1)This card was opened with a cardholder, so its billing address comes from the cardholder profile and cannot be regenerated or changed (v1.6.1)20040000
card_holder_name_required持卡人姓名缺失或只有空白Cardholder name missing or blank20040000
card_holder_name_length_exceeded持卡人姓名超过 100 个字符(message 含上限)Cardholder name longer than 100 characters (the message includes the limit)20040000
card_holder_name_invalid_characters持卡人姓名含换行、制表符等控制字符Cardholder name contains control characters such as line breaks or tabs20040000
invalid_country_codecountry / country_code 不是两位字母的 ISO 3166-1 alpha-2 代码country / country_code is not a two-letter ISO 3166-1 alpha-2 code20040000
billing_address_field_required账单地址必填字段缺失或只有空白(message 含字段名)A required billing-address field is missing or blank (the message names the field)20040000
billing_address_field_length_exceeded账单地址字段超长(message 含字段名与上限)A billing-address field is too long (the message names the field and the limit)20040000
billing_address_field_invalid_characters账单地址字段含控制字符(message 含字段名)A billing-address field contains control characters (the message names the field)20040000
billing_address_country_pool_empty(生成)该国家暂无可用地址,请换一个国家(generate) No address available for this country — choose another20040000
openapi_update_card_holder_name_failed / openapi_generate_billing_address_failed / openapi_update_billing_address_failed服务端异常,可直接重试Unexpected server error — safe to retry20050000

持卡人 ​

由持卡人接口(v1.6)以及带 cardholder_id 或(v1.6.6 起)带 billing_address 的 /card/apply 返回(后者返回下面的资料校验类 key,data.field 在 billing_address.* 下)。部分错误带有包含详情的 data 对象 —— field、cardholder_id、header_id、review_status、failure_reason、terminal、issues、missing_fields、retry_after_seconds、max_pages;见错误详情。

资料校验(data.field 指明字段)。v1.6.8 起持卡人 create / update 只做发卡方的平台底线校验(格式与存储上限);字符集、年龄、证件有效期以及卡头需要哪些字段,由 /cardholder/check、/cardholder/submit 与开卡以问题(issues)的形式报告

error_keyzh-CNen-USHTTPcode
cardholder_field_required缺少必填资料(first_name / last_name / birth_date / email / area_code / mobile_number;重试草稿登记时还可能是 identity.number,见修改持卡人)A required field is missing (first_name / last_name / birth_date / email / area_code / mobile_number; when retrying a draft's registration it can also be identity.number — see Update Cardholder)20040000
cardholder_field_too_long资料超出存储上限(名 / 姓 32;地址 state 20,city / district / line1 / line2 70,postcode 10 个字符)A field exceeds its storage limit (names 32; address state 20, city / district / line1 / line2 70, postcode 10 characters)20040000
cardholder_birth_date_invalid出生日期格式须为 YYYY-MM-DDDate of birth must be YYYY-MM-DD20040000
cardholder_gender_invalid性别只能是 1 或 2Gender must be 1 or 220040000
cardholder_country_code_invalid国家或地区代码须为两位大写字母(ISO 3166-1 alpha-2)Country code must be two upper-case letters (ISO 3166-1 alpha-2)20040000
cardholder_email_invalid邮箱格式无效Invalid email20040000
cardholder_area_code_invalid手机区号须为 + 加 1–4 位数字Area code must be + followed by 1–4 digits20040000
cardholder_mobile_number_invalid手机号须为 4–30 位数字Mobile number must be 4–30 digits20040000
cardholder_ssn_invalid社会安全号须为 9 位数字SSN must be 9 digits20040000
cardholder_id_type_invalid证件类型只能是 ID_CARD / PASSPORT / HK_HKID / DLN / RESIDENCE_PERMITID type must be ID_CARD / PASSPORT / HK_HKID / DLN / RESIDENCE_PERMIT20040000
cardholder_id_number_invalid证件号码最多 64 位,只能包含字母、数字和连字符ID number: up to 64 letters, digits or hyphens20040000
cardholder_date_invalid日期格式须为 YYYY-MM-DDDate must be YYYY-MM-DD20040000
cardholder_address_incomplete地址须包含国家、州 / 省、城市、地址第一行和邮编(仅不用持卡人时 /card/apply 的 billing_address)An address needs country, state, city, line 1 and postcode (only billing_address on /card/apply without a cardholder)20040000
cardholder_address_line_invalid地址只能包含英文字母、数字、空格及 , . ' / # ( ) - &(仅不用持卡人时 /card/apply 的 billing_address)Address may only contain English letters, digits, spaces and , . ' / # ( ) - & (only billing_address on /card/apply without a cardholder)20040000
cardholder_postcode_invalid邮编须为 4–10 位字母或数字(仅不用持卡人时 /card/apply 的 billing_address)Postcode must be 4–10 letters or digits (only billing_address on /card/apply without a cardholder)20040000
cardholder_poa_info_required上传或替换地址证明须同时填写出具日期和出具国家A new proof of address needs its issue date and issuing country in the same request20040000
cardholder_poa_issue_date_in_future地址证明出具日期不能晚于今天Proof-of-address issue date cannot be after today20040000
cardholder_external_id_invalidexternal_id 最多 128 位,只能包含字母、数字及 - _ .external_id: up to 128 letters, digits or - _ .20040000
cardholder_name_immutable持卡人登记后不能修改姓名The name cannot change after registration20040000

持卡人状态

error_keyzh-CNen-USHTTPcode
cardholder_not_found持卡人不存在(或不是通过 OpenAPI 登记的)Cardholder not found on your account (or not registered through OpenAPI)40440400
cardholder_not_registered持卡人尚未完成登记(草稿),修改后调用 updateRegistration not completed (draft) — fix and update20040000
cardholder_identity_public_figureAI 审核:持卡人身份不能用于开卡,本次登记 / 修改未保存AI check: this cardholder identity cannot be used to open cards — the create / update was not saved20040000
cardholder_id_number_mismatchAI 审核:证件号码与证件影像上的不一致,本次登记 / 修改未保存AI check: the ID number does not match the identity document image — the create / update was not saved20040000
cardholder_name_mismatchAI 审核:姓名与证件影像上的不一致,本次登记 / 修改未保存AI check: the name does not match the identity document image — the create / update was not saved20040000
cardholder_birth_date_mismatchAI 审核:出生日期与证件影像上的不一致AI check: the date of birth does not match the identity document image20040000
cardholder_gender_mismatchAI 审核:性别与证件影像上的不一致AI check: the gender does not match the identity document image20040000
cardholder_nationality_mismatchAI 审核:国籍与证件影像上的不一致AI check: the nationality does not match the identity document image20040000
cardholder_id_type_mismatchAI 审核:identity.type 与上传的证件不一致AI check: identity.type does not match the uploaded document20040000
cardholder_id_issue_country_mismatchAI 审核:签发国家 / 地区与证件影像上的不一致AI check: the issuing country / region does not match the identity document image20040000
cardholder_id_issue_date_mismatchAI 审核:签发日期与证件影像上的不一致AI check: the issue date does not match the identity document image20040000
cardholder_id_expiry_date_mismatchAI 审核:到期日期与证件影像上的不一致AI check: the expiry date does not match the identity document image20040000
cardholder_manual_review_pending持卡人在平台人工审核中,审核通过后才能开卡The cardholder is under platform manual review — cards can be opened after approval20040000
cardholder_manual_review_rejected持卡人未通过平台人工审核,不能用于开卡The cardholder did not pass platform manual review and cannot be used to open cards20040000
cardholder_under_review审核中,仅可修改 emailUnder review — only email can be changed20040000
cardholder_busy该持卡人(或本账户的另一个登记请求)正在处理中,请稍后用新的 Idempotency-Key 重试Another operation on this cardholder (or another create on your account) is in progress — retry shortly with a new Idempotency-Key20040000
cardholder_only_draft_deletable只有草稿可以删除Only drafts can be deleted20040000
cardholder_legacy_card_invalidlegacy_card_id 不是可复用持卡人的旧卡legacy_card_id is not one of your legacy card candidates20040000
cardholder_already_registered该持卡人已在本账户登记为另一位持卡人This person is already registered as another cardholder on your account20040000
cardholder_source_mismatch该 external_id 属于通过其他渠道登记的持卡人The external_id belongs to a cardholder registered through another channel20040000

影像

error_keyzh-CNen-USHTTPcode
cardholder_file_purpose_invalidpurpose 缺失或无效purpose missing or invalid20040000
cardholder_file_empty未上传文件或文件为空No file, or the file is empty20040000
cardholder_file_too_large文件超过 2 MBFile larger than 2 MB20040000
cardholder_file_type_unsupported只支持 JPG / PNG / PDFOnly JPG / PNG / PDF20040000
cardholder_file_rejected影像无效(格式不支持或内容损坏),请重新上传File invalid (unsupported format or damaged) — upload another20040000
cardholder_upload_busy上传繁忙,请稍后重试Too many uploads — retry later20040000
cardholder_file_not_identity_documentAI 审核:上传的不是证件AI check: the file is not an identity document20040000
cardholder_file_no_person_holding_documentAI 审核:手持证件照里没有本人手持证件AI check: the hand-held photo does not show the person holding the document20040000
cardholder_file_specimenAI 审核:样本或模板证件AI check: specimen or template document20040000
cardholder_file_unreadableAI 审核:证件看不清(模糊、过暗、反光或被遮挡)AI check: the document is not readable (blurry, dark, glare or covered)20040000
cardholder_file_public_figureAI 审核:证件上的身份不能用于开卡AI check: the identity on this document cannot be used to open cards20040000
cardholder_file_editedAI 审核:证件照疑似经过修图或篡改AI check: the document photo appears to have been edited or altered20040000
cardholder_file_data_inconsistentAI 审核:证件信息前后不一致(如机读区与印刷信息不符)AI check: the data on the document is inconsistent (e.g. the MRZ does not match the printed details)20040000
cardholder_file_screen_captureAI 审核:截图或翻拍屏幕的照片AI check: a screenshot or a photo of a screen20040000
cardholder_file_digital_copyAI 审核:不是拍摄证件原件得到的图片(网上下载、电子版或合成图)AI check: not a photo of the original document (downloaded, electronic or composited image)20040000
cardholder_file_side_mismatchAI 审核:证件面与上传位置不符AI check: the side does not match the upload slot20040000
cardholder_ai_check_too_frequent本账户 AI 审核次数超过上限 —— data.retry_after_seconds 秒后用新的 Idempotency-Key 重试Too many AI checks for this account — retry after data.retry_after_seconds with a new Idempotency-Key20040000
cardholder_file_pdf_too_many_pages证件 PDF 页数超过上限(data.max_pages)The identity document PDF has too many pages (data.max_pages)20040000
cardholder_file_pdf_not_accepted证件照不接受 PDF —— 请上传 JPG / PNG 照片PDF is not accepted for identity documents — upload a JPG / PNG photo20040000
cardholder_file_pdf_unreadable无法识别 PDF 的页数(加密或损坏)The PDF's pages cannot be counted (encrypted or damaged)20040000
cardholder_file_not_found影像不存在或不属于本账户(data.field 指明位置)File not found on your account (data.field names the slot)40440400
cardholder_file_purpose_mismatch影像用途与所填位置不符The file was uploaded for a different slot20040000
cardholder_file_expired影像已过期,请重新上传The unreferenced file has expired — upload again20040000
cardholder_file_in_use影像已被其他持卡人使用,请重新上传The file is used by another cardholder — upload again20040000

审核与身份认证

error_keyzh-CNen-USHTTPcode
cardholder_headers_required请至少选择一个卡头Give at least one header20040000
cardholder_headers_too_many一次最多 20 个卡头At most 20 headers per call20040000
cardholder_header_not_found卡头不存在Card header not found40440400
cardholder_header_unsupported该卡头不使用持卡人The header does not use cardholders20040000
cardholder_header_bin_missing该卡头暂不可用于持卡人,请联系我们The header is temporarily unavailable for cardholders — contact us20040000
cardholder_header_bin_unavailable该卡头关联的发卡方卡段已停用或不存在(发卡方拒绝),请换其他卡头或联系我们The header's issuer card BIN has been disabled or does not exist — choose another header or contact us20040000
cardholder_billing_country_unsupported该卡不支持此账单国家或地区,请换一个国家 —— 仅由 /cardholder/billing_address/random 在卡头要求持卡人时返回(data.field=country)This card does not support this billing country or region. Please choose another country — returned only by /cardholder/billing_address/random (data.field=country) when the header requires a cardholder20040000
cardholder_random_address_unavailable(/cardholder/billing_address/random)暂时无法生成该国家或地区的地址,请换一个国家或手动填写(data.field=country)(/cardholder/billing_address/random) Unable to generate an address for this country or region right now. Please choose another country or enter the address manually (data.field=country)20040000
cardholder_kyc_level_not_required该卡头不需要身份认证The header does not require identity verification20040000
cardholder_kyc_not_allowed该卡头要求的身份认证已被拒绝且重试次数已用完The verification this header requires was rejected and no retries are left20040000
cardholder_kyc_not_in_progress该持卡人没有进行中的身份认证No verification is in progress for this cardholder20040000
cardholder_kyc_cancel_linked关联已有认证发起的身份认证不能取消,结果会自动推送A verification started by linking an existing verification cannot be cancelled — the result is pushed automatically20040000
cardholder_kyc_already_verified该卡头要求的身份认证已通过,请直接提交审核The verification this header requires has already passed — submit for review directly20040000
cardholder_kyc_in_review持卡人另一项身份认证正在审核中,请在其结束后再发起Another verification of this cardholder is under review — start again after it concludes20040000
cardholder_kyc_link_in_progress关联已有认证的结果还在处理,请等待结果,不要另行发起A linked verification is still being processed — wait for the result instead of starting a new one20040000
cardholder_requirement_unavailable该卡头的持卡人要求暂不可用,请稍后重试The header's cardholder requirements are temporarily unavailable — retry later20050000
cardholder_conflict手机号或证件号已被其他持卡人使用The mobile number or ID number is already used by another cardholder20040000
cardholder_provider_invalid_params资料未通过校验,请检查后重试The data was rejected during registration / review — check it20040000
cardholder_provider_status_not_allowed持卡人当前状态不允许该操作The cardholder's current status does not allow this operation20040000
cardholder_provider_unavailable持卡人服务暂不可用,请稍后重试。登记 / 修改草稿时 data.cardholder_id 为已保存的草稿,请对其调用 update 重试Cardholder service temporarily unavailable — retry later. On create / update of a draft, data.cardholder_id is the saved draft: retry with update20050000
cardholder_service_not_configured持卡人服务未开通,请联系我们Cardholder service not enabled — contact us20050000
openapi_cardholder_failed持卡人接口服务端异常Unexpected server error on a cardholder endpoint20050000

开卡(/card/apply)

error_keyzh-CNen-USHTTPcode
cardholder_required该卡头须使用已审核通过的持卡人(cardholder_id)The header requires an approved cardholder (cardholder_id)20040000
cardholder_review_not_approved该持卡人在此卡类型尚未审核通过,或已审核资料不覆盖该卡头(data.review_status、data.failure_reason、data.terminal)Not approved for this card type, or the reviewed information does not cover this header (data.review_status, data.failure_reason, data.terminal)20040000
cardholder_kyc_level_not_passed尚未通过该卡头要求的身份认证(data.header_id)—— 用 /cardholder/kyc/init 发起Identity verification required by this header not passed (data.header_id) — start it with /cardholder/kyc/init20040000
cardholder_requirements_unmet发卡方预检发现该卡头不接受的资料或限制(data.header_id、data.issues、data.missing_fields);未冻结资金The issuer's precheck found materials or restrictions this header does not accept (data.header_id, data.issues, data.missing_fields); no funds frozen20040000
cardholder_card_limit_reached该持卡人在此卡头的开卡数已达上限The cardholder has reached the card limit on this header20040000
cardholder_kyc_not_configured该卡头要求身份认证但尚未配置,请联系我们The header requires identity verification but it is not configured — contact us20040000
bank_card_apply_cardholder_requirements_unmet持卡人不满足该卡的开卡要求(冻结资金已退回)The cardholder does not meet this card's requirements (frozen funds returned)20040000
bank_card_apply_cardholder_disabled该持卡人当前不可用于开卡(冻结资金已退回),请联系我们The cardholder cannot open cards at the moment (frozen funds returned) — contact us20040000

服务端异常 ​

error_keyzh-CNen-USHTTPcode
openapi_internal_errorOpenAPI 内部错误(如幂等存储暂不可用)OpenAPI internal error20050000
openapi_list_card_headers_failed查询卡头列表失败Failed to list card headers20050000
openapi_list_card_configs_failed查询卡配置列表失败Failed to list card configs20050000
openapi_apply_card_failed申请虚拟卡失败Failed to apply virtual card20050000
openapi_first_deposit_preview_failed首充预览失败Failed to preview first deposit20050000
openapi_recharge_failed充值失败Failed to recharge20050000
openapi_get_card_info_failed获取卡片信息失败Failed to get card info20050000
openapi_list_cards_failed查询卡列表失败Failed to list cards20050000
openapi_webhook_service_unavailableWebhook 服务不可用Webhook service unavailable20050000
openapi_list_webhook_events_failed查询 Webhook 事件历史失败Failed to list webhook events20050000
openapi_list_transactions_failed查询交易明细失败Failed to list transactions20050000
openapi_freeze_card_failed冻结卡片失败Failed to freeze card20050000
openapi_unfreeze_card_failed解冻卡片失败Failed to unfreeze card20050000
openapi_close_card_failed销卡失败Failed to close card20050000
openapi_update_card_holder_name_failed修改持卡人姓名失败Failed to update the cardholder name20050000
openapi_generate_billing_address_failed生成账单地址失败Failed to generate a billing address20050000
openapi_update_billing_address_failed保存账单地址失败Failed to save the billing address20050000
openapi_cardholder_failed持卡人请求处理失败Failed to process the cardholder request20050000
send_code_failed验证码发送失败Failed to send verification code20050000
internal_error服务端未捕获的异常Unhandled server crash50050000

程序处理建议 ​

python
def handle_response(http_status: int, resp: dict):
    code = resp.get("code")
    key = resp.get("error_key", "")

    # 1. 先判断成功。HTTP 200 本身不代表成功
    if code == 0:
        return resp["data"]

    # 2. 没有信封(代理错误页、路径不存在):按 HTTP 状态码兜底
    if code is None:
        if http_status == 429:
            raise RateLimited()
        raise ServerError(f"HTTP {http_status}")

    # 3. 带真实 HTTP 状态码的几类
    if code == 40100:
        # 永远是 openapi_invalid_credentials
        raise AuthError("凭证无效,请检查 AppID/Secret/时钟/签名输入")
    if code == 40300:
        # 鉴权通过,但本次请求受限
        if key.endswith("_required"):
            raise PermissionError(f"缺少二次验证凭据({key})—— "
                                  "先调用 /openapi/card/sensitive/send_code 再重试")
        if key.startswith("invalid_"):
            raise PermissionError(f"二次验证未通过: {key}")
        raise PermissionError(f"特性受限: {key}")  # 如 openapi_sensitive_card_only_active
    if code == 40400:
        raise NotFound(key)                          # card_not_found
    if code == 40900:
        if key == "openapi_idempotency_key_in_progress":
            raise RetrySameKeyLater()                # 第一次请求仍在处理
        raise IdempotencyConflict()                  # 同 key 不同 body:不要重试
    if code == 42900:
        raise RateLimited()                          # 按 Retry-After 响应头等待

    # 4. 业务规则(HTTP 200):按 error_key 分支
    if key == "insufficient_balance":
        raise BalanceError("余额不足")
    if key == "kyc_required":
        raise KYCError("需先完成实名认证")
    if key == "card_number_not_ready":
        raise RetryLater()                           # S921 卡号尚未下发
    if key in ("openapi_invalid_card_id", "openapi_invalid_header_id", "openapi_invalid_package_id"):
        raise ValueError(f"ID 格式错误: {key}")

    # 5. 服务端异常(HTTP 200 或 500)
    if code == 50000:
        # 写接口:换新的 Idempotency-Key 重试之前,先确认实际结果
        raise ServerError(key)

    raise ApiError(code, key, resp.get("message"))

多语言 ​

message 的语言依次取自请求头 Accept-Language、请求头 X-Language、查询参数 ?lang=(查询参数属于签名中的 RAW_QUERY,见 HMAC 鉴权)。只取第一个语言标签,忽略 q 权重。

http
Accept-Language: en-US
取值message 语言
不传英文(en-US)
en-US / en英文
zh-CN / zh / zh-Hans简体中文
zh-HK / zh-TW / zh-Hant / zh-MO繁体中文
平台支持的其他语言对应语言(可能为机器翻译)
不支持的语言英文

英文、简体中文、繁体中文由人工维护;某种语言缺少文案时会回退到其他语言。error_key 不受语言影响,永远稳定。

采用 MIT 等价条款发布