WeChat Pay In-store: Merchant QRC
In this flow, the consumer scans a QR code that the merchant presents at the Point of Sale terminal.
In this scenario, the consumer sees the payment QR code on a physical device. The device can:
- Open the PPRO-hosted payment page (via a web browser)
- Use the
SPECOUT.QRCODEURL
output parameter value to generate the payment QR code locally (preferred)
Optionally, you can use the SPECOUT.EXPIRYTIMESTAMP
specific output parameter to indicate for how long the payment QR code will be valid.
The consumer can use the WeChat application to pay. After the consumer pays on their phone, PPRO sends you a notification on the transaction status change. You must notify the merchant / POS device to confirm the payment.
Caution
Do not poll PPRO for transaction status. Wait for PPRO's notification to trigger a status pull for the final transaction state.
Note
PPRO only offers support with the Payment Gateway integration itself. We do not support POS device driving or other aspects of the end-merchant presentation of WeChat Pay.
Transaction Flow
- The merchant shows a transaction QR Code on a POS terminal.
- The consumer scans the QR Code with their WeChat app to proceed with the transaction.
- The consumer makes their payment as instructed.
- They confirm the transaction and enter their payment password.
- The consumer is shown a successful payment confirmation after completing their payment.
- The merchant delivers the products after receiving a notification about the successful payment.
Specific input parameters
Field name | M/O | Type | Description |
---|---|---|---|
specin.locale | O | ascii | Locale identifiers for the PPRO-hosted payment page. It is specified as Language-Region tags. Supported values: zh-CN (Simplified Chinese)zh-TW (Traditional Chinese)en-US (English, the default) |
For standard input parameters, see Input parameters for the TRANSACTION call.
Note
WeChat Pay Online is available for currencies EUR, GBP, CNY, CHF and USD.
Specific output parameters
Specific output parameters for the TRANSACTION call
This payment method will emit the output parameters outlined below:
Field name | Type | Description |
---|---|---|
SPECOUT.SRCAMOUNT | ascii | The total amount debited from the consumer's WeChat Wallet. The currency of this amount is emitted in the separate specout (SPECOUT.SRCCURRENCY). Only emitted when a transaction has been successfully paid. |
SPECOUT.SRCCURRENCY | ascii | The currency of the consumer's WeChat wallet. Only emitted when a transaction has been successfully paid. |
SPECOUT.QRCODEURL | ascii | The string used for generating the payment QR code image. It contains a unique URL starting with weixin:// . Used for placing a QR code directly on a website, without redirect to PPRO. Only emitted after successful transaction initialization.For more details, see the "You host the barcode" section below. |
SPECOUT.EXPIRYTIMESTAMP | ascii | The expiry time of the transaction. A future time defined as UNIX timestamp (seconds elapsed since 1970-01-01 00:00:00 UTC). Only emitted after a successful transaction initialization. Example: 1574869035 is the UNIX timestamp for Wednesday, 2019-11-19 15:37:15 UTC |
SPECOUT.SETTLEMENTCURRENCY | ascii | The settlement currency of the transaction. Only emitted when a transaction has been successfully paid. |
SPECOUT.SETTLEMENTAMOUNT | ascii | The amount in the settlement currency of the transaction. Only emitted when a transaction has been successfully paid. |
SPECOUT.FXRATE | ascii | The exchange rate. Only emitted when a transaction has been successfully paid. For example: USD/CNY = 6.59430000 |
For standard output parameters, check Output parameters for the TRANSACTION call.
Specific output parameters for the REFUND call
Field name | Type | Description |
---|---|---|
SPECOUT.DSTAMOUNT | ascii | Total amount in the minor unit of the consumer wallet currency (see also SPECOUT.DSTCURRENCY ) |
SPECOUT.DSTCURRENCY | ascii | The currency of the consumer’s WeChat wallet (usually CNY) |
SPECOUT.SETTLEMENTCURRENCY | ascii | The settlement currency of the refund. |
SPECOUT.SETTLEMENTAMOUNT | ascii | The amount in the settlement currency of the refund. |
SPECOUT.FXRATE | ascii | The refund exchange rate. The same exchange rate used for the transaction. For example: USD/CNY = 6.59430000 |
TRANSACTION call input
tag=wechatpaycscan
&txtype=TRANSACTION
&countrycode=CN
¤cy=EUR
&amount=1055
&merchanttxid=J2wkc3cdDaJS
&login=johndoe
&password=fsdfgsfer498^%wd
&contractid=JOHNDOECONTRACT
&channel=testchannel
&merchantredirecturl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fhappylanding.php
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&specin.dynamicdescriptor=DynDescriptor
&specin.locale=zh-CN
&accountholdername=John%20Doe
&returnmode=urlencodeext
TRANSACTION call output
REQUESTSTATUS=SUCCEEDED
&STATUS=SUCCEEDED
&TXID=881495832
&ERRMSG=
&CHANNEL=testchannel
&TAG=wechatpaycscan
&PAYMENTGUARANTEE=NONE
&REDIRECTSECRET=1O2jLKHsCxaHejbQuCOR6nIFpaXKi343
&SPECOUT_EXPIRYTIMESTAMP=1618842495
&SPECOUT_PAYMENTPURPOSE=2LUPW10 DynDescriptor
&SPECOUT_QRCODEURL=weixin://wxpay/bizpayurl?pr=abcdefg
&SPECOUT_SRCAMOUNT=8274
&SPECOUT_SRCCURRENCY=CNY
Updated about 1 year ago