WeChat Pay H5
WeChat Pay H5 is the flow where consumers shopping in a mobile browser are redirected to the WeChat App to make the payment.
Transaction Flow
- From the merchant's webpage, the consumer navigates to the merchant's H5 page where they select to pay with WeChat Pay.
- The consumer opens the WeChat app.
- They enter the payment password and confirm the payment.
- If the payment is successful, the consumer and the merchant receive a payment confirmation.
Specific input parameters
Field name | M/O | Type | Description |
---|---|---|---|
specin.ipaddress | M | string | A public-facing IPv4 address of the consumer's device. |
For standard input parameters, see Input parameters for the TRANSACTION call.
This payment method supports the dynamic descriptor field (see The dynamic descriptor).
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 in the minor unit of the consumer wallet currency (SPECOUT.SRCCURRENCY ) |
SPECOUT.SETTLEMENTCURRENCY | O | The merchant's preferred settlement currency |
SPECOUT.SRCCURRENCY | ascii | The currency of the consumer's WeChat wallet |
SPECOUT.QRCODEURL | ascii | The string used for generating the payment QR code image. It contains a unique URL starting with weixin:// . |
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). Example: 1574869035 is the UNIX timestamp for Wednesday, 2019-11-19 15:37:15 UTC |
For standard output parameters, check Output parameters for the TRANSACTION call.
It also returns the SPECOUT.REDIRECTOPTIONAL parameter.
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.REFUNDSETTLEMENTCURRENCY | ascii | The settlement currency of the refund |
TRANSACTION call input
tag=wechatpayh5
&txtype=TRANSACTION
&login=testmerchant
&password=test123
&contractid=JOHNDOECONTRACT
&channel=testchannel
¤cy=EUR
&amount=250
&countrycode=DE
&accountholdername=john doe
&merchanttxid=sale-22is02
&returnmode=urlencodeext
TRANSACTION call output
REQUESTSTATUS=SUCCEEDED
STATUS=SUCCEEDED
&TXID=3334
&ERRMSG=
&CHANNEL=testchannel
&TAG=wechatpayh5
&REDIRECTURL=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Flanding.php
&rs=xTc5RNlRea2e6xbxfqXaZZnFgtMouDlz
&cs=2015d40b791d1204911f0bee494525b6acd6e9599d8a4b610f0bfe8e2cb4a0c3
&REDIRECTSECRET=lhIj5Fzq1B3agj7a8HjeObuAzL0Twglc
&SPECOUT.EXPIRYTIMESTAMP=1622543270
&SPECOUT.PAYMENTPURPOSE=27I3WRH Some payment descriptor
&SPECOUT.QRCODEURL=weixin=//wxpay/bizpayurl?pr=5T4chFBzz
&SPECOUT.SETTLEMENTCURRENCY=EUR
Updated 12 months ago