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

Integration

The following sections explain you can design your system and integrate with Alipay.

System architecture

The following figure illustrates the solution system architecture. This architecture is for your reference only, and you may design your own system according to specific business requirements.

retail store.png

Figure 1. Alipay 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 analyze 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 and 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 three ways to connect the ECR system to Alipay. Depending the hardware, software, and partner dependencies, select an integration mode that fits.  

image

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

image

An Acquirer or ISV can provide Alipay as a payment method to a merchant's ECR system through existing or new APIs. For example, a merchant's existing partner (for example, a loyalty card provider) can add payment feature to its existing integration.

image

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

Integrating with Alipay

Before starting the integration, ensure that you meet the hardware requirements. For example, the scanners that are used for reading payment code. A laser gun, a mobile device with app, or an mPOS terminal with camera can be used in this solution as long as the scanner can read the Alipay payment barcode presented on the 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 convenient 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 the 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 a cancel operation immediately (where applicable) before closing the payment transaction in the ECR.