No momento, esta página não está disponível em português
Payment-method icon

WeChat Pay iOS Component

Add WeChat Pay to an existing iOS Components integration.

On this page, you can find additional configuration for adding WeChat Pay to your Components integration.

Before you begin

This page assumes you have already:

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.

Before you begin

This page explains how to add WeChat Pay to your existing iOS Components integration. The iOS Components integration works the same way for all payment methods. If you haven't done this integration yet, refer to our Components integration guide.

Before starting your WeChat Pay integration:

  1. Make sure that you have set up your back end implementation for making API requests.
  2. Add WeChat Pay in your test Customer Area.
  3. Create a developer account on the WeChat Open Platform.
  4. Register your mobile app with WeChat.
  5. In Xcode, go to File > Project Settings > App Target > Info, and:
    a. Under URL Types, go to URL Schemes, and add your registered WeChatPay app ID with identifier weixin .
    b. Go to LSApplicationQueriesSchemes, and add weixin.
  6. Add WeChat Pay to CocoaPods or Carthage.


    Add pod 'Adyen/WeChatPay' to your Podfile.


    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 don't 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:

Component configuration

If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the WeChat Pay Component:

//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.

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 > Transactions > Payments.

Before you can accept live WeChat Pay payments, you need to submit a request for WeChat Pay in your live Customer Area.

See also