Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solution

How can we help?

BACK

Why is TRADE_STATUS_ERROR returned?

Question:

The request returns TRADE_STATUS_ERROR.

Cause:

The transaction status is illegal. The current transaction status does not allow this operation to be performed.

Common cases are:

  1. The transaction is in a pending state (WAIT_BUYER_PAY), the refund interface is called, but only a successful transaction can execute the refund interface.
  2. The cancel interface is called the day after the transaction.
  3. The refund interface is called, but the refund period of the transaction is expired.
  4. The initiation time of transaction is not within ["order_gmt_create"+"order_valid_time" - 60s]

Solution:

  1. Wait for the transaction to succeed before executing the refund interface.
  2. Cancel interface cannot be called the day after the transaction. Use refund interface instead.
  3. The in-store payment refund period is generally 365 days, after which refund is unavailable.
  4. The initiation time of transaction should be within ["order_gmt_create"+"order_valid_time" - 60s]

问题

执行当面付退款/撤销接口时收到报错TRADE_STATUS_ERROR。

原因

交易状态不合法,当前的交易状态不允许执行该操作。

常见案例有:

  1. 该笔交易处于待支付状态(WAIT_BUYER_PAY)时,调用了退款(refund)接口,只有交易成功的交易才能执行退款接口。
  2. 隔日交易调用当面付撤销(cancel)接口。
  3. 调用当面付退款(refund)接口,但交易已经超过退款期限。
  4. 商户发起交易时间参数值未控制在order_gmt_create+order_valid_time - 60s 之内

解决方案

  1. 等待交易成功后再执行退款接口。
  2. 隔日交易无法调用撤销接口,建议使用退款接口。
  3. 当面付退款期限一般多为365天,超过期限无法退款。
  4. 商户发起交易的时间参数值需控制在order_gmt_create+order_valid_time(秒) - 60s 之内

NEED HELP?

NEED HELP?