# 交易状态与原因 (/zh/docs/cartao/transaction-status)

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

  <QuickLink href="/docs/cartao/endpoints/charges/get_charges__chargeId_" title="查询收款" method="GET" path="/charges/{chargeId}" />

  <QuickLink href="/docs/cartao/webhooks" title="Webhooks" />

  <QuickLink href="/docs/cartao/error-codes" title="错误代码" />
</QuickLinks>

请基于本页的数字代码和稳定值来编写业务逻辑。可读的描述和消息文案可能会发生变化。

## 交易状态 [#交易状态]

`creditCardPayment.status` 字段表示支付的当前状态。API 可能返回的状态列表:

| 代码 | 支付状态               | 描述                                          |
| -- | ------------------ | ------------------------------------------- |
| 0  | `NotFinished`      | 支付处理失败。可能原因:数据不正确、请求错误、超时、处理过程不稳定。          |
| 1  | `Authorized`       | 支付方式已具备扣款(capture)条件。发卡行已批准该交易,但这并不代表交易已完成。 |
| 2  | `PaymentConfirmed` | 支付已确认并完成。                                   |
| 3  | `Denied`           | 支付被授权方拒绝。可能原因:额度不足、卡片欠款、卡组织不可用、疑似欺诈被拦截等。    |
| 10 | `Voided`           | 支付已取消。                                      |
| 11 | `Refunded`         | 支付已取消/已退款。表示已发起该笔交易的取消请求。                   |
| 12 | `Pending`          | 等待金融机构返回结果。表示交易已进入预授权流程,正在等待银行的响应以完成校验。     |
| 13 | `Aborted`          | 支付因处理失败而被取消。交易因处理失败被取消,或反欺诈系统在授权前拒绝了该交易。    |

<Callout type="info">
  状态 `1`(`Authorized`)仅表示发卡行批准了该交易。支付的最终完成以状态 `2`(`PaymentConfirmed`)为准。
</Callout>

## ReasonCode 和 ReasonMessage [#reasoncode-和-reasonmessage]

`reasonCode` 和 `reasonMessage` 字段说明交易结果的原因，包括结果来自反欺诈分析的情况，例如 `AbortedByFraud` 和 `CouldNotAntifraud`。

| `reasonCode` | `reasonMessage`                |
| ------------ | ------------------------------ |
| 0            | `Successful`                   |
| 1            | `AffiliationNotFound`          |
| 2            | `InsufficientFunds`            |
| 3            | `CouldNotGetCreditCard`        |
| 4            | `ConnectionWithAcquirerFailed` |
| 5            | `InvalidTransactionType`       |
| 6            | `InvalidPaymentPlan`           |
| 7            | `Denied`                       |
| 8            | `Scheduled`                    |
| 9            | `Waiting`                      |
| 10           | `Authenticated`                |
| 11           | `NotAuthenticated`             |
| 12           | `ProblemsWithCreditCard`       |
| 13           | `CardCanceled`                 |
| 14           | `BlockedCreditCard`            |
| 15           | `CardExpired`                  |
| 16           | `AbortedByFraud`               |
| 17           | `CouldNotAntifraud`            |
| 18           | `TryAgain`                     |
| 19           | `InvalidAmount`                |
| 20           | `ProblemsWithIssuer`           |
| 21           | `InvalidCardNumber`            |
| 22           | `TimeOut`                      |
| 23           | `CartaoProtegidoIsNotEnabled`  |
| 24           | `PaymentMethodIsNotEnabled`    |
| 98           | `InvalidRequest`               |
| 99           | `InternalError`                |

## 拒付状态 [#拒付状态]

`chargebacks[].status` 字段表示与该笔收款关联的每笔拒付的状态:

| 值          | 描述          |
| ---------- | ----------- |
| `RECEIVED` | 已收到拒付。      |
| `ACCEPTED` | 商户已接受拒付。    |
| `DEFENDED` | 商户已对拒付提出抗辩。 |

<QuickLinks>
  <QuickLink href="/docs/cartao/antifraud" title="反欺诈" />

  <QuickLink href="/docs/cartao/error-codes" title="错误代码" />
</QuickLinks>