Alipay, China's leading third-party online payment solutionAlipay, China's leading third-party online payment solutionDOCS

      Integration

      The following sections introduce how to design your system and integrate with Alipay. 


      #System architecture

      The following figure illustrates the solution system architecture. However, the architecture is for your reference only, you can design your own system following specific business requirements.


      retail store.png

       Fiure 1: Retail store system architecture


      The retail store solution might consist of two parts: the front end and the back end.  Each part contains several modules that serve specific business requirements. 

      Front end

      Besides Alipay payment service, front end might also contain modules such as digital coupons (to attract customers), membership sales (for example, membership card and membership benifits), and O2O cross-selling.

      Back end

      Based on data analysis, back end might contain modules to analize business data for creating customer personas, build data models for precision marketing, and find clues for selling high-margin goods. 


      Alipay-provided abilities cover the following modules:

      • Payment system, digital coupons, and membership sales

      Alipay provides various tailored payment related services to meet merchants' payment requirements.

      • Business analysis & customer persona, data models & precision marketing, and data portal 

      Alipay provides various data tools to facilitate the business analysis,  and help merchants gain data insights. For example, merchants can then carry out precision marketing based on data model.


      #Integration mode

      There are several solutions to connect the ECR system to Alipay. Depending the hardware, software, and partner dependencies, select an integration mode that fits.


      Integration

      If development resource available and direct settlement model available, merchant can connect the ECR through it's backend processing system directly to Alipay's Barcode Payment APIs.




      Integration


      Acquirer or ISV can provide Alipay as payment method to Merchant's ECR system by existing or new APIs. Especially the existing partner like loyalty card provider of Merchant can add payment feature to the existing Integration.




      Integration


      Payment card acquirer can reuse the POS Terminal infrastructure to provide Alipay as additional payment method to merchants. After scanning the Alipay payment barcode, ECR transfers the content of the payment barcode to POS Terminal, POS Terminal uses standard acquiring network to initiate the Alipay payment.


      #Integrating with Alipay

      Before starting the integration, you might want to plan the hardware requirements. For example, the scanners that are used for reading payment code. Scanners, no matter laser, redlight, or imager scanner, can be used in this solution as long as the scanner can read the Alipay payment barcode presented in customer's Alipay app.


      See Barcode payment - Integration for details of the integration steps, such as prepare keys, calling APIs, testing in sandbox environment, and going live.


      #Best practices

      In most POS scenarios, such as in supermarkets or in convinient stores, payment processing speed is one of the main focus of merchants. To avoid long waiting queue behind the POS, certain usability optimizations are necessary.


      Initiate Alipay payment automatically

      To reduce Cashier training, initiate Alipay payment from ECR software by letting cashier scan the Alipay payment Barcode. 

      If a button is required in the ECR software, name the button in a way easy to understand (for example, Alipay). In addition, to ensure that the button is easy to be found, do not hide the button in the second-level menu.


      Timeout and cancel

      In the retail store solution, usually the timeout value is set at 30 seconds. Before the timeout is reached, ECR must query the transaction status and then followed by an cancel operation immediately (where applicable) before closing the payment transaction in the ECR.