Create Stripe WeChat Pay Element
How to create the WeChat Pay Element
WeChat Pay enables Chinese consumers to pay directly via online transfer from their accounts. Customers are given a QR Code to scan using their WeChat mobile application to approve payments. The seller will be paid in the seller's currency as configured on Stripe.
Prerequisites
- A premium license
Activate Payment methods in your Stripe Settings
WeChat and Alipay Pay are not enabled by default. You must manually activate them in your payment methods list in your Stripe Dashboard.
To set up Alipay or WeChat Pay in your Stripe settings, click the Settings tab on the left, then click Payment methods:
Click Activate next to Alipay or WeChat Pay. Wait for processing until the status is Live
or you receive a confirmation email.
Setting up a Stripe WebHook
WeChat pay requires stripe webhook events. For instructions on how to set up a stripe webhook, refer to setting-up-webhook
Create a WeChat Pay element
The process for creating a WeChat Pay element is the same as create element
- Switch to the
Elements
tab and click theCreate
button. - In the category, choose
Digital Wallet
orCheckout Form
(Both of them are only shown in the premium version). - Choose
WeChat Pay
and give any amount to finish the creation. - Copy the element shortcode to your page.
Test WeChat Pay
Click on the button:
Generate QR code:
Scan QR code in WeChat:
FAQ on WeChat
Q. What is the refund policy for these payment methods? Alipay: Payments made with Alipay can only be submitted for refund within 90 days from the date of the original charge. After 90 days, it is no longer possible to refund the charge.
WeChat Pay: Payments made with WeChat Pay can only be submitted for a refund within 180 days from the date of the original charge. After 180 days, it is no longer possible to refund the charge.
Q. How do QR codes work? A QR code is simply a generated image, which is then translated into a URL. When viewing a QR code with your device's camera, you will be automatically asked to open the link on your device.
Q. Is it possible to “long press” on QR code to trigger WeChat pay? Case 1. If your customer visits your payment page from a mobile browser like Chrome, then there is no way to wake up the WeChat app by scanning the code. But don’t worry, most Chinese are used to downloading/screen capturing the QR Code as an image and then scanning it from WeChat by importing.
Case 2). If a customer visits/open your payment page in a built-in browser from WeChat, then the customer can long-press the code, and then there is an action called “Scan QR Code” from the context menu as below, these actions can directly command WeChat.