{"title":"WeChat Pay iOS Component","category":"default","creationDate":1745932140,"content":"<p>This page explains how to add WeChat Pay to your existing iOS Components integration.<\/p>\n<p>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.<\/p>\n<h2>Requirements<\/h2>\n<p>Select the <a href=\"\/pt\/online-payments\/build-your-integration\">server-side flow<\/a> that your integration uses:<\/p>\n\n<div id=\"tabXA6Mu\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Sessions flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built a Sessions flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=iOS&amp;amp;integration=Components\\&quot;&gt;iOS Components integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add WeChat Pay in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;sessions-requirements_1&quot;,&quot;relation&quot;:&quot;sessions&quot;},{&quot;title&quot;:&quot;Advanced flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built an Advanced flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/advanced-flow?platform=iOS&amp;amp;integration=Components\\&quot;&gt;iOS Components integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add WeChat Pay in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;advanced-requirements_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Preparation<\/h2>\n<p>Before starting your WeChat Pay integration:<\/p>\n<ol>\n<li><a href=\"\/pt\/payment-methods\/wechat-pay\/wechat-pay-in-app-payments\/enable-wechat-pay#create-developer-account\">Create a developer account<\/a> on the WeChat Open Platform.<\/li>\n<li><a href=\"\/pt\/payment-methods\/wechat-pay\/wechat-pay-in-app-payments\/enable-wechat-pay#register-mobile-app\">Register your mobile app<\/a> with WeChat.<\/li>\n<li>In Xcode, go to <span translate=\"no\"><strong>File<\/strong><\/span> &gt; <span translate=\"no\"><strong>Project Settings<\/strong><\/span> &gt; <span translate=\"no\"><strong>App Target<\/strong><\/span> &gt; <span translate=\"no\"><strong>Info<\/strong><\/span>, and:\n<ol>\n<li>Under <span translate=\"no\"><strong>URL Types<\/strong><\/span>, go to <span translate=\"no\"><strong>URL Schemes<\/strong><\/span>, and add your registered WeChatPay app ID with identifier <span translate=\"no\"><strong>weixin<\/strong><\/span> .<\/li>\n<li>Go to <span translate=\"no\"><strong>LSApplicationQueriesSchemes<\/strong><\/span>, and add:\n<ul>\n<li><span translate=\"no\"><strong>weixin<\/strong><\/span><\/li>\n<li><span translate=\"no\"><strong>weixinULAPI<\/strong><\/span><\/li>\n<li><span translate=\"no\"><strong>weixinURLParamsAPI<\/strong><\/span><\/li>\n<\/ul><\/li>\n<\/ol><\/li>\n<li>\n<p>Add WeChat Pay to CocoaPods or Carthage.<\/p>\n<p><strong>CocoaPods<\/strong><\/p>\n<p>Add <code>pod 'Adyen\/WeChatPay'<\/code> to your <code>Podfile<\/code>.<\/p>\n<p><strong>Carthage<\/strong><\/p>\n<p>Add <code>AdyenWeChatPay.framework<\/code> to:<\/p>\n<ul>\n<li><code>app \"build settings\"\/\"Build Phases\"\/\"Embed Frameworks\"<\/code>.<\/li>\n<li><code>app \"build settings\"\/\"Build Phases\"\/\"Link Binary to Libraries\"<\/code>.<\/li>\n<li><code>app \"build settings\"\/\"Build Phases\"\/\"Dependencies\"<\/code>.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h2>API reference<\/h2>\n<p>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:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/sessions<\/a>&#58; This is the default with <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=iOS&amp;integration=Components\">Components v5.0.0<\/a> or later.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a>&#58; If you implemented an <a href=\"\/pt\/online-payments\/build-your-integration\">additional use case<\/a>.<\/li>\n<\/ul>\n<h2>Component configuration<\/h2>\n\n<div id=\"tabaTczl\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;v5.0.0 or later&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the WeChat Pay Component:&lt;\\\/p&gt;\\n&lt;pre&gt;&lt;code class=\\&quot;language-swift\\&quot;&gt;\\\/\\\/Create a payment method object for WeChat Pay.\\nlet paymentMethod = paymentMethods.paymentMethod(ofType: wechatpaySDKComponentPaymentMethod.self)\\n\\\/\\\/Create a configuration object for the WeChat Pay Component.\\nvar wechatpaySDKComponentConfiguration = wechatpaySDKComponent.Configuration()\\n\\\/\\\/Set additional parameters on the configuration object.\\nwechatpaySDKComponentConfiguration.localizationParameters = \\\/\\\/Optional custom localization parameters.&lt;\\\/code&gt;&lt;\\\/pre&gt;\\n&lt;p&gt;There is no required WeChat Pay-specific integration for Components.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;5&quot;,&quot;oldTabId&quot;:&quot;required-config-5_1&quot;,&quot;relation&quot;:&quot;5&quot;},{&quot;title&quot;:&quot;v4.x.x&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;There is no required WeChat Pay specific integration for Components.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;4&quot;,&quot;oldTabId&quot;:&quot;required-config-4_2&quot;,&quot;relation&quot;:&quot;4&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>WeChat Pay currently has no test platform. If you have a personal WeChat account you can test your integration by either:<\/p>\n<ul>\n<li>Canceling the transaction when you are asked to verify the payment (<strong>recommended<\/strong>).<\/li>\n<li>Making live WeChat Pay payments with a low value.\n<\/li>\n<\/ul>\n<p>You can check the status of a WeChat Pay payment in your\u00a0<a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>\u00a0&gt;\u00a0<strong>Transactions<\/strong>\u00a0&gt;\u00a0<strong>Payments<\/strong>.<\/p>\n<p><\/p>\n<p>Before you can accept live WeChat Pay payments, you need to submit a request for WeChat Pay in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"https:\/\/open.weixin.qq.com\/\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    WeChat Open Platform\n                <\/a><\/li><li><a href=\"\/online-payments\/build-your-integration\/sessions-flow?platform=iOS&amp;integration=Components\"\n                        target=\"_self\"\n                        >\n                    iOS Components integration guide\n                <\/a><\/li><li><a href=\"https:\/\/adyen.github.io\/adyen-ios\/5.0.0\/documentation\/adyen\/\"\n                        target=\"_blank\"\n                         class=\"external\">\n                     iOS Reference \n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/wechat-pay\/wechat-pay-in-app-payments\/ios-component","articleFields":{"description":"Add WeChat Pay to an existing iOS Components integration.","cache_enable":false,"parameters":{"payment_method":"WeChat Pay","country_code":"<strong>CN<\/strong>","currency":"<strong>CNY<\/strong>","payment_method_component_type":"WeChatPay","payment_method_type":"wechatpaySDK","payment_method_type_response":"<strong>wechatpaySDK<\/strong>","channel":"iOS","integration":"Components","platform":"iOS","integration_guide_url":"build-your-integration\/sessions-flow?platform=iOS&integration=Components","component_name":"the WeChat Pay Component","component_js_const":"weChatPay"},"feedback_component":true,"filters_component":false,"decision_tree":"[]","page_id":"4aea9dab-53f3-4155-b1ab-ba0c4ce4c190","last_edit_on":"29-04-2025 15:09"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/wechat-pay\/wechat-pay-in-app-payments\/ios-component","title":"WeChat Pay iOS Component","content":"This page explains how to add WeChat Pay to your existing iOS Components integration.\nOur 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.\nRequirements\nSelect the server-side flow that your integration uses:\n\n\n    \n        \n        \n    \n\n\nPreparation\nBefore starting your WeChat Pay integration:\n\nCreate a developer account on the WeChat Open Platform.\nRegister your mobile app with WeChat.\nIn Xcode, go to File &gt; Project Settings &gt; App Target &gt; Info, and:\n\nUnder URL Types, go to URL Schemes, and add your registered WeChatPay app ID with identifier weixin .\nGo to LSApplicationQueriesSchemes, and add:\n\nweixin\nweixinULAPI\nweixinURLParamsAPI\n\n\n\nAdd WeChat Pay to CocoaPods or Carthage.\nCocoaPods\nAdd pod 'Adyen\/WeChatPay' to your Podfile.\nCarthage\nAdd AdyenWeChatPay.framework to:\n\napp \"build settings\"\/\"Build Phases\"\/\"Embed Frameworks\".\napp \"build settings\"\/\"Build Phases\"\/\"Link Binary to Libraries\".\napp \"build settings\"\/\"Build Phases\"\/\"Dependencies\".\n\n\n\nAPI reference\nYou 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:\n\n \/sessions&#58; This is the default with Components v5.0.0 or later.\n \/payments&#58; If you implemented an additional use case.\n\nComponent configuration\n\n\n    \n        \n        \n    \n\n\nTest and go live\nWeChat Pay currently has no test platform. If you have a personal WeChat account you can test your integration by either:\n\nCanceling the transaction when you are asked to verify the payment (recommended).\nMaking live WeChat Pay payments with a low value.\n\n\nYou can check the status of a WeChat Pay payment in your\u00a0Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\n\nBefore you can accept live WeChat Pay payments, you need to submit a request for WeChat Pay in your live Customer Area.\nSee also\n\n\n                    WeChat Open Platform\n                \n                    iOS Components integration guide\n                \n                     iOS Reference \n                \n                    Webhooks\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"WeChat Pay","lvl3":"WeChat Pay in-app payments","lvl4":"WeChat Pay iOS Component"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/wechat-pay","lvl3":"https:\/\/docs.adyen.com\/pt\/payment-methods\/wechat-pay\/wechat-pay-in-app-payments","lvl4":"\/pt\/payment-methods\/wechat-pay\/wechat-pay-in-app-payments\/ios-component"},"levels":5,"category":"Payment method","category_color":"green","tags":["WeChat","Component"]},"articleFiles":{"wechat-paymentdetails.js":"<p alt=\"\">wechat-paymentdetails.js<\/p>","wechat-payments.js":"<p alt=\"\">wechat-payments.js<\/p>"}}
