--- title: "WeChat Pay iOS Component" description: "Add WeChat Pay to an existing iOS Components integration." url: "https://docs.adyen.com/payment-methods/wechat-pay/wechat-pay-in-app-payments/ios-component" source_url: "https://docs.adyen.com/payment-methods/wechat-pay/wechat-pay-in-app-payments/ios-component.md" canonical: "https://docs.adyen.com/payment-methods/wechat-pay/wechat-pay-in-app-payments/ios-component" last_modified: "2025-04-29T15:09:00+02:00" language: "en" --- # WeChat Pay iOS Component Add WeChat Pay to an existing iOS Components integration. [View source](/payment-methods/wechat-pay/wechat-pay-in-app-payments/ios-component.md) This page explains how to add WeChat Pay to your existing iOS Components integration. Our WeChat Pay iOS Component renders WeChat Pay in your payment form and triggers the app switch from your app to the WeChat app on the shopper's device. ## Requirements Select the [server-side flow](/online-payments/build-your-integration) that your integration uses: ### Tab: Sessions flow | Requirement | Description | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Integration type** | Make sure that you have built a Sessions flow [iOS Components integration](/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components). | | **Setup steps** | Before you begin, [add WeChat Pay in your Customer Area](/payment-methods/add-payment-methods). | ### Tab: Advanced flow | Requirement | Description | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | **Integration type** | Make sure that you have built an Advanced flow [iOS Components integration](/online-payments/build-your-integration/advanced-flow?platform=iOS\&integration=Components). | | **Setup steps** | Before you begin, [add WeChat Pay in your Customer Area](/payment-methods/add-payment-methods). | ## Preparation Before starting your WeChat Pay integration: 1. [Create a developer account](/payment-methods/wechat-pay/wechat-pay-in-app-payments/enable-wechat-pay#create-developer-account) on the WeChat Open Platform. 2. [Register your mobile app](/payment-methods/wechat-pay/wechat-pay-in-app-payments/enable-wechat-pay#register-mobile-app) with WeChat. 3. In Xcode, go to **File** > **Project Settings** > **App Target** > **Info**, and: 1. Under **URL Types**, go to **URL Schemes**, and add your registered WeChatPay app ID with identifier **weixin** . 2. Go to **LSApplicationQueriesSchemes**, and add: * **weixin** * **weixinULAPI** * **weixinURLParamsAPI** 4. Add WeChat Pay to CocoaPods or Carthage. **CocoaPods** Add `pod 'Adyen/WeChatPay'` to your `Podfile`. **Carthage** Add `AdyenWeChatPay.framework` to: * `app "build settings"/"Build Phases"/"Embed Frameworks"`. * `app "build settings"/"Build Phases"/"Link Binary to Libraries"`. * `app "build settings"/"Build Phases"/"Dependencies"`. ## 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=iOS\&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 ### Tab: v5.0.0 or later If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the WeChat Pay Component: ```swift //Create a payment method object for WeChat Pay. let paymentMethod = paymentMethods.paymentMethod(ofType: wechatpaySDKComponentPaymentMethod.self) //Create a configuration object for the WeChat Pay Component. var wechatpaySDKComponentConfiguration = wechatpaySDKComponent.Configuration() //Set additional parameters on the configuration object. wechatpaySDKComponentConfiguration.localizationParameters = //Optional custom localization parameters. ``` There is no required WeChat Pay-specific integration for Components. ### Tab: v4.x.x There is no required WeChat Pay specific integration for Components. ## Test and go live WeChat Pay currently has no test platform. If you have a personal WeChat account you can test your integration by either: * Canceling the transaction when you are asked to verify the payment (**recommended**). * Making live WeChat Pay payments with a low value. 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 * [WeChat Open Platform](https://open.weixin.qq.com/) * [iOS Components integration guide](/online-payments/build-your-integration/sessions-flow?platform=iOS\&integration=Components) * [iOS Reference](https://adyen.github.io/adyen-ios/5.0.0/documentation/adyen/) * [Webhooks](/development-resources/webhooks) * [API Explorer](https://docs.adyen.com/api-explorer/#/CheckoutService/latest/overview)