Set timeout length
Timeout might occur when calling the API because of network issues. The party that calls the API sets the timeout length.
Time to wait before timeout when Alipay+ calls an API to Mobile Payment Provider
When Alipay+ calls the API to Mobile Payment Provider, the timeout length is set by Alipay+. Mobile Payment Provider must return response before the timeout. The following table lists the time to wait before timeout for the corresponding API calling:
Interface type | Interface name | Time to wait before timeout |
OpenApi | /v1/payments/pay | 8s |
/v1/payments/refund | 8s | |
/v1/payments/cancelPayment | 8s | |
/v1/payments/inquiryPayment | 5s | |
/v1/risks/inquiryRiskScore | 5s | |
/v1/authorizations/prepare | 5s | |
/v1/authorizations/applyToken | 5s | |
/v1/authorizations/cancelToken | 5s |
Table 1. Time to wait before timeout when Alipay+ calls an API to Mobile Payment Provider
Time to wait before timeout when Mobile Payment Provider calls an API to Alipay+
When Mobile Payment Provider calls the API to Alipay+, the timeout length is set by Mobile Payment Provider. The time to wait before timeout when Mobile Payment Provider calls the /v1/payments/notifyPayment
to Alipay+ is 5 seconds.