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

  1. From the merchant's webpage, the consumer navigates to the merchant's H5 page where they select to pay with WeChat Pay.
  2. The consumer opens the WeChat app.
  3. They enter the payment password and confirm the payment.
  4. If the payment is successful, the consumer and the merchant receive a payment confirmation.

Specific input parameters

Field nameM/OTypeDescription
specin.ipaddressMstringA 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 nameTypeDescription
SPECOUT.SRCAMOUNTasciiThe total amount in the minor unit of the consumer wallet currency (SPECOUT.SRCCURRENCY)
SPECOUT.SETTLEMENTCURRENCYOThe merchant's preferred settlement currency
SPECOUT.SRCCURRENCYasciiThe currency of the consumer's WeChat wallet
SPECOUT.QRCODEURLasciiThe string used for generating the payment QR code image. It contains a unique URL starting with weixin://.
SPECOUT.EXPIRYTIMESTAMPasciiThe expiry time of the transaction. A future time defined as UNIX timestamp (seconds elapsed since 1970-01-01 00:00:00 UTC).

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 nameTypeDescription
SPECOUT.DSTAMOUNTasciiTotal amount in the minor unit of the consumer wallet currency (see also SPECOUT.DSTCURRENCY)
SPECOUT.DSTCURRENCYasciiThe currency of the consumer’s WeChat wallet (usually CNY)
SPECOUT.REFUNDSETTLEMENTCURRENCYasciiThe settlement currency of the refund

TRANSACTION call input

&accountholdername=john doe  

TRANSACTION call output

&SPECOUT.PAYMENTPURPOSE=27I3WRH Some payment descriptor