--- title: "WeChat Pay Component" description: "Add WeChat Pay to an existing Components integration." url: "https://docs.adyen.com/payment-methods/wechat-pay/wechat-pay-desktop-qr-payments/web-component" source_url: "https://docs.adyen.com/payment-methods/wechat-pay/wechat-pay-desktop-qr-payments/web-component.md" canonical: "https://docs.adyen.com/payment-methods/wechat-pay/wechat-pay-desktop-qr-payments/web-component" last_modified: "2019-07-04T10:57:00+02:00" language: "en" --- # WeChat Pay Component Add WeChat Pay to an existing Components integration. [View source](/payment-methods/wechat-pay/wechat-pay-desktop-qr-payments/web-component.md) This page explains how to add WeChat Pay to your existing Web Components integration. ## Requirements ### Tab: `/sessions` | Requirement | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | Make sure that you have built a Sessions flow [Web Components integration](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components). | | **Setup steps** | Before you begin:- To use the desktop QR code flow, [add WeChat Pay in your Customer Area](/payment-methods/add-payment-methods). - To use the mobile browser flow, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) with your web shop URL for enrolment with WeChat Pay. | ### Tab: `/payments` | Requirement | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | Make sure that you have built an Advanced flow [Web Components integration](/online-payments/build-your-integration/advanced-flow?platform=Web\&integration=Components). | | **Setup steps** | Before you begin:- To use the desktop QR code flow, [add WeChat Pay in your Customer Area](/payment-methods/add-payment-methods). - To use the mobile browser flow, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other) with your web shop URL for enrolment with WeChat Pay. | ## Import resources for v6 If you are using Web Components v6, [import the Component](/online-payments/build-your-integration/?platform=Web\&integration=Drop-in\&version=6.0.0) that you need for WeChat Pay: ```js import { AdyenCheckout, WeChat } from '@adyen/adyen-web' ``` ## API reference You do not need to send additional fields for WeChat Pay. To see optional fields that you can send for all payment methods, choose the endpoint you integrated: * [/sessions](https://docs.adyen.com/api-explorer/Checkout/latest/post/sessions): This is the default with [Components v5.0.0](/online-payments/build-your-integration/sessions-flow?platform=Web\&integration=Components) or later. * [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments): If you implemented an [additional use case](/online-payments/build-your-integration). ## Component configuration ### Step 1: Create a DOM element Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered: ```html
``` ### Step 2: Create an instance of the Component #### v6.0.0 or later Create an instance of the Component, passing: * Your instance of `AdyenCheckout`. ```js const wechatpayWeb = new WeChat(checkout).mount('#wechatpayWeb-container'); ``` ** #### v5.x.x or earlier Use the `create` method of your `AdyenCheckout` instance, in this case `checkout`, to create the Component: ```js const wechatpayWebComponent = checkout.create('wechatpayWeb').mount('#wechatpayWeb-container'); ``` ## Test and go live You can check the status of a WeChat Pay payment in your [Customer Area](https://ca-live.adyen.com/) > **Transactions** > **Payments**. Before you can accept live WeChat Pay payments, you need to submit a request for WeChat Pay in your [live Customer Area](https://ca-live.adyen.com/). ## See also * [Web Components integration guide](/online-payments/components-web) * [Webhooks](/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/overview)