# WooCommerce

### Setting up WeChat Pay, Alipay, and UnionPay for WooCommerce

{% hint style="danger" %}
In order for WooCommerce orders to process correctly, [Webhooks](https://docs.chinapaymentsplugin.com/faqs/how-do-i-set-up-stripe-webhooks) must be configured properly.
{% endhint %}

Feel free to read the documentation below or watch this video that covers everything you need to know about setting up WooCommerce integration for China Payments Plugin.

{% embed url="<https://www.youtube.com/watch?v=qxkL4T6ZSXg>" %}
How to Accept WeChat Pay with WooCommerce
{% endembed %}

To setup WooCommerce, follow these instructions:

{% hint style="success" %}
Make sure you've already followed the [Setup Process](https://docs.chinapaymentsplugin.com/getting-started/setup-process) before proceeding.
{% endhint %}

{% hint style="success" %}
To activate WeChat Pay, Alipay, and UnionPay for WooCommerce, ensure you have WooCommerce installed.
{% endhint %}

Go to the WooCommerce Payment Settings, and enable **WeChat Pay by China Payments Plugin**, **Alipay by China Payments Plugin**, and **UnionPay by China Payments Plugin**.

### Under "WeChat Pay by China Payments Plugin", you'll see these settings:

![WeChat Pay for WooCommerce Settings](https://61906910-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdKImHVtiGW2y8sh9l2%2F-MdTrAjAZ1UumJrcw33N%2F-MdTtWi8EqkAO93jo38i%2Fwechat-pay-woocommerce-settings.png?alt=media\&token=720ca8c6-d09d-40c8-9eaa-cbece61c42b5)

{% hint style="warning" %}
The currency of the WooCommerce checkout must match the payout currency of your Stripe account.
{% endhint %}

{% hint style="info" %}
Update the Description and Message boxes to change what appears on the frontend during the checkout process.
{% endhint %}

### Under "Alipay by China Payments Plugin", you'll see these settings:

![Alipay for WooCommerce Settings](https://61906910-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdKImHVtiGW2y8sh9l2%2F-MdTrAjAZ1UumJrcw33N%2F-MdTv9kLwZfyrn97fG3P%2Falipay-woocommerce-settings.png?alt=media\&token=5e9552f3-1b53-4f83-b6af-4ff9fdd80c68)

### Under "UnionPay by China Payments Plugin", you'll see these settings:

The UnionPay payment method settings allow you to configure the title and description shown to customers at checkout. UnionPay uses an inline card form powered by Stripe Elements — customers enter their card details directly on your checkout page without being redirected.

See how these settings look for your customers on the frontend in the [checkout flow documentation for WooCommerce](https://docs.chinapaymentsplugin.com/checkout-flows/woocommerce).

### WooCommerce Checkout Flow

With the [Inline QR code option](https://docs.chinapaymentsplugin.com/getting-started/setup-process/woocommerce#under-wechat-pay-by-china-payments-plugin-youll-see-these-settings) left as-is, the QR code will appear like this in your WooCommerce checkout:

![QR code generated when checking out with WeChat Pay for WooCommerce](https://61906910-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MdKImHVtiGW2y8sh9l2%2F-MdTrAjAZ1UumJrcw33N%2F-MdTuqTiksIuULKXOCvo%2Fwechat-pay-woocommerce-qr-code.png?alt=media\&token=a6671af9-7109-48b6-b4e0-9f3b6f650dcb)

When customers scan the QR code and complete payment on their mobile device, your website will automatically refresh and redirect customers to the payment confirmation page, as set in your WooCommerce settings.

{% hint style="success" %}
The checkout flow is built to check Stripe for payment confirmation every 5 seconds.
{% endhint %}

### UnionPay Checkout Flow

When a customer selects UnionPay at checkout, a secure inline card form appears directly on the checkout page. The customer enters their card number, expiration date, and CVC, then clicks "Place Order." The payment is confirmed instantly via Stripe — no redirect is needed.

### Checkout Optimizations (PRO)

PRO users can enable [Checkout Optimizations](https://docs.chinapaymentsplugin.com/checkout-optimizations) to automatically localize the entire WooCommerce checkout to Simplified Chinese and display prices in CNY alongside your store currency. See the [Checkout Optimizations](https://docs.chinapaymentsplugin.com/checkout-optimizations) documentation for details.
