# 错误代码 (/zh/docs/cartao/error-codes)

<QuickLinks>
  <QuickLink href="/docs/cartao/endpoints/charges/post_charges" title="创建收款" method="POST" path="/charges" />

  <QuickLink href="/docs/cartao/transaction-status" title="交易状态" />

  <QuickLink href="/docs/cartao/abecs-codes" title="ABECS 代码" />

  <QuickLink href="/docs/cartao/retry-program" title="卡组织重试计划" />
</QuickLinks>

收单机构在出错时提供的返回代码，用于标识失败原因。在卡 API 中，它们通过收款的 `returnCode` 和 `returnMessage` 字段暴露。

<Callout type="warn">
  同一个数字在不同表中含义不同：`121` 在下方收单机构表中表示 `Customer is required`，在 Amex 的 [ABECS](/docs/cartao/abecs-codes) 表中表示“余额/额度不足”。系统内部的流程判断请使用[`status` 和 `reasonCode`](/docs/cartao/transaction-status)，它们只有一套取值。
</Callout>

## 收单机构代码 [#收单机构代码]

| 代码（`returnCode`） | 消息（`returnMessage`）                                                                                            | 描述                                                |
| ---------------- | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| 0                | Internal error                                                                                                 | 发送的数据超出字段长度限制。                                    |
| 100              | RequestId is required                                                                                          | 发送的字段为空或无效。                                       |
| 101              | MerchantId is required                                                                                         | 发送的字段为空或无效。                                       |
| 102              | Payment Type is required                                                                                       | 发送的字段为空或无效。                                       |
| 103              | Payment Type can only contain letters                                                                          | 不允许使用特殊字符。                                        |
| 104              | Customer Identity is required                                                                                  | 发送的字段为空或无效。                                       |
| 105              | Customer Name is required                                                                                      | 发送的字段为空或无效。                                       |
| 106              | Transaction ID is required                                                                                     | 发送的字段为空或无效。                                       |
| 107              | OrderId is invalid or does not exist                                                                           | 发送的字段超出长度限制或包含特殊字符。                               |
| 108              | Amount must be greater or equal to zero                                                                        | 交易金额必须大于或等于“0”。                                   |
| 109              | Payment Currency is required                                                                                   | 发送的字段为空或无效。                                       |
| 110              | Invalid Payment Currency                                                                                       | 发送的字段为空或无效。                                       |
| 111              | Payment Country is required                                                                                    | 发送的字段为空或无效。                                       |
| 112              | Invalid Payment Country                                                                                        | 发送的字段为空或无效。                                       |
| 113              | Invalid Payment Code                                                                                           | 发送的字段为空或无效。                                       |
| 114              | The provided MerchantId is not in correct format                                                               | 发送的 MerchantId 不是 GUID。                           |
| 115              | The provided MerchantId was not found                                                                          | MerchantId 不存在或属于其他环境（例如 sandbox）。                |
| 116              | The provided MerchantId is blocked                                                                             | 店铺已被冻结，请联系电商支持团队。                                 |
| 117              | Credit Card Holder is required                                                                                 | 发送的字段为空或无效。                                       |
| 118              | Credit Card Number is required                                                                                 | 发送的字段为空或无效。                                       |
| 119              | At least one Payment is required                                                                               | 未发送 Payment 节点。                                   |
| 120              | Request IP not allowed. Check your IP White List                                                               | 出于安全原因该 IP 已被拦截。                                  |
| 121              | Customer is required                                                                                           | 未发送 Customer 节点。                                  |
| 122              | MerchantOrderId is required                                                                                    | 发送的字段为空或无效。                                       |
| 123              | Installments must be greater or equal to one                                                                   | 分期数必须大于或等于 1。                                     |
| 124              | Credit Card is Required                                                                                        | 发送的字段为空或无效。                                       |
| 125              | Credit Card Expiration Date is required                                                                        | 发送的字段为空或无效。                                       |
| 126              | Credit Card Expiration Date is invalid                                                                         | 发送的字段为空或无效。                                       |
| 127              | You must provide CreditCard Number                                                                             | 信用卡卡号为必填项。                                        |
| 128              | Card Number length exceeded                                                                                    | 卡号超过 16 位。                                        |
| 129              | Affiliation not found                                                                                          | 支付方式未绑定到店铺，或 Provider 无效。                         |
| 130              | Could not get Credit Card                                                                                      | \*\*\*                                            |
| 131              | MerchantKey is required                                                                                        | 发送的字段为空或无效。                                       |
| 132              | MerchantKey is invalid                                                                                         | 发送的 MerchantKey 无效。                               |
| 133              | Provider is not supported for this Payment Type                                                                | 发送的 Provider 不存在。                                 |
| 134              | FingerPrint length exceeded                                                                                    | 发送的数据超出字段长度限制。                                    |
| 135              | MerchantDefinedFieldValue length exceeded                                                                      | 发送的数据超出字段长度限制。                                    |
| 136              | ItemDataName length exceeded                                                                                   | 发送的数据超出字段长度限制。                                    |
| 137              | ItemDataSKU length exceeded                                                                                    | 发送的数据超出字段长度限制。                                    |
| 138              | PassengerDataName length exceeded                                                                              | 发送的数据超出字段长度限制。                                    |
| 139              | PassengerDataStatus length exceeded                                                                            | 发送的数据超出字段长度限制。                                    |
| 140              | PassengerDataEmail length exceeded                                                                             | 发送的数据超出字段长度限制。                                    |
| 141              | PassengerDataPhone length exceeded                                                                             | 发送的数据超出字段长度限制。                                    |
| 142              | TravelDataRoute length exceeded                                                                                | 发送的数据超出字段长度限制。                                    |
| 143              | TravelDataJourneyType length exceeded                                                                          | 发送的数据超出字段长度限制。                                    |
| 144              | TravelLegDataDestination length exceeded                                                                       | 发送的数据超出字段长度限制。                                    |
| 145              | TravelLegDataOrigin length exceeded                                                                            | 发送的数据超出字段长度限制。                                    |
| 146              | SecurityCode length exceeded                                                                                   | 发送的数据超出字段长度限制。                                    |
| 147              | Address Street length exceeded                                                                                 | 发送的数据超出字段长度限制。                                    |
| 148              | Address Number length exceeded                                                                                 | 发送的数据超出字段长度限制。                                    |
| 149              | Address Complement length exceeded                                                                             | 发送的数据超出字段长度限制。                                    |
| 150              | Address ZipCode length exceeded                                                                                | 发送的数据超出字段长度限制。                                    |
| 151              | Address City length exceeded                                                                                   | 发送的数据超出字段长度限制。                                    |
| 152              | Address State length exceeded                                                                                  | 发送的数据超出字段长度限制。                                    |
| 153              | Address Country length exceeded                                                                                | 发送的数据超出字段长度限制。                                    |
| 154              | Address District length exceeded                                                                               | 发送的数据超出字段长度限制。                                    |
| 155              | Customer Name length exceeded                                                                                  | 发送的数据超出字段长度限制。                                    |
| 156              | Customer Identity length exceeded                                                                              | 发送的数据超出字段长度限制。                                    |
| 157              | Customer IdentityType length exceeded                                                                          | 发送的数据超出字段长度限制。                                    |
| 158              | Customer Email length exceeded                                                                                 | 发送的数据超出字段长度限制。                                    |
| 159              | ExtraData Name length exceeded                                                                                 | 发送的数据超出字段长度限制。                                    |
| 160              | ExtraData Value length exceeded                                                                                | 发送的数据超出字段长度限制。                                    |
| 161              | Boleto Instructions length exceeded                                                                            | 发送的数据超出字段长度限制。                                    |
| 162              | Boleto Demostrative length exceeded                                                                            | 发送的数据超出字段长度限制。                                    |
| 163              | Return Url is required                                                                                         | 回调 URL 无效。回调 URL 中不接受分页参数或扩展名（例如 PHP）。            |
| 166              | AuthorizeNow is required                                                                                       | \*\*\*                                            |
| 167              | Antifraud not configured                                                                                       | 反欺诈服务未绑定到商户档案。                                    |
| 168              | Recurrent Payment not found                                                                                    | 未找到循环扣款。                                          |
| 169              | Recurrent Payment is not active                                                                                | 循环扣款未处于激活状态，执行已暂停。                                |
| 170              | Cartão Protegido not configured                                                                                | Cartão Protegido（受保护卡）未绑定到商户档案。                   |
| 171              | Affiliation data not sent                                                                                      | 订单处理失败，请联系电商支持团队。                                 |
| 172              | Credential Code is required                                                                                    | 发送的凭据验证失败。                                        |
| 173              | Payment method is not enabled                                                                                  | 支付方式未绑定到商户档案。                                     |
| 174              | Card Number is required                                                                                        | 发送的字段为空或无效。                                       |
| 175              | EAN is required                                                                                                | 发送的字段为空或无效。                                       |
| 176              | Payment Currency is not supported                                                                              | 发送的字段为空或无效。                                       |
| 177              | Card Number is invalid                                                                                         | 发送的字段为空或无效。                                       |
| 178              | EAN is invalid                                                                                                 | 发送的字段为空或无效。                                       |
| 179              | The max number of installments allowed for recurring payment is 1                                              | 发送的字段为空或无效。                                       |
| 180              | The provided Card PaymentToken was not found                                                                   | 未找到受保护卡的 token。                                   |
| 181              | The MerchantIdJustClick is not configured                                                                      | 受保护卡的 token 已被冻结。                                 |
| 182              | Brand is required                                                                                              | 未发送卡组织信息。                                         |
| 183              | Invalid customer bithdate                                                                                      | 出生日期无效或为未来日期。                                     |
| 184              | Request could not be empty                                                                                     | 请求格式错误，请检查发送的代码。                                  |
| 185              | Brand is not supported by selected provider                                                                    | 支付网关 API 不支持该卡组织。                                 |
| 186              | The selected provider does not support the options provided (Capture, Authenticate, Recurrent or Installments) | 支付方式不支持发送的指令。                                     |
| 187              | ExtraData Collection contains one or more duplicated names                                                     | \*\*\*                                            |
| 188              | Avs with CPF invalid                                                                                           | \*\*\*                                            |
| 189              | Avs with length of street exceeded                                                                             | 发送的数据超出字段长度限制。                                    |
| 190              | Avs with length of number/complement exceeded                                                                  | 发送的数据超出字段长度限制（地址门牌号或补充信息）。                        |
| 191              | Avs with length of district exceeded                                                                           | 发送的数据超出字段长度限制。                                    |
| 192              | Avs with zip code invalid                                                                                      | 发送的邮政编码（CEP）无效。                                   |
| 193              | Split Amount must be greater than zero                                                                         | SPLIT 分账金额必须大于 0。                                 |
| 194              | Split Establishment is Required                                                                                | 店铺档案未启用 SPLIT 分账。                                 |
| 195              | PlatformId is required                                                                                         | 未发送平台校验标识。                                        |
| 196              | DeliveryAddress is required                                                                                    | 未发送必填字段。                                          |
| 197              | Street is required                                                                                             | 未发送必填字段。                                          |
| 198              | Number is required                                                                                             | 未发送必填字段。                                          |
| 199              | ZipCode is required                                                                                            | 未发送必填字段。                                          |
| 200              | City is required                                                                                               | 未发送必填字段。                                          |
| 201              | State is required                                                                                              | 未发送必填字段。                                          |
| 202              | District is required                                                                                           | 未发送必填字段。                                          |
| 203              | Cart item name is required                                                                                     | 未发送必填字段。                                          |
| 204              | Cart item quantity is required                                                                                 | 未发送必填字段。                                          |
| 205              | Cart item type is required                                                                                     | 未发送必填字段。                                          |
| 206              | Cart item name length exceeded                                                                                 | 发送的数据超出字段长度限制。                                    |
| 207              | Cart item description length exceeded                                                                          | 发送的数据超出字段长度限制。                                    |
| 208              | Cart item sku length exceeded                                                                                  | 发送的数据超出字段长度限制。                                    |
| 209              | Shipping addressee sku length exceeded                                                                         | 发送的数据超出字段长度限制。                                    |
| 210              | Shipping data cannot be null                                                                                   | 未发送必填字段。                                          |
| 213              | Credit Card Number is invalid                                                                                  | 发送的信用卡无效。                                         |
| 214              | Credit Card Holder Must Have Only Letters                                                                      | 持卡人姓名不得包含特殊字符。                                    |
| 215              | Agency is required in Boleto Credential                                                                        | 未发送必填字段。                                          |
| 216              | Customer IP address is invalid                                                                                 | 出于安全原因该 IP 已被拦截。                                  |
| 300              | MerchantId was not found                                                                                       | \*\*\*                                            |
| 301              | Request IP is not allowed                                                                                      | \*\*\*                                            |
| 302              | Sent MerchantOrderId is duplicated                                                                             | 订单出现重复。                                           |
| 303              | Sent OrderId does not exist                                                                                    | \*\*\*                                            |
| 304              | Customer Identity is required                                                                                  | \*\*\*                                            |
| 306              | Merchant is blocked                                                                                            | \*\*\*                                            |
| 307              | Transaction not found                                                                                          | 未找到交易，或交易在该环境中不存在。                                |
| 308              | Transaction not available to capture                                                                           | 交易无法请款，请联系电商支持团队。<br />\*请检查所填金额是否低于交易总额，或交易是否可请款 |
| 309              | Transaction not available to void                                                                              | 交易无法撤销，请联系电商支持团队。                                 |
| 310              | Payment method does not support this operation                                                                 | 支付方式不支持发送的指令。                                     |
| 311              | Refund is not enabled for this merchant                                                                        | 商户未开通 24 小时后的退款功能。                                |
| 312              | Transaction not available to refund                                                                            | 该交易不允许在 24 小时后退款。                                 |
| 313              | Recurrent Payment not found                                                                                    | 未找到循环扣款交易，或其在该环境中不可用。                             |
| 314              | Invalid Integration                                                                                            | \*\*\*                                            |
| 315              | Cannot change NextRecurrency with pending payment                                                              | \*\*\*                                            |
| 316              | Cannot set NextRecurrency to past date                                                                         | 不允许将循环扣款日期改为过去的日期。                                |
| 317              | Invalid Recurrency Day                                                                                         | \*\*\*                                            |
| 318              | No transaction found                                                                                           | \*\*\*                                            |
| 319              | Smart Recurrency is not enabled                                                                                | 循环扣款功能未绑定到商户档案。                                   |
| 320              | Cannot Update Affiliation because this recurrency has no affiliation saved                                     | \*\*\*                                            |
| 321              | Cannot Set EndDate to before next recurrency                                                                   | \*\*\*                                            |
| 322              | Zero Dollar Auth is not enabled                                                                                | Zero Dollar 未绑定到商户档案。                             |
| 323              | Bin Query is not enabled                                                                                       | BIN 查询功能未绑定到商户档案。                                 |

## 其他错误代码 [#其他错误代码]

以下代码在 API 与收单机构之间通信失败（如超时）或集成出现问题时返回。

<Callout type="info">
  与收单机构通信失败时，交易仍有可能已获批准，状态会在之后自动对账。若要接收更新，请登记状态变更通知 URL，或通过 API 查询状态。
</Callout>

以下是部分返回的代码：

| 代码    | 含义                  |
| ----- | ------------------- |
| BP171 | 因欺诈风险被拒绝（Velocity）  |
| BP335 | 因支付分账（Split）交易错误被取消 |
| BP900 | 操作失败                |
| BP901 | 操作失败                |
| BP902 | 请等待上一操作的响应          |
| BP903 | 撤销失败                |
| BP904 | 查询失败                |