Best practices
This topic introduces the following best practice solutions to help you enhance product experience and payment efficiency:
Payment result display
Redirection handling
If the buyer successfully completes the payment but faces issues being redirected to the URL you set in paymentRedirectUrl-whether due to network issues or payment method limitations-consider the following points:
- Do not use the client redirection as the basis for determining the success of the payment.
- If paymentRedirectUrl of the payment method page fails to redirect to the merchant page, the buyer may manually click to return to the original merchant page. To prevent buyers from mistakenly attempting to pay for the order again, it is recommended to implement a pop-up window on the original merchant page. This pop-up should allow for transaction result inquiries. When buyers click the pop-up window, it should display the transaction result, thereby preventing any duplicate payment attempts.
API timeout settings
APO offers seamless integration with a variety of payment methods. However, in certain scenarios, processing delays in the pay API may result in slow responses, preventing buyers from being redirected to the payment continuation link. This can reduce the payment success rate and negatively impact the user experience. To address this, it is recommended to set the API timeout to 10 seconds to improve response success rates. If a pay API call times out, it is suggested to reinitiate the original request to retrieve the payment continuation link.