Alipay In-store: Consumer Barcode
The consumer barcode is the Alipay in-store flow where the merchant scans the consumer's barcode to make the payment.
Payment Method Properties
Available country codes Country where the merchant (POS device) is domiciled | CH, GB |
Processing (Presentation) currencies | CHF, GBP |
Settlement currencies | CHF, GBP |
Consumer currencies | CNY |
Channel member tag | alipayconsumerbarcode |
Scheme name in the settlement file | Alipay In-store |
Minimum transaction amount | CNY 0.1 |
Maximum transaction amount | Single transaction limit: CNY 50,000 Total transaction limit in a day: CNY 50,000 Total transaction limit in a month: CNY 200,000 |
Session timeout | 3 minutes |
Refund | Full, partial and multiple partial refunds are available. |
Refund Validity | 360 days |
Chargeback | No |
Integration Type | Asynchronous |
Sandbox | Scheme-hosted |
Transaction Flow
- The consumer presents the Alipay barcode code to the cashier.
- The cashier places an order on the Electronic Cash Register terminal.
- After placing the order, the cashier scans the barcode.
- The merchant sends a payment request to Alipay.
- Alipay sends a payment result to the consumer and the merchant.
Alipay In-store Integration
Specific input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Description |
---|---|---|---|
specin.buyeridentitycode | M | ascii | The one-time identification code of the Alipay wallet user. It is scanned from the barcode that is shown by the mobile application. |
specin.storeid | M | ascii | The identifier of the store, as boarded with Alipay. It can contain only [0-9a-zA-Z-_] , up to 32 characters. |
specin.storename | M | utf-8 | The name of the store, as boarded with Alipay. |
For standard input parameters, see Input parameters for the TRANSACTION call.
Specific output parameters for the TRANSACTION call
Field Name | Type | Description |
---|---|---|
SPECOUT.ALIPAYBUYERUSERID | numeric | A unique Alipay user ID corresponding to the buyer’s Alipay account. 16 digits beginning with 2088. |
SPECOUT.ALIPAYMERCHANTID | ascii | The merchant ID, as boarded with Alipay. |
SPECOUT.ALIPAYMERCHANTNAME | utf-8 | The merchant’s name, as boarded with Alipay |
SPECOUT.ALIPAYSTOREID | ascii | The identifier of the store, as boarded with Alipay. It can contain only [0-9a-zA-Z-_] , up to 32 characters. |
SPECOUT.ALIPAYSTORENAME | utf-8 | The name of the store, as boarded with Alipay. |
SPECOUT.CNYAMOUNT | utf-8 | CNY Amount in major units. |
SPECOUT.SRCAMOUNT | utf-8 | The transaction amount in the pricing currency. The value of this parameter is in the range of 001 - 10000000000 and with two decimal places. In minor units. Example: 3925 |
SPECOUT.SRCCURRENCY | utf-8 | The currency used according to the wallet’s currency. Example: CNY. |
For standard output parameters, see Output parameters for the TRANSACTION call.
Specific output parameters for the REFUND call
Field Name | Type | Description |
---|---|---|
SPECOUT.CNYAMOUNT | utf-8 | CNY amount in major units |
SPECOUT.DSTAMOUNT | utf-8 | Transaction amount in CNY |
SPECOUT.DSTCURRENCY | utf-8 | CNY currency |
SPECOUT.FXRATE | utf-8 | The exchange rate used for the refund; this is the same exchange rate used for the original payment. Can have up to eight digits after the decimal point |
TRANSACTION call input
tag=alipayconsumerbarcode
&txtype=TRANSACTION
&countrycode=DE
¤cy=CNY
&amount=1055
&merchanttxid=GVk8ZenqKSQG
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOECONTRACT
&channel=testchannel
&merchantredirecturl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Flanding.php
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&specin.dynamicdescriptor=DynDescriptor
&accountholdername=John%20Doe
&specin.storename=Widgets%20LLC
&specin.storeid=WIDGETS123
&specin.buyeridentitycode=123456789012345678
&returnmode=urlencodeext
TRANSACTION call output
STATUS=SUCCESSFUL
&RAND2112459470=f97243f8b9da2aa40c461652ff9cdc64312d1f9f
&TXID=643772308&MERCHANTTXID=GVk8ZenqKSQG
&FUNDSSTATUS=NOT_EXPECTED
&FLAGS=
&ERRMSG=
&CHANNEL=testchannel
&TAG=alipayconsumerbarcode
&REDIRECTSECRET=izReipLmavT6qIOHkxYpzoOf2sCMBni1
&SPECOUT.ALIPAYMERCHANTID=Merchant380
&SPECOUT.ALIPAYMERCHANTNAME=Merchant LTD
&SPECOUT.ALIPAYSTOREID=WIDGETS123
&SPECOUT.ALIPAYSTORENAME=Widgets LLC
&SPECOUT.PAYMENTPURPOSE=3VZKUHP
&SPECOUT.CNYAMOUNT=1055
&SPECOUT.SRCAMOUNT=1055
&SPECOUT.SRCCURRENCY=CNY
Customer Barcode Cancellation
Cancellation Flow
In Alipay in-store consumer barcode, there are 2 possible flows
- No authentication (frictionless)
- Authentication required
In the no-authentication flow
A CannotCancel error is returned. After the merchant scans the customer’s barcode the payment is completed immediately.
In the authentication required flow
When the merchant scans the customer’s barcode, the customer is prompted to enter their Alipay wallet PIN and for payment confirmation. At this point, cancellation is allowed.
After the customer completes authentication and confirms the payment, the CannotCancel error is returned because the payment has already been completed.
Additional information
With the exception of technical problems, the transaction will at first be in a PENDING state and the parameter SPECOUT.REDIRECTOPTIONAL is returned (see Well-known SPECOUT parameters). It is recommended not to redirect the terminal to the payment page (REDIRECTURL) – only a static page is shown because the flow continues on the POS terminal which should display a QR code image containing the value returned in SPECOUT.ALIPAYQRCODE. The terminal may poll for a final state (SUCCEEDED or FAILED) every few seconds (at least 5 seconds between retries), with a timeout of e.g. 180 seconds.
Updated 10 months ago