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

How can we help?

BACK

How do I know whether a user has successfully paid a transaction?

You can verify whether a user has successfully paid a transaction by using the following two methods:

  • 1. Check the value of trade_status returned in the asynchronous notification from the specific interface. To receive the asynchronous notification, you must pass in notify_url in the request.
  • 2. Call the specific QUERY interface. Use alipay.acquire.overseas.query for In-store Payment transactions and check the value of alipay_trans_status. Use single_trade_query for Online Payment transactions and check the value of trade_status.

For In-store Payment transactions, the user has successfully paid if the value of trade_status or alipay_trans_status is TRADE_SUCCESS or TRADE_FINISHED. The relationship between the status are illustrated in the following figure:

For Online Payment trasnactions, the user has successfully paid if the value of trade_status is TRADE_FINISHED. The relationship between the status are illustrated in the following figure:


确认支付用户支付成功的方式有2种:

  1. 1. 在支付接口(境外当面付、境外收单)请求参数中设置notify_url,根据接收到的异步通知中的trade_status(交易状态)进行判断;
  2. 2. 可调用对应的查询接口返回的响应参数trade_status(交易状态)来确认是否支付成功。境外当面付查询接口为“alipay.acquire.overseas.query”,境外收单查询接口为“single_trade_query”。

境外当面付:

境外收单:

NEED HELP?

NEED HELP?