Wechat Barcode

Posted onby admin
  • QR Code is a two-dimensional version of the barcode, typically made up of black and white pixel patterns. Denso Wave, a Japanese subsidiary of the Toyota supplier Denso, developed them for marking components in order to accelerate logistics processes for their automobile production.
  • WeChat QR Codes are colorful barcodes, which can be shared on social media. Every WeChat user has a unique QR Code. This QR Code is personal and their design can be changed. Plus, one can also add people quickly to WeChat groups through QR Codes.

Accept in-store payments from WeChat Pay users through your point-of-sale system (POS) using the payment method.

Social Media freelance job: verify my WeChat barcode. Discover more freelance jobs or hire some expert freelancers online on PeoplePerHour!

This payment method implements Quick Pay from WeChat Pay allowing you to gain access to one of China's most popular online payment methods without needing a WeChat account or registering for a Chinese bank account. This guide walks you through the payment flow and details on how to implement.

How to enable

  • Supported Countries: Thailand
  • Minimum API version:2017-11-02

To enable WeChat Pay (Barcode), send an email requesting this feature to [email protected] will need to review and accept new terms and conditions.

Payment flow

Wechat barcode grass

Payers using present their Quick Pay payment code to you.You must scan the payment code using a barcode reader and use it to create a new charge.

WeChat Pay will process the charge.Once you receive the charge completion webhook, you may verify the charge status and confirm the payment with the user.

Implementation

To create a charge using WeChat Pay (Barcode), make the following API requests.

  1. Create a new charge specifying the required parameters.
  2. After receiving the charge completion webhook event, retrieve the charge to verify its status (optional, but recommended).

Use your secret key to create the WeChat Pay (Barcode) charge.

Creating a charge

Wechat Barcode

When the payer confirms they wish to use this payment method, create a new charge specifying the following parameters: amount, currency, source[type] (barcode_wechat), and source[barcode].

Wechat Barcode
ParameterTypeDescription
amountinteger(required) See Limits
currencystring(required) THB
source[barcode]string(required) WeChat Pay Quick Pay payment code number
source[type]string(required) barcode_wechat

The following example demonstrates how to create a new charge using curl.Replace $OMISE_SECRET_KEY with the test secret key found on your dashboard.

Setting the charge to expire

Wechat Qr Code Scan

charges that have not yet been authorized (status=pending) can be set to expire immediately.In effect, this cancels the charge.

Completing the charge

Barcode

At this point, you have created a new charge with its status set to pending.Other possible values for charge status are successful, failed, and expired.

The following sections detail how to authorize a charge, receive its completion webhook event, and update its status.

This sequence diagram shows the entire flow.

sequenceDiagram participant customer participant merchant participant api.omise.co participant payment providercustomer->>merchant: Present payment code for scanningmerchant->>api.omise.co: Create charge using payment codeapi.omise.co-->>merchant: Return chargeapi.omise.co-xmerchant: Send 'charge.create' webhookcustomer->>payment provider: Provide charge authorizationpayment provider-->>customer: Return payment resultpayment provider-->>api.omise.co: Return payment resultapi.omise.co-xmerchant: Send 'charge.complete' webhook

Wechat Qr Code

Authorizing the charge

The payer confirms the payment on their WeChat Pay app using their payment password.

Receiving the charge completion event

The best way for you to be notified of the completion of a charge is using webhook events.Set up a location on your server to receive webhook events, and add this location as a webhook endpoint on the dashboard.

Once a charge is completed, a POST request will be sent to this endpoint with the charge response embedded.

The key attribute for the event object contains charge.complete and the data attribute contains the charge object.See Events API for event object structure.

Checking the charge status

After receiving this event, retrieve the charge using its id and confirm that its status matches the status of the charge contained in the event.

If the value of status is successful, you got paid.If the value of status is failed, check the failure_code and failure_message in the charge object for an explanation.

Possible failure codes are listed below.

Wechat

Wechat Qr Code Generator

Failure CodeDescription
payment_cancelledPayment cancelled by payer.
failed_processingGeneral payment processing failure.
insufficient_balanceInsufficient funds in the account or the payment method has reached its limit.
payment_rejectedPayment rejected by issuer.

Voids and refunds

WeChat Pay (Barcode) charges can be partially or fully refunded within 365 days of the transaction date using the API.

Limits

  • Minimum:2000 (THB20.00)
  • Maximum:15000000 (THB150,000.00)

Wechat Barcode Generator

Next steps