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 |
userInitiatedPay | 8s |
notifyPayment | 5s |
authNotify | 5s |
consultUnbinding | 5s |
notifyRegistrationStatus | 5s |
initiateRetrieval | 5s |
initiateEscalation | 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 |
pay (User-presented Mode Payment) | 8s |
pay (Merchant-presented Mode Payment - Entry Code) | 8s |
pay (Merchant-presented Mode Payment - Order Code) | 8s |
pay (Cashier Payment) | 8s |
pay (Auto Debit) | 8s |
refund | 8s |
cancelPayment | 8s |
inquiryPayment | 5s |
registration | 5s |
inquiryRegistrationStatus | 5s |
prepare | 5s |
applyToken | 5s |
cancelToken | 5s |
responseRetrieval | 5s |
responseEscalation | 5s |
declare | 5s |
inquireDeclarationRequests | 5s |
Further actions
When a timeout occurs, terminate the previous request and reinitiate the API with the same request parameters on your server side.