Before you begin
Before you learn more about how to integrate with Alipay+ Cashier Payment, ensure that you are familiar with the following things:
- The user experience that Alipay+ Cashier Payment can provide to the consumers, including the differences between tile mode and bundle mode. For more information, see User experience.
- General steps that you need to take to go through the whole integration process. For more information, see Get started with Alipay+ integration.
- Different Acquiring Partners (ACQPs) provide different service modes, for example:
- some ACQPs provide the payment capability to merchants by packaging the client side and the server side into an integrated service.
- some ACQPs only provide the server side ability, while merchants are required to integrate the Alipay+ client side.
Therefore, for the convenience of developers to read this document, no matter which service mode is used, "your client side" and "your server side" are used uniformly to refer to the corresponding client side and server side in different service mode.
The following figure illustrates the main workflow of Cashier Payment, which focuses on how to accept a payment.
Figure 1. Cashier payment workflow
The payment process consists of the following steps:
- A user places an order on the merchant platform. Then your client side renders the payment method page with the wallet information that is returned in the response of the consultPayment API. (Step 1-7)
Note: Depending on the presentation mode that is used, your client side displays the payment methods in a different style.
- If the tile mode is used, your client side displays the wallets separately. (Step 6)
- If the bundle mode is used, your client side displays the Alipay+ payment method as a whole. (Step 7)
- The user selects a payment method to perform the payment. (Step 8)
- For the tile mode, a specific wallet is selected.
- For the bundle mode, the Alipay+ payment method is selected as whole.
- Then your server side initiates a request to call the pay API and obtains the payment confirmation page URL from Alipay+ (Step 8-15).
- For Step 12/13, only when the user places an order on a merchant website and the wallet supports code-scanning, a code value is returned from Alipay+.
- For the tile mode - web scenario, if the wallet supports code-scanning, the merchant can choose to either render the code by themselves (Step 14) or redirect the user to the Alipay+ cashier page where the code is rendered by Alipay+ (Step 15).
- After receiving the response of the pay API, your server side initiates an inquiryPayment API request to query the payment result. Meanwhile, Alipay+ notifies you of the payment result by using the notifyPayment API. （Step 16-21）
- Your server side gets the payment result and updates the internal payment status of the order.