Error Codes
Every Brand OpenAPI response — success or error — uses the same JSON envelope:
| Field | When present | Meaning |
|---|---|---|
code | Always | Business code. 0 = success. Errors use 5-digit business codes (40000, 40100, 50000 …) — these are not HTTP statuses. |
message | Always | Human-readable text, localized by Accept-Language (see Localization). For display and logs only — never branch on it. |
error_key | Every error response; never on success | Stable machine-readable key (e.g. card_is_closing). Use this for programmatic checks. It never changes with the language. |
data | Success; some errors | Business payload (list endpoints put the paginated object here). Absent on errors, except the cardholder errors that carry structured details (e.g. {"field": "last_name"}) — on 40000, 40400 and 50000 responses alike, see Cardholders. |
{
"code": 0,
"message": "Success",
"data": { "card_id": "card_12345", "status": 2 }
}{
"code": 40000,
"message": "Card is being closed",
"error_key": "card_is_closing"
}Check code first, not the HTTP status
Most business errors — validation failures, insufficient balance, card status, and server-side failures handled by the endpoint — are returned with HTTP 200. An HTTP 200 alone does not mean success: always check code == 0 before reading data.
error_key is present on every error returned under /api/v1/openapi/*: business errors, authentication failures (401), gated access (403), unknown cards (404), idempotency conflicts (409), rate limits (429), internal errors and even an unhandled server crash (500).
HTTP Status vs Business Code
| Situation | HTTP | code | error_key examples |
|---|---|---|---|
| Success (incl. an idempotent replay) | 200 | 0 | — |
Business / validation rejection (bad ID format, amount, card status, insufficient balance, missing Idempotency-Key …) | 200 | 40000 | openapi_invalid_card_id, insufficient_balance, card_is_closing |
| Request body cannot be parsed (not JSON, or a field has the wrong JSON type) | 200 | 40001 | validation_failed |
| Authentication failure (signature / timestamp / nonce / AppID / disabled credential or account) | 401 | 40100 | openapi_invalid_credentials |
| Authenticated but gated (sensitive-info second factor, card not active for sensitive data, admin ban, card frozen by the platform on unfreeze) | 403 | 40300 | email_code_required, invalid_pin, openapi_sensitive_card_only_active, card_sensitive_access_banned, unauthorized_unfreeze_admin |
| Card not found / not owned by your account (also cardholders, cardholder files and headers on the cardholder endpoints) | 404 | 40400 | card_not_found, cardholder_not_found, cardholder_file_not_found, cardholder_header_not_found |
Idempotency-Key reused with a different body, or the same key is still being processed | 409 | 40900 | openapi_idempotency_key_conflict, openapi_idempotency_key_in_progress |
Rate limited (application limit per (AppID, client IP), sensitive-info verification lock / send cooldown, or the gateway in front of the API) | 429 | 42900 | too_many_requests (+ Retry-After header) |
| Server-side failure handled by the endpoint | 200 | 50000 | openapi_recharge_failed, openapi_internal_error |
| Unhandled server crash | 500 | 50000 | internal_error (the message is always Internal Server Error, not localized) |
How to read code:
code | Meaning | What to do |
|---|---|---|
0 | Success | Use data. |
40000 / 40001 | The request or the current state violates a rule | Branch on error_key; fix the input or wait for the state to change. Retrying the same request unchanged returns the same error. |
40100 | Authentication failed | See Handling 401. |
40300 | Authenticated, but this specific request is not allowed | Branch on error_key (supply / correct a second factor, or stop). |
40400 | The card (or cardholder / file / header) does not exist or is not yours | Stop; check the ID you stored. |
40900 | Idempotency conflict | …_in_progress: retry the same key shortly. …_conflict: do not retry — see Idempotency. |
42900 | Rate limited | Wait for Retry-After seconds, then retry. |
50000 | Server-side failure | Retry later. On write endpoints, check the resulting state before sending a new Idempotency-Key (see Recharge). |
Responses without the envelope
A proxy / load-balancer error page, a request to a path that does not exist, or a non-POST method can come back without this JSON envelope. Fall back to the HTTP status in that case — e.g. treat any HTTP 429 as rate limited and any 5xx as a transient server error.
Full error_key Dictionary
The en-US / zh-CN columns describe each key; the exact message wording may differ slightly. Never match on message.
General
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
validation_failed | Request body could not be parsed (invalid JSON, or a field with the wrong JSON type) | 请求体无法解析(不是合法 JSON,或字段类型不对) | 200 | 40001 |
too_many_requests | Too many requests — honor Retry-After (see Rate Limit) | 请求过于频繁,按 Retry-After 等待(见限流) | 429 | 42900 |
internal_error | Unhandled server crash (message is always Internal Server Error) | 服务端未捕获的异常(message 固定为 Internal Server Error) | 500 | 50000 |
Auth & Credentials
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_invalid_credentials | Invalid OpenAPI credentials (every authentication failure, see Handling 401) | 无效的 OpenAPI 凭证(所有鉴权失败统一返回) | 401 | 40100 |
ID Validation
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_invalid_header_id | Invalid header_id: missing prefix, malformed, or the header does not exist / is not available | header_id 不合法:缺前缀、格式错误,或卡头不存在 / 不可用 | 200 | 40000 |
openapi_invalid_package_id | Invalid package_id: missing or malformed (expected pkg_ followed by digits, e.g. pkg_123) | package_id 缺失或格式不正确(应为 pkg_ 加数字,如 pkg_123) | 200 | 40000 |
openapi_invalid_card_id | Invalid card_id: missing or malformed (expected card_ followed by digits, e.g. card_123) | card_id 缺失或格式不正确(应为 card_ 加数字,如 card_123) | 200 | 40000 |
openapi_invalid_cardholder_id | Invalid cardholder_id: missing or malformed (expected chd_ followed by digits) | cardholder_id 缺失或格式不正确(应为 chd_ 加数字) | 200 | 40000 |
openapi_invalid_cardholder_file_id | A cardholder file ID is malformed (expected chf_ followed by digits); data.field names the field | 持卡人影像 ID 格式不正确(应为 chf_ 加数字),data.field 指明字段 | 200 | 40000 |
A well-formed card_id that does not exist or belongs to another account returns HTTP 404 / 40400 card_not_found on every card endpoint. See IDs & Prefixes.
Idempotency
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_idempotency_key_required | Missing Idempotency-Key header | 缺少 Idempotency-Key 请求头 | 200 | 40000 |
openapi_idempotency_key_too_long | Idempotency-Key too long (max 128 chars) | Idempotency-Key 超长(最大 128 字符) | 200 | 40000 |
openapi_idempotency_key_invalid_chars | Idempotency-Key contains invalid characters (only visible ASCII, no spaces) | Idempotency-Key 含非法字符(仅允许可见 ASCII,不含空格) | 200 | 40000 |
openapi_idempotency_key_conflict | Same Idempotency-Key with a different request body | 同一 Idempotency-Key 但请求体不同 | 409 | 40900 |
openapi_idempotency_key_in_progress | A request with the same Idempotency-Key is still being processed — retry shortly | 同 Idempotency-Key 的请求仍在处理中,请稍后重试 | 409 | 40900 |
Business Rules
Returned by /card/apply, /card_configs/list, /card/first_deposit/preview and the card endpoints.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_card_type_not_supported | Not supported (virtual cards only) | 暂不支持该卡类型,仅虚拟卡 | 200 | 40000 |
account_manager_bind_required | Account-manager-controlled header; bind an account manager first | 该卡头需绑定客户经理后才能开通 | 200 | 40000 |
account_manager_unavailable | Your account manager is no longer active; contact support | 绑定的客户经理已失效,请联系客服 | 200 | 40000 |
account_manager_open_disabled | Header / package not opened for your account by your account manager | 您的客户经理尚未对该账号开放此卡头 / 套餐 | 200 | 40000 |
card_not_found | Card not found, or not owned by your account | 卡片不存在 / 不属于当前账号 | 404 | 40400 |
insufficient_balance | Insufficient wallet balance (nothing is frozen) | 钱包余额不足(不冻结任何资金) | 200 | 40000 |
kyc_required | The account must complete platform identity verification (KYC) first | 账号需先完成平台实名认证(KYC) | 200 | 40000 |
card_open_risk_blocked | Card opening blocked by risk control (historical decline / zero-auth rate too high); contact support | 历史拒付率 / 授权异常率过高,风控暂停开卡,请联系客服 | 200 | 40000 |
card_open_risk_card_quota_exceeded | Risk control limits the account to 1 card for now | 风控限制当前最多只能持有 1 张卡 | 200 | 40000 |
card_deposit_insufficient_balance | Insufficient balance for the card security deposit | 押金余额不足 | 200 | 40000 |
card_deposit_config_invalid | The package's security-deposit configuration is incomplete (platform configuration) | 该卡的押金配置不完整(平台配置问题) | 200 | 40000 |
card_deposit_asset_not_found | The security-deposit currency does not exist or was removed (platform configuration) | 押金币种不存在或已下架(平台配置问题) | 200 | 40000 |
card_deposit_already_exists | A deposit record already exists for this card | 该卡已存在押金记录 | 200 | 40000 |
virtual_g_name_invalid | (G card) cardholder name fails the ASCII-letters / single-space / ≤40 chars rule | (G 卡)持卡人姓名不满足规则 | 200 | 40000 |
virtual_g_required_fields_missing | (G card) server could not assemble a complete apply payload | (G 卡)开卡资料不完整 | 200 | 40000 |
virtual_a_required_fields_missing | (A card) first_name / last_name missing or blank, or apply payload incomplete | (A 卡)持卡人姓名缺失或开卡资料不完整 | 200 | 40000 |
virtual_s921_required_fields_missing | (S921 card) the card configuration is incomplete (header not fully configured or currency not USD) — contact support | (S921 卡)开卡配置不完整(卡头配置不完整或币种非 USD),请联系客服 | 200 | 40000 |
virtual_s921_unified_webhook_not_subscribed | (S921 card) the platform-side event subscription for this card type is incomplete, so the card cannot be opened yet; frozen funds refunded — contact support | (S921 卡)平台侧该卡型的事件订阅不完整,暂不能开卡,冻结金额已退回钱包,请联系客服 | 200 | 40000 |
kyc_not_approvedwas listed here in earlier versions of this page but is never returned — an account that does not meet the KYC requirement always getskyc_required.
First Deposit (Custom Amount)
Returned by /card/apply as error_key (HTTP 200 / 40000), and by /card/first_deposit/preview as invalid_reason inside a successful (code: 0) body, when a custom first_deposit_amount cannot be honored.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
invalid_first_deposit_amount | first_deposit_amount must be a non-negative integer | first_deposit_amount 必须是非负整数 | 200 | 40000 |
first_recharge_below_base | First deposit below the config base | 首充低于配置底额 | 200 | 40000 |
first_recharge_below_min | First deposit below the package minimum (min_first_deposit) | 首充低于套餐首充最低金额(min_first_deposit) | 200 | 40000 |
first_recharge_exceeds_max | Excess exceeds max recharge | 超额超过最大充值 | 200 | 40000 |
first_recharge_limit_exceeded | Excess exceeds the recharge limit | 超额超过充值限额 | 200 | 40000 |
first_recharge_asset_mismatch | Open-fee asset differs from recharge asset | 开卡费资产与充值资产不一致 | 200 | 40000 |
first_recharge_excess_too_small | Excess too small after fee + rounding | 超额扣费取整后过小 | 200 | 40000 |
Recharge
Returned by /card/recharge. The request also goes through the ID, idempotency and general checks above.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
amount_required | amount is required | amount 为必填 | 200 | 40000 |
card_not_found | Card not found, or not owned by your account | 卡片不存在 / 不属于当前账号 | 404 | 40400 |
invalid_recharge_amount | amount is not a valid amount | amount 不是合法金额 | 200 | 40000 |
recharge_amount_too_small | Below the package minimum (the message includes the minimum) | 低于套餐最小充值金额(message 含最小值) | 200 | 40000 |
recharge_amount_too_large | Above the package maximum (the message includes the maximum) | 高于套餐最大充值金额(message 含最大值) | 200 | 40000 |
recharge_limit_exceeded | Account recharge limit exceeded | 超出账号充值限额 | 200 | 40000 |
recharge_amount_below_fee | The amount does not cover the recharge fee (nothing frozen) | 充值金额不足以支付手续费(未冻结) | 200 | 40000 |
insufficient_balance | Wallet cannot cover the amount (nothing is frozen, no order is created) | 钱包余额不足(不冻结资金、不创建订单) | 200 | 40000 |
card_is_closing | The card is being closed (status=4) | 卡片正在注销中(status=4) | 200 | 40000 |
card_not_active | The card is not active (pending / frozen / closed / failed, or flagged as closed by the provider) | 卡片未激活(开卡中 / 已冻结 / 已注销 / 开卡失败,或已被提供方标记注销) | 200 | 40000 |
card_number_not_ready | The card number has not been issued yet (VIRTUAL-S921 right after opening — usually seconds, up to about 90 s); retry later, nothing is frozen | 卡号尚未下发(VIRTUAL-S921 开卡后短时间内,通常几秒、最长约 90 秒),请稍后重试,不冻结资金 | 200 | 40000 |
card_recharge_disabled | Recharge is disabled for your account | 账号已被禁止充值 | 200 | 40000 |
user_not_active | The account is not active | 账号未处于正常状态 | 200 | 40000 |
recharge_disabled | Recharge is switched off for this card type / header / package | 该卡类型 / 卡头 / 套餐的充值已关闭 | 200 | 40000 |
card_type_not_support_recharge | This card type does not support recharge | 该卡类型不支持充值 | 200 | 40000 |
recharge_not_supported | The package has no recharge asset | 该套餐未配置充值资产 | 200 | 40000 |
card_type_mismatch | Package / card type mismatch (platform data) | 套餐与卡类型不匹配(平台数据问题) | 200 | 40000 |
account_currency_not_configured | Card account currency is not configured (platform configuration) | 卡内账户币种未配置(平台配置问题) | 200 | 40000 |
same_currency_not_allowed | Recharge asset equals the card currency (platform configuration) | 充值币种与卡内币种相同(平台配置问题) | 200 | 40000 |
unsupported_card_provider | Card provider not supported (platform configuration) | 暂不支持该卡提供商(平台配置问题) | 200 | 40000 |
exchange_rate_not_available | Exchange rate temporarily unavailable — retry later | 汇率暂不可用,请稍后重试 | 200 | 40000 |
card_status_not_rechargeable | The provider refused because of the card's status (closed / closing / frozen / not activated); funds already returned to the wallet | 提供方因卡状态拒绝充值(已注销 / 注销中 / 冻结 / 未激活),资金已退回钱包 | 200 | 40000 |
recharge_rejected | The provider refused the recharge synchronously (e.g. below the provider minimum); funds already returned to the wallet | 提供方同步拒绝充值(如低于提供方最低金额),资金已退回钱包 | 200 | 40000 |
openapi_recharge_failed | Unexpected server error — an order is not guaranteed; check /card/transactions/list before retrying | 服务端异常,不保证已建单;重试前先查 /card/transactions/list | 200 | 50000 |
Outcome unknown is not an error
If the provider call times out or fails with an ambiguous result, the order already exists and its funds are frozen. Since v1.5 the endpoint then returns the normal success envelope with status: 1 (processing); the final result arrives via the card.recharged / card.recharge_failed webhooks. Do not resend with a new Idempotency-Key in that case.
Business errors are replayed for 24 h
HTTP-200 errors (40000 / 50000) are stored under the Idempotency-Key like a success: resending the same key and body replays the same error for 24 hours. After fixing the cause (topping up the wallet, waiting for card_number_not_ready …), send a new key. See Idempotency.
Sensitive Card Information
These codes are returned by /openapi/card/info when with_sensitive=true cannot be honored, and by /openapi/card/sensitive/send_code. Sensitive fields require the card to be status=2 (active) plus either valid user second-factor codes or a verification-exempt credential.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
email_code_required | Please enter email verification code | 请输入邮箱验证码 | 403 | 40300 |
sms_code_required | Please enter SMS verification code | 请输入短信验证码 | 403 | 40300 |
pin_required | Please enter PIN | 请输入 PIN 码 | 403 | 40300 |
2fa_code_required | Please enter 2FA code | 请输入 2FA 验证码 | 403 | 40300 |
invalid_email_code | Invalid email verification code | 邮箱验证码错误 | 403 | 40300 |
invalid_sms_code | Invalid SMS verification code | 短信验证码错误 | 403 | 40300 |
invalid_pin | Invalid PIN | PIN 码错误 | 403 | 40300 |
invalid_2fa_code | Invalid 2FA code | 2FA 验证码错误 | 403 | 40300 |
email_not_verified | Email not verified | 邮箱未验证 | 403 | 40300 |
phone_not_verified | Phone not verified | 手机号未验证 | 403 | 40300 |
no_usable_auth_method | No usable authentication method | 无可用的认证方式 | 403 | 40300 |
card_sensitive_access_banned | Sensitive card info access via API has been disabled by the administrator | 通过 API 获取敏感卡片信息的权限已被管理员关闭 | 403 | 40300 |
openapi_sensitive_card_only_active | Sensitive card info is only available for active cards. | 仅激活状态的卡片可获取敏感信息 | 403 | 40300 |
too_many_requests | Too many requests (verification locked / send cooldown; honor Retry-After) | 请求过于频繁(验证锁定 / 发码冷却,遵循 Retry-After) | 429 | 42900 |
sms_country_not_supported | Phone numbers from this country or region are not supported at the moment (no code sent, cooldown released) | 该国家/地区的手机号暂时不在支持范围内(不发码,冷却已释放) | 200 | 40000 |
send_code_failed | Failed to send verification code (cooldown released, retry allowed) | 验证码发送失败(冷却已释放,可立即重试) | 200 | 50000 |
openapi_sensitive_card_info_disabled(403) is no longer returned: credentials without the verification exemption now fall back to the user second-factor path instead of being rejected outright.
Card List Filters
Returned by /cards/list.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_conflicting_card_filters | usable_only and statuses cannot be used together | usable_only 与 statuses 不能同时传 | 200 | 40000 |
openapi_invalid_status_value | statuses contains an invalid value (only 1-6 allowed) | statuses 含非法状态值(仅允许 1-6) | 200 | 40000 |
invalid_min_balance | min_balance must be a valid non-negative number | 最小余额必须是合法非负数字 | 200 | 40000 |
invalid_max_balance | max_balance must be a valid non-negative number | 最大余额必须是合法非负数字 | 200 | 40000 |
min_balance_exceeds_max_balance | min_balance must not exceed max_balance | 最小余额不能大于最大余额 | 200 | 40000 |
invalid_date_format | start_date / end_date must be YYYY-MM-DD | start_date / end_date 必须为 YYYY-MM-DD | 200 | 40000 |
Transaction Filters
Returned by /transactions/list and /card/transactions/list.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_invalid_card_id | card_id missing (required on /card/transactions/list) or malformed | card_id 缺失(/card/transactions/list 必填)或格式不正确 | 200 | 40000 |
card_not_found | The card_id does not exist or is not yours | card_id 对应的卡不存在或不属于当前账号 | 404 | 40400 |
invalid_date_format | transaction_time_from/to must be YYYY-MM-DD HH:MM:SS (the message text mentions YYYY-MM-DD; the time part is required here) | 交易时间格式必须为 YYYY-MM-DD HH:MM:SS(message 文案写的是 YYYY-MM-DD,此处必须带时分秒) | 200 | 40000 |
invalid_params | Invalid parameters — a bad amount format, or a type_category outside the allowed values | 参数无效:金额格式错误,或 type_category 不在允许取值内 | 200 | 40000 |
Freeze / Unfreeze
Returned by /card/freeze and /card/unfreeze. Both also return openapi_invalid_card_id (malformed), card_not_found (404) and openapi_card_type_not_supported.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
card_already_frozen | (freeze) Card is already frozen — treat as "already in the target state" | (冻结)卡片已被冻结,可视为已处于目标状态 | 200 | 40000 |
card_status_cannot_freeze | (freeze) Current card status does not allow freezing (pending / closing / closed / failed) | (冻结)当前卡状态不可冻结(开卡中 / 注销中 / 已注销 / 开卡失败) | 200 | 40000 |
card_not_frozen | (unfreeze) Card is not frozen | (解冻)卡片未被冻结 | 200 | 40000 |
card_type_mismatch | Card type does not match | 卡类型与配置不匹配 | 200 | 40000 |
operation_not_supported | Operation not supported for this card type | 该操作不支持 | 200 | 40000 |
recharge_unfreeze_disabled | Recharge-based unfreeze is not available for this card | 该卡不允许通过充值自动解冻 | 200 | 40000 |
unauthorized_unfreeze_admin | (unfreeze) Frozen by admin — cannot self-unfreeze | (解冻)该卡片被管理员冻结,用户无法自行解冻 | 403 | 40300 |
unauthorized_unfreeze_risk | (unfreeze) Frozen by risk control — cannot self-unfreeze | (解冻)该卡片被风控冻结 | 403 | 40300 |
unauthorized_unfreeze_system | (unfreeze) Frozen by system — cannot self-unfreeze | (解冻)该卡片被系统冻结 | 403 | 40300 |
openapi_freeze_card_failed / openapi_unfreeze_card_failed | Unexpected server error | 服务端异常 | 200 | 50000 |
Before v1.5, freezing an already-frozen card returned
card_status_cannot_freeze; it now returnscard_already_frozen. A successful freeze / unfreeze also emits thecard.status_changedwebhook.
Close Card
Returned by /card/close (v1.3 — the endpoint has been live since v1.2 but undocumented). Also returns openapi_invalid_card_id, card_not_found (404), openapi_card_type_not_supported, card_type_mismatch and operation_not_supported.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
card_is_closing | Card is being closed | 卡片正在注销中 | 200 | 40000 |
card_already_closed | Card is already closed | 卡片已注销 | 200 | 40000 |
card_frozen_cannot_close | Card is frozen and cannot be cancelled | 卡片已冻结,无法注销 | 200 | 40000 |
card_status_cannot_close | Current card status does not allow cancellation | 当前卡状态不可注销 | 200 | 40000 |
close_not_accepted_by_upstream | Closure not accepted by the provider; the card has been restored to active — retry later | 销卡未被上游受理,卡片已恢复为可用状态,请稍后重试 | 200 | 40000 |
card_upstream_closed_pending_reconcile | Card was already closed by the provider and awaits manual refund reconciliation | 该卡已被上游直接注销,正在等待人工对账退款 | 200 | 40000 |
card_config_not_found | Card configuration not found | 卡配置不存在 | 200 | 40000 |
openapi_close_card_failed | Failed to close card | 销卡失败 | 200 | 50000 |
Cardholder Name / Billing Address
Returned by /card/holder_name/update, /card/billing_address/generate and /card/billing_address/update (v1.5.1). Also returns openapi_invalid_card_id, card_not_found (404) and openapi_card_type_not_supported. For field-level errors the message names the field / limit; the error_key stays the same.
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
card_holder_info_not_editable | The cardholder name and billing address can only be changed while the card is active (status=2) | 仅激活状态(status=2)的卡片可修改持卡人姓名和账单地址 | 200 | 40000 |
billing_address_managed_by_cardholder | 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) | 该卡使用持卡人开立,账单地址取自持卡人资料,不能重新生成或修改(v1.6.1) | 200 | 40000 |
card_holder_name_required | Cardholder name missing or blank | 持卡人姓名缺失或只有空白 | 200 | 40000 |
card_holder_name_length_exceeded | Cardholder name longer than 100 characters (the message includes the limit) | 持卡人姓名超过 100 个字符(message 含上限) | 200 | 40000 |
card_holder_name_invalid_characters | Cardholder name contains control characters such as line breaks or tabs | 持卡人姓名含换行、制表符等控制字符 | 200 | 40000 |
invalid_country_code | country / country_code is not a two-letter ISO 3166-1 alpha-2 code | country / country_code 不是两位字母的 ISO 3166-1 alpha-2 代码 | 200 | 40000 |
billing_address_field_required | A required billing-address field is missing or blank (the message names the field) | 账单地址必填字段缺失或只有空白(message 含字段名) | 200 | 40000 |
billing_address_field_length_exceeded | A billing-address field is too long (the message names the field and the limit) | 账单地址字段超长(message 含字段名与上限) | 200 | 40000 |
billing_address_field_invalid_characters | A billing-address field contains control characters (the message names the field) | 账单地址字段含控制字符(message 含字段名) | 200 | 40000 |
billing_address_country_pool_empty | (generate) No address available for this country — choose another | (生成)该国家暂无可用地址,请换一个国家 | 200 | 40000 |
openapi_update_card_holder_name_failed / openapi_generate_billing_address_failed / openapi_update_billing_address_failed | Unexpected server error — safe to retry | 服务端异常,可直接重试 | 200 | 50000 |
Cardholders
Returned by the cardholder endpoints (v1.6) and by /card/apply with a cardholder_id or, since v1.6.6, with a billing_address (the profile-validation keys below with data.field under billing_address.*). Some carry a data object with details — field, cardholder_id, header_id, review_status, failure_reason, terminal, issues, missing_fields, retry_after_seconds, max_pages; see Error details.
Profile validation (data.field names the field). Since v1.6.8 cardholder create / update only check the issuer's platform baseline (formats and storage limits); character sets, age, ID expiry and which fields a header needs are reported as issues by /cardholder/check, /cardholder/submit and card issuance
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
cardholder_field_required | 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) | 缺少必填资料(first_name / last_name / birth_date / email / area_code / mobile_number;重试草稿登记时还可能是 identity.number,见修改持卡人) | 200 | 40000 |
cardholder_field_too_long | A field exceeds its storage limit (names 32; address state 20, city / district / line1 / line2 70, postcode 10 characters) | 资料超出存储上限(名 / 姓 32;地址 state 20,city / district / line1 / line2 70,postcode 10 个字符) | 200 | 40000 |
cardholder_birth_date_invalid | Date of birth must be YYYY-MM-DD | 出生日期格式须为 YYYY-MM-DD | 200 | 40000 |
cardholder_gender_invalid | Gender must be 1 or 2 | 性别只能是 1 或 2 | 200 | 40000 |
cardholder_country_code_invalid | Country code must be two upper-case letters (ISO 3166-1 alpha-2) | 国家或地区代码须为两位大写字母(ISO 3166-1 alpha-2) | 200 | 40000 |
cardholder_email_invalid | Invalid email | 邮箱格式无效 | 200 | 40000 |
cardholder_area_code_invalid | Area code must be + followed by 1–4 digits | 手机区号须为 + 加 1–4 位数字 | 200 | 40000 |
cardholder_mobile_number_invalid | Mobile number must be 4–30 digits | 手机号须为 4–30 位数字 | 200 | 40000 |
cardholder_ssn_invalid | SSN must be 9 digits | 社会安全号须为 9 位数字 | 200 | 40000 |
cardholder_id_type_invalid | ID type must be ID_CARD / PASSPORT / HK_HKID / DLN / RESIDENCE_PERMIT | 证件类型只能是 ID_CARD / PASSPORT / HK_HKID / DLN / RESIDENCE_PERMIT | 200 | 40000 |
cardholder_id_number_invalid | ID number: up to 64 letters, digits or hyphens | 证件号码最多 64 位,只能包含字母、数字和连字符 | 200 | 40000 |
cardholder_date_invalid | Date must be YYYY-MM-DD | 日期格式须为 YYYY-MM-DD | 200 | 40000 |
cardholder_address_incomplete | An address needs country, state, city, line 1 and postcode (only billing_address on /card/apply without a cardholder) | 地址须包含国家、州 / 省、城市、地址第一行和邮编(仅不用持卡人时 /card/apply 的 billing_address) | 200 | 40000 |
cardholder_address_line_invalid | Address may only contain English letters, digits, spaces and , . ' / # ( ) - & (only billing_address on /card/apply without a cardholder) | 地址只能包含英文字母、数字、空格及 , . ' / # ( ) - &(仅不用持卡人时 /card/apply 的 billing_address) | 200 | 40000 |
cardholder_postcode_invalid | Postcode must be 4–10 letters or digits (only billing_address on /card/apply without a cardholder) | 邮编须为 4–10 位字母或数字(仅不用持卡人时 /card/apply 的 billing_address) | 200 | 40000 |
cardholder_poa_info_required | A new proof of address needs its issue date and issuing country in the same request | 上传或替换地址证明须同时填写出具日期和出具国家 | 200 | 40000 |
cardholder_poa_issue_date_in_future | Proof-of-address issue date cannot be after today | 地址证明出具日期不能晚于今天 | 200 | 40000 |
cardholder_external_id_invalid | external_id: up to 128 letters, digits or - _ . | external_id 最多 128 位,只能包含字母、数字及 - _ . | 200 | 40000 |
cardholder_name_immutable | The name cannot change after registration | 持卡人登记后不能修改姓名 | 200 | 40000 |
Cardholder state
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
cardholder_not_found | Cardholder not found on your account (or not registered through OpenAPI) | 持卡人不存在(或不是通过 OpenAPI 登记的) | 404 | 40400 |
cardholder_not_registered | Registration not completed (draft) — fix and update | 持卡人尚未完成登记(草稿),修改后调用 update | 200 | 40000 |
cardholder_identity_public_figure | AI check: this cardholder identity cannot be used to open cards — the create / update was not saved | AI 审核:持卡人身份不能用于开卡,本次登记 / 修改未保存 | 200 | 40000 |
cardholder_id_number_mismatch | AI check: the ID number does not match the identity document image — the create / update was not saved | AI 审核:证件号码与证件影像上的不一致,本次登记 / 修改未保存 | 200 | 40000 |
cardholder_name_mismatch | AI check: the name does not match the identity document image — the create / update was not saved | AI 审核:姓名与证件影像上的不一致,本次登记 / 修改未保存 | 200 | 40000 |
cardholder_birth_date_mismatch | AI check: the date of birth does not match the identity document image | AI 审核:出生日期与证件影像上的不一致 | 200 | 40000 |
cardholder_gender_mismatch | AI check: the gender does not match the identity document image | AI 审核:性别与证件影像上的不一致 | 200 | 40000 |
cardholder_nationality_mismatch | AI check: the nationality does not match the identity document image | AI 审核:国籍与证件影像上的不一致 | 200 | 40000 |
cardholder_id_type_mismatch | AI check: identity.type does not match the uploaded document | AI 审核:证件类型与上传的证件不一致 | 200 | 40000 |
cardholder_id_issue_country_mismatch | AI check: the issuing country / region does not match the identity document image | AI 审核:签发国家 / 地区与证件影像上的不一致 | 200 | 40000 |
cardholder_id_issue_date_mismatch | AI check: the issue date does not match the identity document image | AI 审核:签发日期与证件影像上的不一致 | 200 | 40000 |
cardholder_id_expiry_date_mismatch | AI check: the expiry date does not match the identity document image | AI 审核:到期日期与证件影像上的不一致 | 200 | 40000 |
cardholder_manual_review_pending | The cardholder is under platform manual review — cards can be opened after approval | 持卡人在平台人工审核中,审核通过后才能开卡 | 200 | 40000 |
cardholder_manual_review_rejected | The cardholder did not pass platform manual review and cannot be used to open cards | 持卡人未通过平台人工审核,不能用于开卡 | 200 | 40000 |
cardholder_under_review | Under review — only email can be changed | 审核中,仅可修改 email | 200 | 40000 |
cardholder_busy | Another operation on this cardholder (or another create on your account) is in progress — retry shortly with a new Idempotency-Key | 该持卡人(或本账户的另一个登记请求)正在处理中,请稍后用新的 Idempotency-Key 重试 | 200 | 40000 |
cardholder_only_draft_deletable | Only drafts can be deleted | 只有草稿可以删除 | 200 | 40000 |
cardholder_legacy_card_invalid | legacy_card_id is not one of your legacy card candidates | legacy_card_id 不是可复用持卡人的旧卡 | 200 | 40000 |
cardholder_already_registered | This person is already registered as another cardholder on your account | 该持卡人已在本账户登记为另一位持卡人 | 200 | 40000 |
cardholder_source_mismatch | The external_id belongs to a cardholder registered through another channel | 该 external_id 属于通过其他渠道登记的持卡人 | 200 | 40000 |
Files
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
cardholder_file_purpose_invalid | purpose missing or invalid | purpose 缺失或无效 | 200 | 40000 |
cardholder_file_empty | No file, or the file is empty | 未上传文件或文件为空 | 200 | 40000 |
cardholder_file_too_large | File larger than 2 MB | 文件超过 2 MB | 200 | 40000 |
cardholder_file_type_unsupported | Only JPG / PNG / PDF | 只支持 JPG / PNG / PDF | 200 | 40000 |
cardholder_file_rejected | File invalid (unsupported format or damaged) — upload another | 影像无效(格式不支持或内容损坏),请重新上传 | 200 | 40000 |
cardholder_upload_busy | Too many uploads — retry later | 上传繁忙,请稍后重试 | 200 | 40000 |
cardholder_file_not_identity_document | AI check: the file is not an identity document | AI 审核:上传的不是证件 | 200 | 40000 |
cardholder_file_no_person_holding_document | AI check: the hand-held photo does not show the person holding the document | AI 审核:手持证件照里没有本人手持证件 | 200 | 40000 |
cardholder_file_specimen | AI check: specimen or template document | AI 审核:样本或模板证件 | 200 | 40000 |
cardholder_file_unreadable | AI check: the document is not readable (blurry, dark, glare or covered) | AI 审核:证件看不清(模糊、过暗、反光或被遮挡) | 200 | 40000 |
cardholder_file_public_figure | AI check: the identity on this document cannot be used to open cards | AI 审核:证件上的身份不能用于开卡 | 200 | 40000 |
cardholder_file_edited | AI check: the document photo appears to have been edited or altered | AI 审核:证件照疑似经过修图或篡改 | 200 | 40000 |
cardholder_file_data_inconsistent | AI check: the data on the document is inconsistent (e.g. the MRZ does not match the printed details) | AI 审核:证件信息前后不一致(如机读区与印刷信息不符) | 200 | 40000 |
cardholder_file_screen_capture | AI check: a screenshot or a photo of a screen | AI 审核:截图或翻拍屏幕的照片 | 200 | 40000 |
cardholder_file_digital_copy | AI check: not a photo of the original document (downloaded, electronic or composited image) | AI 审核:不是拍摄证件原件得到的图片(网上下载、电子版或合成图) | 200 | 40000 |
cardholder_file_side_mismatch | AI check: the side does not match the upload slot | AI 审核:证件面与上传位置不符 | 200 | 40000 |
cardholder_ai_check_too_frequent | Too many AI checks for this account — retry after data.retry_after_seconds with a new Idempotency-Key | 本账户 AI 审核次数超过上限 —— data.retry_after_seconds 秒后用新的 Idempotency-Key 重试 | 200 | 40000 |
cardholder_file_pdf_too_many_pages | The identity document PDF has too many pages (data.max_pages) | 证件 PDF 页数超过上限(data.max_pages) | 200 | 40000 |
cardholder_file_pdf_not_accepted | PDF is not accepted for identity documents — upload a JPG / PNG photo | 证件照不接受 PDF —— 请上传 JPG / PNG 照片 | 200 | 40000 |
cardholder_file_pdf_unreadable | The PDF's pages cannot be counted (encrypted or damaged) | 无法识别 PDF 的页数(加密或损坏) | 200 | 40000 |
cardholder_file_not_found | File not found on your account (data.field names the slot) | 影像不存在或不属于本账户(data.field 指明位置) | 404 | 40400 |
cardholder_file_purpose_mismatch | The file was uploaded for a different slot | 影像用途与所填位置不符 | 200 | 40000 |
cardholder_file_expired | The unreferenced file has expired — upload again | 影像已过期,请重新上传 | 200 | 40000 |
cardholder_file_in_use | The file is used by another cardholder — upload again | 影像已被其他持卡人使用,请重新上传 | 200 | 40000 |
Review and identity verification
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
cardholder_headers_required | Give at least one header | 请至少选择一个卡头 | 200 | 40000 |
cardholder_headers_too_many | At most 20 headers per call | 一次最多 20 个卡头 | 200 | 40000 |
cardholder_header_not_found | Card header not found | 卡头不存在 | 404 | 40400 |
cardholder_header_unsupported | The header does not use cardholders | 该卡头不使用持卡人 | 200 | 40000 |
cardholder_header_bin_missing | The header is temporarily unavailable for cardholders — contact us | 该卡头暂不可用于持卡人,请联系我们 | 200 | 40000 |
cardholder_header_bin_unavailable | The header's issuer card BIN has been disabled or does not exist (the issuer rejected it) — choose another header or contact us | 该卡头关联的发卡方卡段已停用或不存在,请换其他卡头或联系我们 | 200 | 40000 |
cardholder_billing_country_unsupported | 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 cardholder | 该卡不支持此账单国家或地区,请换一个国家 —— 仅由 /cardholder/billing_address/random 在卡头要求持卡人时返回(data.field=country) | 200 | 40000 |
cardholder_random_address_unavailable | (/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) | (/cardholder/billing_address/random)暂时无法生成该国家或地区的地址,请换一个国家或手动填写(data.field=country) | 200 | 40000 |
cardholder_kyc_level_not_required | The header does not require identity verification | 该卡头不需要身份认证 | 200 | 40000 |
cardholder_kyc_not_allowed | The verification this header requires was rejected and no retries are left | 该卡头要求的身份认证已被拒绝且重试次数已用完 | 200 | 40000 |
cardholder_kyc_not_in_progress | No verification is in progress for this cardholder | 该持卡人没有进行中的身份认证 | 200 | 40000 |
cardholder_kyc_cancel_linked | A verification started by linking an existing verification cannot be cancelled — the result is pushed automatically | 关联已有认证发起的身份认证不能取消,结果会自动推送 | 200 | 40000 |
cardholder_kyc_already_verified | The verification this header requires has already passed — submit for review directly | 该卡头要求的身份认证已通过,请直接提交审核 | 200 | 40000 |
cardholder_kyc_in_review | Another verification of this cardholder is under review — start again after it concludes | 持卡人另一项身份认证正在审核中,请在其结束后再发起 | 200 | 40000 |
cardholder_kyc_link_in_progress | A linked verification is still being processed — wait for the result instead of starting a new one | 关联已有认证的结果还在处理,请等待结果,不要另行发起 | 200 | 40000 |
cardholder_requirement_unavailable | The header's cardholder requirements are temporarily unavailable — retry later | 该卡头的持卡人要求暂不可用,请稍后重试 | 200 | 50000 |
cardholder_conflict | The mobile number or ID number is already used by another cardholder | 手机号或证件号已被其他持卡人使用 | 200 | 40000 |
cardholder_provider_invalid_params | The data was rejected during registration / review — check it | 资料未通过校验,请检查后重试 | 200 | 40000 |
cardholder_provider_status_not_allowed | The cardholder's current status does not allow this operation | 持卡人当前状态不允许该操作 | 200 | 40000 |
cardholder_provider_unavailable | Cardholder service temporarily unavailable — retry later. On create / update of a draft, data.cardholder_id is the saved draft: retry with update | 持卡人服务暂不可用,请稍后重试。登记 / 修改草稿时 data.cardholder_id 为已保存的草稿,请对其调用 update 重试 | 200 | 50000 |
cardholder_service_not_configured | Cardholder service not enabled — contact us | 持卡人服务未开通,请联系我们 | 200 | 50000 |
openapi_cardholder_failed | Unexpected server error on a cardholder endpoint | 持卡人接口服务端异常 | 200 | 50000 |
Opening cards (/card/apply)
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
cardholder_required | The header requires an approved cardholder (cardholder_id) | 该卡头须使用已审核通过的持卡人(cardholder_id) | 200 | 40000 |
cardholder_review_not_approved | Not approved for this card type, or the reviewed information does not cover this header (data.review_status, data.failure_reason, data.terminal) | 该持卡人在此卡类型尚未审核通过,或已审核资料不覆盖该卡头(data.review_status、data.failure_reason、data.terminal) | 200 | 40000 |
cardholder_kyc_level_not_passed | Identity verification required by this header not passed (data.header_id) — start it with /cardholder/kyc/init | 尚未通过该卡头要求的身份认证(data.header_id)—— 用 /cardholder/kyc/init 发起 | 200 | 40000 |
cardholder_requirements_unmet | The issuer's precheck found materials or restrictions this header does not accept (data.header_id, data.issues, data.missing_fields); no funds frozen | 发卡方预检发现该卡头不接受的资料或限制(data.header_id、data.issues、data.missing_fields);未冻结资金 | 200 | 40000 |
cardholder_card_limit_reached | The cardholder has reached the card limit on this header | 该持卡人在此卡头的开卡数已达上限 | 200 | 40000 |
cardholder_kyc_not_configured | The header requires identity verification but it is not configured — contact us | 该卡头要求身份认证但尚未配置,请联系我们 | 200 | 40000 |
bank_card_apply_cardholder_requirements_unmet | The cardholder does not meet this card's requirements (frozen funds returned) | 持卡人不满足该卡的开卡要求(冻结资金已退回) | 200 | 40000 |
bank_card_apply_cardholder_disabled | The cardholder cannot open cards at the moment (frozen funds returned) — contact us | 该持卡人当前不可用于开卡(冻结资金已退回),请联系我们 | 200 | 40000 |
Server Errors
| error_key | en-US | zh-CN | HTTP | code |
|---|---|---|---|---|
openapi_internal_error | OpenAPI internal error (e.g. the idempotency store is temporarily unavailable) | OpenAPI 内部错误(如幂等存储暂不可用) | 200 | 50000 |
openapi_list_card_headers_failed | Failed to list card headers | 查询卡头列表失败 | 200 | 50000 |
openapi_list_card_configs_failed | Failed to list card configs | 查询卡配置列表失败 | 200 | 50000 |
openapi_apply_card_failed | Failed to apply virtual card | 申请虚拟卡失败 | 200 | 50000 |
openapi_first_deposit_preview_failed | Failed to preview first deposit | 首充预览失败 | 200 | 50000 |
openapi_recharge_failed | Failed to recharge | 充值失败 | 200 | 50000 |
openapi_get_card_info_failed | Failed to get card info | 获取卡片信息失败 | 200 | 50000 |
openapi_list_cards_failed | Failed to list cards | 查询卡列表失败 | 200 | 50000 |
openapi_webhook_service_unavailable | Webhook service unavailable | Webhook 服务不可用 | 200 | 50000 |
openapi_list_webhook_events_failed | Failed to list webhook events | 查询 Webhook 事件历史失败 | 200 | 50000 |
openapi_list_transactions_failed | Failed to list transactions | 查询交易明细失败 | 200 | 50000 |
openapi_freeze_card_failed | Failed to freeze card | 冻结卡片失败 | 200 | 50000 |
openapi_unfreeze_card_failed | Failed to unfreeze card | 解冻卡片失败 | 200 | 50000 |
openapi_close_card_failed | Failed to close card | 销卡失败 | 200 | 50000 |
openapi_update_card_holder_name_failed | Failed to update the cardholder name | 修改持卡人姓名失败 | 200 | 50000 |
openapi_generate_billing_address_failed | Failed to generate a billing address | 生成账单地址失败 | 200 | 50000 |
openapi_update_billing_address_failed | Failed to save the billing address | 保存账单地址失败 | 200 | 50000 |
openapi_cardholder_failed | Failed to process the cardholder request | 持卡人请求处理失败 | 200 | 50000 |
send_code_failed | Failed to send verification code | 验证码发送失败 | 200 | 50000 |
internal_error | Unhandled server crash | 服务端未捕获的异常 | 500 | 50000 |
Recommended Handling
def handle_response(http_status: int, resp: dict):
code = resp.get("code")
key = resp.get("error_key", "")
# 1. Success first. HTTP 200 alone is NOT success.
if code == 0:
return resp["data"]
# 2. Envelope missing (proxy error page, unknown path): fall back to HTTP status
if code is None:
if http_status == 429:
raise RateLimited()
raise ServerError(f"HTTP {http_status}")
# 3. Classes with a real HTTP status
if code == 40100:
# Always openapi_invalid_credentials
raise AuthError("invalid credentials — check AppID/Secret/clock/signing input")
if code == 40300:
# Authenticated, but this specific request is gated
if key.endswith("_required"):
raise PermissionError(f"Second factor missing ({key}) — "
"call /openapi/card/sensitive/send_code, then resubmit")
if key.startswith("invalid_"):
raise PermissionError(f"Second factor rejected: {key}")
raise PermissionError(f"Forbidden: {key}") # e.g. 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() # first request still running
raise IdempotencyConflict() # same key, different body: don't retry
if code == 42900:
raise RateLimited() # honor the Retry-After header
# 4. Business rules (HTTP 200): branch on error_key
if key == "insufficient_balance":
raise BalanceError()
if key == "kyc_required":
raise KYCError()
if key == "card_number_not_ready":
raise RetryLater() # S921 number not issued yet
if key in ("openapi_invalid_card_id", "openapi_invalid_header_id", "openapi_invalid_package_id"):
raise ValueError(f"bad ID: {key}")
# 5. Server-side failure (HTTP 200 or 500)
if code == 50000:
# Write endpoints: check the resulting state before retrying with a NEW Idempotency-Key
raise ServerError(key)
raise ApiError(code, key, resp.get("message"))Localization
The message language is taken from the Accept-Language header, then the X-Language header, then the ?lang= query parameter (a query parameter is part of the signed RAW_QUERY, see HMAC Authentication). Only the first language tag is used; q weights are ignored.
Accept-Language: en-US| Value | message language |
|---|---|
| Not sent | English (en-US) |
en-US / en | English |
zh-CN / zh / zh-Hans | Simplified Chinese |
zh-HK / zh-TW / zh-Hant / zh-MO | Traditional Chinese |
| Other languages supported by the platform | That language (may be machine-translated) |
| Unsupported | English |
English, Simplified Chinese and Traditional Chinese are maintained by hand; a text missing in one language falls back to another. error_key is independent of the language and always stable.