alipay.fund.auth.operation.cancel
Call the alipay.fund.auth.operation.cancel interface to cancel a pre-authorization (pre-auth).
Request
Service address
Environment | HTTPS request URL |
Production environment | |
Test environment |
Request parameters
Parameter | Description |
Basic parameter | |
app_id String (32) | The unique ID that is assigned by Alipay to identify an application. Example: |
method String (128) | Interface name Example: |
format String (40) | Only JSON is supported. Example: |
charset String (10) | The charset with which the request data is encoded. GBK and UTF-8 are supported. Example: |
sign_type String (10) | Signature type. RSA and RSA2 are supported. Use uppercase. Example: |
sign String (344) | Signature value |
timestamp String (19) | The time when the merchant server sends the request. The format is yyyy-mm-dd hh:mm:ss. Example: |
version String (3) | The API version. The value is fixed as 1.0. Example: |
notify_url String (256) | The URL for receiving asynchronous notifications after the pre-auth is completed. Example: |
app_auth_token String (40) | To query authorization information. Example: Note: After a merchant authorizes an ISV to use certain APIs, Alipay will assign an app_auth_token to the ISV. The ISV can use this interface to query the authorization information such as the authorizer and authorized APIs corresponding to the app_auth_token. For more details, see Overview of the app authorization (in Mandarin). |
biz_content String | Collection of request parameters. The maximum length is not limited. Except for common parameters, all other request parameters must be passed in to this parameter. |
Business parameter | |
auth_no String (64) | The pre-auth order number assigned by Alipay. This parameter is required when out_order_no is not provided. If auth_no and out_order_no appear at the same time, auth_no takes precedence. Example: |
operation_id String (64) | The serial number of operation assigned by Alipay. This parameter is required when out_request_no is not specified. If operation_id and out_request_no appear at the same time, operation_id takes precedence. Example: |
out_order_no String (64) | The transaction number of funds pre-auth assigned by partner system. This parameter is required when auth_no is not specified. If auth_no and out_order_no appear at the same time, auth_no takes precedence. Example: |
out_request_no String (64) | The serial number of a partner's funds pre-auth request. This parameter is required when operation_id is not specified. If operation_id and out_request_no appear at the same time, operation_id takes precedence. Example: |
remark String (100) | Operation description Example: |
Response
Synchronous response
Parameter | Description |
Basic parameter | |
code String (16) | The gateway return code, which indicates whether the request is accepted by Alipay gateway. Example: |
msg String (32) | Description of the gateway return code Example: |
sub_code String (16) | Processing result of the request Example: |
sub_msg String (64) | Description of the processing result of the request |
sign String (344) | The sign value. See Signature for details. |
Business parameter | |
auth_no String (64) | The unique number of frozen fund operation assigned by Alipay. Example: |
operation_id String (64) | The serial number of funds operation assigned by Alipay. Example: |
out_order_no String (64) | The transaction number of funds pre-auth assigned by partner system. Example: |
out_request_no String (64) | The serial number of a partner's funds pre-auth request. The number must be unique at the partner end. Example: |
action String(10) | The action of the funds operation. Possible values include:
Example: |
Asynchronous response
Parameter | Description |
auth_no String (64) | The unique number of frozen fund operation assigned by Alipay. Example: |
operation_id String (64) | The serial number of a frozen operation assigned by Alipay. Example: |
out_order_no String (64) | The transaction number of funds pre-auth assigned by partner system. Example: |
out_request_no String (64) | The serial number of a partner's funds pre-auth request. The number must be unique at the partner end. Example: |
action String(10) | The action of the funds operation. Possible values include:
Example: |
Notification trigger condition
Trigger condition name | Description | Note |
fund_auth_operation_cancel | Pre-auth cancelled | true (triggers notification) |
Error codes
Error Code | Description |
ILLEGAL_ARGUMENT | The parameter is incorrect. Check each request parameter according to the API specification.
For cashier, get the customer to refresh the payment code and try the pre-auth again. |
ACCESS_FORBIDDEN | You have no permission to use the product. Check your agreement with Alipay. |
PAYER_USER_STATUS_LIMIT | Abnormal customer account |
ORDER_ALREADY_FINISH | Completed order |
CANCEL_OPERATION_TIME_OUT | Timeout |
REQUEST_AMOUNT_EXCEED | The unfreezing amount exceeds the frozen amount. |
SYSTEM_ERROR | System error |