Timeout
To avoid the long wait after an API call, Alipay+ follows the practice of setting timeout values and provides a recommendation to you on how to set timeout values.
This topic introduces the timeout values in terms of the following aspects:
- Timeout values that Alipay+ sets for each API request sent to you
- Timeout values that you are recommended to set for each API request sent to Alipay+
- Further actions after a timeout occurs
Timeout values for API requests from Alipay+
When sending an API request to you, Alipay+ sets the timeout value for the API. The following table lists the timeout values that are set by Alipay+ for different APIs:
API | Timeout value |
pay | 8s |
refund | 8s |
cancelPayment | 8s |
inquiryPayment | 5s |
prepare | 5s |
applyToken | 5s |
cancelToken | 5s |
responseRetrieval | 5s |
responseEscalation | 5s |
Recommended timeout values for your API requests
When sending an API request to Alipay+, you need to set the timeout value for the API. The following table lists the timeout values that are recommended by Alipay+ for different APIs:
API | Recommended timeout value |
userInitiatedPay | 8s |
inquiryCodeRules | 5s |
getPaymentCode | 5s |
notifyPayment | 5s |
authNotify | 5s |
consultUnbinding | 5s |
initiateRetrieval | 5s |
initiateEscalation | 5s |
Further actions
When a timeout occurs, terminate the previous request and reinitiate the API with the same request parameters on your server side.