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

Introduction

中文文档

If you have integrated with the New Barcode Payment product, see Consumer-presented Mode Payment for details.

Overview

The barcode payment solution provides the way to pay for an order by scanning the barcode on customer's phone. This guide specifies the steps to integrate the merchant's system with Alipay to achieve the goal. To follow the tasks and steps outlined in this guide, you need to have:

  • XML programming skills
  • Knowledge of HTTPS
  • Some knowledge of how to use Alipay payment services
  • Access to the relevant Alipay API library entitled Alipay Spot Payment with barcode API Specification (2015) 

The relevant Application Programming Interfaces (APIs) for the solution described in this guide are located at:

Terms

  • Customer - The Alipay user purchasing from the merchant in store or face to face are non-local users of the Alipay wallet app, i.e. cross-border customers.
  • Merchant - The business that offers Alipay as a payment method to its customers. Face to face merchant may scan the customer's QR code/Barcode or display their own QR code instead of having to pay by cash or card. This guide describes the case where merchants scan the customer's QR code/Barcode.
  • Scanning - The act of capturing the user's payment information via camera or laser scanner in the scenarios where a merchant scans the Alipay wallet app. Examples of hardware usage for scanning: a laser gun, a mobile device with app, or an mPOS terminal with camera.
  • QR code/Barcode - A representation of the user's or merchant's identity which is unique and fixed, and allows the merchant to scan. The customer presents the screen of their own Alipay app, where the info is displayed simultaneously in a barcode format (top of screen) & a QR code format (rest of screen).
  • System Integrator - Provides technical solutions to merchants to accept Alipay but has no payment liability.
  • Acquirer - Owns liability for the payment and some may (but don't need to) provide technical acceptance solutions for merchants who accept Alipay, including mPOS.

User experience

In the Barcode Payment solution, the customer opens the MPP app and presents the QR code/barcode to the merchant, who scans the QR Code/barcode to accept the payment, as illustrated.

image.png

Note: In some cases, such as over-limit transactions or risk situations, the user may be required by the MPP to input the password to complete the payment.

Product flow

The following figure illustrates the work flow of Barcode Payment:

Barcode-Payment-详情页-流程优化.jpg

The interaction steps are as follows:
1. Customer presents Alipay payment code to cashier.

2. Cashier places an order in ECR terminal and scans the payment code.

3. Merchant sends a payment request to Alipay.

4. Alipay sends payment result to customer and merchant.

Generally, four integration modes exist. See the following sections for details.

Integrating directly

mechant direct.png

Process

1. Customer purchases goods or pays bills at cashier.

2. Merchant places order in ECR/terminal and scans customer's Alipay QR code/barcode using appscanner, or terminal.

3. AppECR, or terminal sends a payment request to Alipay for authorization.

4. Alipay processes the transaction and sends customer the payment result through SMS and in-app notification.

5. Alipay sends payment result to merchant through pre-defined notification method.

Integrating with system integrator

m System Integ.png

Process

1. Customer purchases goods or pays bills at cashier.

2. Merchant places order in ECR and scans customer's Alipay barcode using appscanner, or terminal.

3. AppECR, or terminal sends a payment request to system integrator.

4. System integrator passes the payment request to Alipay for authorization.

5. Alipay processes the transaction and sends customer the payment result through SMS and in-app notification.

6. Alipay sends the payment result to system integrator.

7. System integrator sends payment result to merchant via pre-defined notification method.

Integrating with acquirer

m Acquire1.png

Process

1. Customer purchases goods or pays bills at cashier.

2. Merchant places order in ECR and scans customer's Alipay barcode using appscanner, or terminal.

3. AppECR, or terminal sends a payment request to acquirer.

4. Acquirer passes the payment request to Alipay for authorization.

5. Alipay processes the transaction and sends customer the payment result through SMS and in-app notification.

6. Alipay sends the payment result to acquirer.

7. Acquirer passes the payment result to merchant via pre-defined notification method.

Integrating with system integrator and acquirer

m Integ & Acquire1.png

Process

1. Customer purchases goods or pays bill at cashier.

2. Merchant places orders in ECR and scans customer's Alipay barcode using appscanner, or terminal.

3. AppECR, or terminal sends a payment request to system integrator.

4. System integrator passes the payment request to aquirer.

5. Aquirer passes the payment request to Alipay for authorization.

6. Alipay processes the transaction and sends customer the payment result via SMS and in-app notification.

7. Alipay sends the payment result to aquirer.

8. Aquirer passes the payment result to the integrator.

9. System integrator sends payment result to merchant via pre-defined notification method.