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

Revoke

When the buyer's authorization is obtained, the buyer can revoke the authorization from the merchant client or the wallet client. The token is invalidated once the authorization is canceled successfully, and cannot be used for EasySafePay password-free payments.

  • If the buyer initiates the authorization cancellation from the merchant client, you need to call the revoke API to revoke the authorization.
  • If the buyer initiates the authorization cancellation from the payment method client, you will receive the authorization notification when the authorization is revoked successfully.

Note: Alipay, Boost, AlipayHK and TrueMoney support the authorization cancellation from the payment method client. However, only a successful authorization cancellation from the Alipay, Boost, and AlipayHK client will trigger sending an authorization notification.

Call an API to revoke an authorization

You need to call the revoke API to revoke the authorization, and pass in the token to be invalidated in your request. The token is obtained through the notifyAuthorization notification that you receive during the first-time payment.

After you call the API, Antom synchronously returns the response. The request processing result is indicated by the resultStatus parameter in the response. The following table shows the possible values of the resultStatus parameter:

resultStatus

Description

S

The authorization is revoked successfully.

F

The authorization failed to be revoked. See Error codes of the revoke API for troubleshooting.

U

The authorization cancellation status is unknown. Retry calling the API.

Table 1. Explanation of resultStatus

Receive a notification of authorization revocation

Only a successful authorization cancellation from the Antom client will trigger sending an authorization notification. The value of result.resultStatus is fixed as S, which indicates a successful authorization revocation.

Before you can receive an asynchronous notification of the authorization revocation status, you must set a notification address in Antom Dashboard. After you receive the notification, follow Notifications to proceed with the authorization revocation process.