{"title":"iOS 3D Secure 2 SDK","category":"default","creationDate":1677060120,"content":"<div class=\"sc-notice warning\"><div>\n<p><strong>Adyen is no longer developing the Classic API integration<\/strong><\/p>\n<p>This page is for the Classic API (<code>\/authorise<\/code>) integration, which we no longer accept new integrations with. <\/p>\n<p>We strongly recommend migrating to the newer <a href=\"\/online-payments\/3d-secure\/native-3ds2\/ios\">Native 3D Secure 2 for iOS<\/a> integration. To use this newer integration, you must also <a href=\"\/pt\/online-payments\/upgrade-your-integration\/migrate-to-checkout-api\">migrate to the Checkout API<\/a>.<\/p>\n<\/div><\/div>\n<div class=\"additional-info-block output-inline\">\n<h5 class=\"article__heading additional-info-block__title\">PSD2 compliance<\/h5><div class=\"additional-info-block__body\"><p>If you are implementing 3D Secure to comply with PSD2 SCA, learn more from our <a href=\"\/pt\/online-payments\/psd2-sca-compliance-and-implementation-guide\">comprehensive guide<\/a>.<\/p><\/div><\/div>\n\n<p>The <a href=\"https:\/\/github.com\/Adyen\/adyen-3ds2-ios\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Adyen 3DS2 iOS SDK<\/a> gets the device fingerprint and presents the challenge to your shopper. From your server, you need to send a payment request, the encrypted device fingerprint, and the challenge result to Adyen.<\/p>\n<p>In a full 3D Secure 2 implementation, a payment can go through either a <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2#frictionless-flow\">frictionless<\/a> or a <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2#challenge-flow\">challenge<\/a> authentication flow before it can be authorised.<\/p>\n<p>If you only want to perform a 3D Secure 2 authentication and then authorise the payment later, refer to the <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/authentication-only-integration\">Authentication-only<\/a> documentation.<\/p>\n<h3>How it works<\/h3>\n<p>Here's how a 3D Secure 2 challenge authentication flow works:<\/p>\n<p><a rel=\"lightbox\" href=\"\/user\/pages\/docs\/02.online-payments\/60.classic-integrations\/01.classic-api-integration\/03.3d-secure-authentication\/09.native-3ds2\/02.ios-sdk-integration\/3ds2-ios.png\" src=\"\">\n  <img alt=\"\" src=\"\/user\/pages\/docs\/02.online-payments\/60.classic-integrations\/01.classic-api-integration\/03.3d-secure-authentication\/09.native-3ds2\/02.ios-sdk-integration\/3ds2-ios.png\" \/>\n<\/a><\/p>\n<ol>\n<li><a href=\"#submit-a-payment-request\">Submit a payment request<\/a>\u00a0with the required 3D Secure 2 objects to start the authentication process.\u00a0Build your implementation depending on the\u00a0<code>resultCode<\/code>\u00a0returned in the response. If the transaction is exempted from 3D Secure, you might get an <strong>Authorised<\/strong> result code.<\/li>\n<li>If you receive an <strong>IdentifyShopper<\/strong> <code>resultCode<\/code>, <a href=\"#get-the-3d-secure-2-device-fingerprint\">get the 3D Secure 2 device fingerprint<\/a> and send the encrypted device fingerprint information to Adyen. After you send the device fingerprint, it is possible that you receive an <strong>Authorised<\/strong><code>resultCode<\/code> in the response. This means that the 3D Secure 2 authentication was frictionless, and the payment was authorised.<\/li>\n<li>If you receive\u00a0<strong>ChallengeShopper<\/strong><code>resultCode<\/code>, this means that the issuer requires further shopper interaction and you need to <a href=\"#present-a-challenge\">present a challenge to the shopper<\/a>.<\/li>\n<\/ol>\n<p>The payment might also be <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2#3d-secure-1-fallback\">routed to 3D Secure 1<\/a>, based on issuer performance. This is indicated by a\u00a0<strong>RedirectShopper<\/strong>\u00a0<code>resultCode<\/code>. If you do not want to automatically fall back to 3D Secure 1, contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>.<\/p>\n<p>To test your integration, see\u00a0<a href=\"#testing-3d-secure-2\">Testing 3D Secure 2<\/a>.<\/p>\n<h2 id=\"before-you-begin\">Before\u00a0you begin<\/h2>\n<div class=\"additional-info-block output-inline\">\n<h5 class=\"article__heading additional-info-block__title\">Adyen 3DS2 iOS<\/h5><div class=\"additional-info-block__body\"><p>Subscribe to our <a href=\"https:\/\/github.com\/Adyen\/adyen-3ds2-ios\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">GitHub repository<\/a> to get the latest updates and versions.<\/p><\/div><\/div>\n\n<p>Before you begin to integrate, make sure you have followed the <a href=\"\/pt\/get-started-with-adyen\">Get started with Adyen guide<\/a> to:<\/p>\n<ul>\n<li>Get an overview of the steps needed to accept live payments.<\/li>\n<li>Create your test account.<\/li>\n<\/ul>\n<p>After you have created your test account:<\/p>\n<ol>\n<li>\n<p><a href=\"\/pt\/development-resources\/api-credentials#generate-api-key\">Get your API Key<\/a>. Save a copy, because you'll need it for API calls you make to the Adyen payments platform.<\/p>\n<\/li>\n<li>\n<p>Install one of our\u00a0<a href=\"\/pt\/development-resources\/libraries\">Libraries<\/a>\u00a0to connect with the Adyen APIs.<\/p>\n<\/li>\n<li>\n<p>Install the <a href=\"https:\/\/github.com\/Adyen\/adyen-3ds2-ios\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Adyen 3DS2 iOS SDK latest version<\/a>. You must use version 2.3.0 or later to trigger the 3D Secure 2 native flow. You can install the SDK through CocoaPods, Carthage, or by manually installing the SDK as a dynamic or static framework.<\/p>\n<\/li>\n<\/ol>\n\n<div id=\"tabbKSMQ\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;CocoaPods&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;Add pod\\u00a0&lt;code&gt;&#039;Adyen3DS2&#039;&lt;\\\/code&gt;\\u00a0to your Podfile.&lt;\\\/li&gt;\\n&lt;li&gt;Run\\u00a0&lt;code&gt;pod install&lt;\\\/code&gt;.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;cocoapods_0_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Carthage&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;Add &lt;code&gt;github \\&quot;adyen\\\/adyen-3ds2-ios\\&quot;&lt;\\\/code&gt; to your &lt;code&gt;Cartfile&lt;\\\/code&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Run &lt;code&gt;carthage update&lt;\\\/code&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Link the framework with your target as described in &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Carthage\\\/Carthage#adding-frameworks-to-an-application\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Carthage Readme&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;carthage_1_2&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Dynamic or static framework&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;&lt;strong&gt;Install manually as a dynamic framework&lt;\\\/strong&gt;&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;In Xcode, drag the dynamic XCFramework\\\/Dynamic\\\/Adyen3DS2.xcframework to the &lt;strong&gt;Frameworks, Libraries, and Embedded Content&lt;\\\/strong&gt; section in your General Target settings. Select &lt;strong&gt;Copy items if needed&lt;\\\/strong&gt; when asked.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&lt;p&gt;&lt;strong&gt;Install manually as a static framework&lt;\\\/strong&gt;&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;In Xcode, select\\u00a0&lt;strong&gt;File&lt;\\\/strong&gt;\\u00a0&amp;gt;\\u00a0&lt;strong&gt;Add Files to...&lt;\\\/strong&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Select the static\\u00a0&lt;code&gt;Adyen3DS2.framework&lt;\\\/code&gt;\\u00a0and check\\u00a0&lt;strong&gt;Copy items if needed&lt;\\\/strong&gt;, then select\\u00a0&lt;strong&gt;Add&lt;\\\/strong&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;In Xcode, select\\u00a0&lt;strong&gt;File&lt;\\\/strong&gt;\\u00a0&amp;gt;\\u00a0&lt;strong&gt;Add Files to...&lt;\\\/strong&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Select\\u00a0&lt;strong&gt;Adyen3DS2.bundle&lt;\\\/strong&gt;\\u00a0inside\\u00a0&lt;strong&gt;Adyen3DS2.framework&lt;\\\/strong&gt;\\u00a0and check\\u00a0&lt;strong&gt;Copy items if needed&lt;\\\/strong&gt;, then select\\u00a0&lt;strong&gt;Add&lt;\\\/strong&gt;.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;dynamic_or_static_framework_2_3&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Swift Package Manager&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;Use Xcode 12.0 or later when adding Adyen 3D Secure 2 using Swift Package Manager.&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;Follow &lt;a href=\\&quot;https:\\\/\\\/developer.apple.com\\\/documentation\\\/xcode\\\/adding-package-dependencies-to-your-app\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Apple&#039;s instructions&lt;\\\/a&gt; to add a Swift Package dependency.&lt;\\\/li&gt;\\n&lt;li&gt;Use &lt;code&gt;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-3ds2-ios&lt;\\\/code&gt; as the repository URL.&lt;\\\/li&gt;\\n&lt;li&gt;Specify version &lt;strong&gt;2.2.1.&lt;\\\/strong&gt; or later.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:&quot;swift_package_manager_3_4&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2 id=\"submit-a-payment-request\">Step 1: Submit a\u00a0payment request<\/h2>\n<p>Collect your shopper's card details then make a payment with a POST <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise<\/a> request, and include the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter name<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/latest\/post\/authorise__reqParam_card\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">card<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Object that contains the shopper's card details.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Payment\/latest\/post\/authorise#request-threeDS2RequestData-deviceChannel\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">threeDS2RequestData.deviceChannel<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Set to <strong>app<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/latest\/post\/authorise__reqParam_browserInfo\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">browserInfo<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>Object that contains the <code>userAgent<\/code> and <code>acceptHeader<\/code> fields. Indicates that your integration can handle <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/3d-secure-1\">3D Secure 1 redirect authentication<\/a> in case the transaction is <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2#3d-secure-1-fallback\">routed to 3D Secure 1<\/a>. If your integration is unable to generate this information, you can send the same data as in the request below.<\/td>\n<\/tr>\n<tr>\n<td><a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/ios-sdk-integration#get-the-sdk-version\">sdkVersion<\/a><\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>We recommend you use the <code>ADY3DS2SDKVersion()<\/code> function to determine your 3DS2 sdkVersion. You can also get the sdkVersion from <a href=\"https:\/\/github.com\/Adyen\/adyen-3ds2-ios\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Github<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sc-notice note\"><div>\n<p>You can send <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/api-reference-3d-secure-2#3d-secure-2-additional-parameters\">additional parameters<\/a> for better authorization rates, and to increase the chance of a frictionless flow. You do not have to send all the additional parameters.  Send parameters that you know you can provide accurately, or that are mandatory in specific scenarios.<\/p>\n<\/div><\/div>\n<p>Here is an example of how to make a request for a <strong>EUR&nbsp;150<\/strong> purchase:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'789911376'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/pal-test.adyen.com\\\/pal\\\/servlet\\\/Payment\\\/v68\\\/authorise \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;amount\\&quot;:{\\n      \\&quot;currency\\&quot;:\\&quot;EUR\\&quot;,\\n      \\&quot;value\\&quot;:15000\\n    },\\n    \\&quot;merchantAccount\\&quot;:\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n    \\&quot;threeDS2RequestData\\&quot;:{\\n      \\&quot;deviceChannel\\&quot;:\\&quot;app\\&quot;,\\n      \\&quot;{hint:Required to trigger native. Get your sdkVersion and send it here. Do not hard code your sdkVersion.}sdkVersion{\\\/hint}\\&quot;: \\&quot;STATE_DATA\\&quot;\\n  },\\n  \\&quot;card\\&quot;:{\\n  \\&quot;cvc\\&quot;:\\&quot;737\\&quot;,\\n  \\&quot;expiryMonth\\&quot;:\\&quot;03\\&quot;,\\n  \\&quot;expiryYear\\&quot;:\\&quot;2030\\&quot;,\\n  \\&quot;holderName\\&quot;:\\&quot;Simon Hopper\\&quot;,\\n  \\&quot;number\\&quot;:\\&quot;4917610000000000\\&quot;\\n  },\\n  \\&quot;{hint:Required for 3D Secure 1}browserInfo{\\\/hint}\\&quot;: {\\n  \\&quot;userAgent\\&quot;:\\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;,\\n  \\&quot;acceptHeader\\&quot;:\\&quot;text\\\\\\\/html,application\\\\\\\/xhtml+xml,application\\\\\\\/xml;q=0.9,image\\\\\\\/webp,image\\\\\\\/apng,*\\\\\\\/*;q=0.8\\&quot;\\n  }\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v26.3.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.payment.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;EUR\\&quot;)\\n  .value(15000L);\\n\\nThreeDS2RequestData threeDS2RequestData = new ThreeDS2RequestData()\\n  .sdkVersion(\\&quot;STATE_DATA\\&quot;)\\n  .deviceChannel(\\&quot;app\\&quot;);\\n\\nCard card = new Card()\\n  .cvc(\\&quot;737\\&quot;)\\n  .number(\\&quot;4917610000000000\\&quot;)\\n  .holderName(\\&quot;Simon Hopper\\&quot;)\\n  .expiryMonth(\\&quot;03\\&quot;)\\n  .expiryYear(\\&quot;2030\\&quot;);\\n\\nBrowserInfo browserInfo = new BrowserInfo()\\n  .acceptHeader(\\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;)\\n  .userAgent(\\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;);\\n\\nPaymentRequest paymentRequest = new PaymentRequest()\\n  .reference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .amount(amount)\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  .threeDS2RequestData(threeDS2RequestData)\\n  .card(card)\\n  .browserInfo(browserInfo);\\n\\n\\\/\\\/ Send the request\\npaymentApi service = new paymentApi(client);\\nPaymentResult response = service.authorise(paymentRequest, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v18.2.1\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Payments\\\\Amount;\\nuse Adyen\\\\Model\\\\Payments\\\\ThreeDS2RequestData;\\nuse Adyen\\\\Model\\\\Payments\\\\Card;\\nuse Adyen\\\\Model\\\\Payments\\\\BrowserInfo;\\nuse Adyen\\\\Model\\\\Payments\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Payments\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;EUR\\&quot;)\\n  -&gt;setValue(15000);\\n\\n$threeDS2RequestData = new ThreeDS2RequestData();\\n$threeDS2RequestData\\n  -&gt;setSdkVersion(\\&quot;STATE_DATA\\&quot;)\\n  -&gt;setDeviceChannel(\\&quot;app\\&quot;);\\n\\n$card = new Card();\\n$card\\n  -&gt;setCvc(\\&quot;737\\&quot;)\\n  -&gt;setNumber(\\&quot;4917610000000000\\&quot;)\\n  -&gt;setHolderName(\\&quot;Simon Hopper\\&quot;)\\n  -&gt;setExpiryMonth(\\&quot;03\\&quot;)\\n  -&gt;setExpiryYear(\\&quot;2030\\&quot;);\\n\\n$browserInfo = new BrowserInfo();\\n$browserInfo\\n  -&gt;setAcceptHeader(\\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;)\\n  -&gt;setUserAgent(\\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setThreeDS2RequestData($threeDS2RequestData)\\n  -&gt;setCard($card)\\n  -&gt;setBrowserInfo($browserInfo);\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;authorise($paymentRequest);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Payment;\\nusing Adyen.Service;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;EUR\\&quot;,\\n  Value = 15000\\n};\\n\\nThreeDS2RequestData threeDS2RequestData = new ThreeDS2RequestData\\n{\\n  SdkVersion = \\&quot;STATE_DATA\\&quot;,\\n  DeviceChannel = \\&quot;app\\&quot;\\n};\\n\\nCard card = new Card\\n{\\n  Cvc = \\&quot;737\\&quot;,\\n  Number = \\&quot;4917610000000000\\&quot;,\\n  HolderName = \\&quot;Simon Hopper\\&quot;,\\n  ExpiryMonth = \\&quot;03\\&quot;,\\n  ExpiryYear = \\&quot;2030\\&quot;\\n};\\n\\nBrowserInfo browserInfo = new BrowserInfo\\n{\\n  AcceptHeader = \\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;,\\n  UserAgent = \\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;\\n};\\n\\nPaymentRequest paymentRequest = new PaymentRequest\\n{\\n  Reference = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount = amount,\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  ThreeDS2RequestData = threeDS2RequestData,\\n  Card = card,\\n  BrowserInfo = browserInfo\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentService(client);\\nvar response = service.Authorise(paymentRequest);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v17.3.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, PaymentAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  amount: {\\n    currency: \\&quot;EUR\\&quot;,\\n    value: 15000\\n  },\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  threeDS2RequestData: {\\n    deviceChannel: \\&quot;app\\&quot;,\\n    sdkVersion: \\&quot;STATE_DATA\\&quot;\\n  },\\n  card: {\\n    cvc: \\&quot;737\\&quot;,\\n    expiryMonth: \\&quot;03\\&quot;,\\n    expiryYear: \\&quot;2030\\&quot;,\\n    holderName: \\&quot;Simon Hopper\\&quot;,\\n    number: \\&quot;4917610000000000\\&quot;\\n  },\\n  browserInfo: {\\n    userAgent: \\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;,\\n    acceptHeader: \\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;\\n  }\\n}\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise(paymentRequest);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/payments\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := payments.Amount{\\n  Currency: \\&quot;EUR\\&quot;,\\n  Value: 15000,\\n}\\n\\nthreeDS2RequestData := payments.ThreeDS2RequestData{\\n  SdkVersion: common.PtrString(\\&quot;STATE_DATA\\&quot;),\\n  DeviceChannel: \\&quot;app\\&quot;,\\n}\\n\\ncard := payments.Card{\\n  Cvc: common.PtrString(\\&quot;737\\&quot;),\\n  Number: common.PtrString(\\&quot;4917610000000000\\&quot;),\\n  HolderName: common.PtrString(\\&quot;Simon Hopper\\&quot;),\\n  ExpiryMonth: common.PtrString(\\&quot;03\\&quot;),\\n  ExpiryYear: common.PtrString(\\&quot;2030\\&quot;),\\n}\\n\\nbrowserInfo := payments.BrowserInfo{\\n  AcceptHeader: \\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;,\\n  UserAgent: \\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;,\\n}\\n\\npaymentRequest := payments.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  ThreeDS2RequestData: &amp;threeDS2RequestData,\\n  Card: &amp;card,\\n  BrowserInfo: &amp;browserInfo,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Payments()\\nreq := service.PaymentsApi.AuthoriseInput().PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Authorise(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;,\\n    \\&quot;value\\&quot;: 15000\\n  },\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;threeDS2RequestData\\&quot;: {\\n    \\&quot;deviceChannel\\&quot;: \\&quot;app\\&quot;,\\n    \\&quot;sdkVersion\\&quot;: \\&quot;STATE_DATA\\&quot;\\n  },\\n  \\&quot;card\\&quot;: {\\n    \\&quot;cvc\\&quot;: \\&quot;737\\&quot;,\\n    \\&quot;expiryMonth\\&quot;: \\&quot;03\\&quot;,\\n    \\&quot;expiryYear\\&quot;: \\&quot;2030\\&quot;,\\n    \\&quot;holderName\\&quot;: \\&quot;Simon Hopper\\&quot;,\\n    \\&quot;number\\&quot;: \\&quot;4917610000000000\\&quot;\\n  },\\n  \\&quot;browserInfo\\&quot;: {\\n    \\&quot;userAgent\\&quot;: \\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;,\\n    \\&quot;acceptHeader\\&quot;: \\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;\\n  }\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise(request=json_request)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :amount =&gt; {\\n    :currency =&gt; 'EUR',\\n    :value =&gt; 15000\\n  },\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :threeDS2RequestData =&gt; {\\n    :deviceChannel =&gt; 'app',\\n    :sdkVersion =&gt; 'STATE_DATA'\\n  },\\n  :card =&gt; {\\n    :cvc =&gt; '737',\\n    :expiryMonth =&gt; '03',\\n    :expiryYear =&gt; '2030',\\n    :holderName =&gt; 'Simon Hopper',\\n    :number =&gt; '4917610000000000'\\n  },\\n  :browserInfo =&gt; {\\n    :userAgent =&gt; 'Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1',\\n    :acceptHeader =&gt; 'text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8'\\n  }\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise(request_body)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v17.3.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, PaymentAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.payment.Amount = {\\n  currency: \\&quot;EUR\\&quot;,\\n  value: 15000\\n};\\n\\nconst threeDS2RequestData: Types.payment.ThreeDS2RequestData = {\\n  sdkVersion: \\&quot;STATE_DATA\\&quot;,\\n  deviceChannel: \\&quot;app\\&quot;\\n};\\n\\nconst card: Types.payment.Card = {\\n  cvc: \\&quot;737\\&quot;,\\n  number: \\&quot;4917610000000000\\&quot;,\\n  holderName: \\&quot;Simon Hopper\\&quot;,\\n  expiryMonth: \\&quot;03\\&quot;,\\n  expiryYear: \\&quot;2030\\&quot;\\n};\\n\\nconst browserInfo: Types.payment.BrowserInfo = {\\n  acceptHeader: \\&quot;text\\\/html,application\\\/xhtml+xml,application\\\/xml;q=0.9,image\\\/webp,image\\\/apng,*\\\/*;q=0.8\\&quot;,\\n  userAgent: \\&quot;Mozilla\\\/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit\\\/604.1.38 (KHTML, like Gecko) Version\\\/11.0 Mobile\\\/15A5370a Safari\\\/604.1\\&quot;\\n};\\n\\nconst paymentRequest: Types.payment.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  threeDS2RequestData: threeDS2RequestData,\\n  card: card,\\n  browserInfo: browserInfo\\n};\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise(paymentRequest);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p><a id=\"payment-response-params\"><\/a><\/p>\n<p>You receive a response containing a <code>resultCode<\/code> of:<\/p>\n<ul>\n<li>\n<p>\u00a0<strong>IdentifyShopper<\/strong>. This means that you need to perform the\u00a0<a href=\"#get-the-3d-secure-2-device-fingerprint\">Identify the shopper<\/a>\u00a0flow. You also get the following parameters from the response, which you'll need to create a transaction in the SDK:<\/p>\n<ul>\n<li><code>additionalData.threeds2.threeDS2DirectoryServerInformation.directoryServerId<\/code><\/li>\n<li><code>additionalData.threeds2.threeDS2DirectoryServerInformation.publicKey<\/code><\/li>\n<li><code>additionalData.threeds2.threeDS2ResponseData.messageVersion<\/code><\/li>\n<li><code>additionalData.threeds2.threeDS2DirectoryServerInformation.rootCertificates<\/code><\/li>\n<\/ul>\n<p>You will also receive a <code>threeds2.threeDS2Token<\/code> which you will need to store for later use.<\/p>\n<\/li>\n<\/ul>\n<div class=\"sc-notice note\"><div>\n<p>To optimize authorization rates, Adyen's <a href=\"https:\/\/www.adyen.com\/knowledge-hub\/psd2-simplified-with-our-new-authentication-engine\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Authentication Engine<\/a> routes each payment to either the 3D Secure 2 or the 3D Secure 1 flow, based on issuer performance. See\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2#3d-secure-1-fallback\">3D Secure fallback<\/a> for more information.<\/p>\n<\/div><\/div>\n<div class=\"notices green\">\n<p>For a complete list of <code>resultCode<\/code> values and the actions you need to take, see\u00a0<a href=\"\/pt\/online-payments\/payment-result-codes\">Result codes<\/a>.<\/p>\n<\/div>\n<p>Here's an example of a response showing an <strong>IdentifyShopper<\/strong> result code:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Response with IdentifyShopper'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"additionalData\\\": {\\n        \\\"threeds2.threeDSServerTransID\\\": \\\"055fadfb-9fe4-4e70-99f0-9b8935bf1eb2\\\",\\n        \\\"threeds2.threeDS2DirectoryServerInformation.algorithm\\\": \\\"RSA\\\",\\n        \\\"threeds2.threeDS2ResponseData.messageVersion\\\" : \\\"2.1.0\\\",\\n        \\\"threeds2.threeDS2Token\\\": \\\"BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\\",\\n        \\\"threeds2.threeDS2DirectoryServerInformation.directoryServerId\\\": \\\"A000000003\\\",\\n        \\\"threeds2.threeDS2DirectoryServerInformation.publicKey\\\": \\\"eyJrdHkiOiJSU0EiLCJlIjoiQVFBQiIsIm4iOiI4VFBxZkFQ==...\\\",\\n        \\\"threeds2.threeDS2DirectoryServerInformation.rootCertificates\\\": \\\"........\\\"\\n    },\\n    \\\"pspReference\\\": \\\"8835495304426403\\\",\\n    \\\"resultCode\\\": \\\"IdentifyShopper\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"get-the-3d-secure-2-device-fingerprint\">Step 2: Get the 3D Secure 2 device fingerprint<\/h2>\n<p>If your server receives\u00a0<strong>IdentifyShopper<\/strong> <code>resultCode<\/code>, start the 3D Secure 2 device fingerprinting process.<\/p>\n<ol>\n<li>\n<p>In your app, create an instance of\u00a0<a href=\"https:\/\/adyen.github.io\/adyen-3ds2-ios\/2.3.1\/documentation\/adyen3ds2\/adyserviceparameters\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>ADYServiceParameters<\/code>\n<\/a> passing the <code>directoryServerId<\/code> and the <code>publicKey<\/code> parameters from the <code>\/authorise<\/code> <a href=\"#payment-response-params\">response<\/a> or from your <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/browser-based-integration#optional-prefetch-device-fingerprinting-keys\">prefetched cached keys<\/a>.<\/p>\n<pre><code class=\"language-swift\">ADYServiceParameters *parameters = [ADYServiceParameters new];\n[parameters setDirectoryServerIdentifier:...]; \/\/ Retrieved from \/authorise response.\n[parameters setDirectoryServerPublicKey:...]; \/\/ Retrieved from \/authorise response.\n[parameters setDirectoryServerRootCertificates:...]; \/\/ Retrieved from \/authorise response.<\/code><\/pre>\n<\/li>\n<li>\n<p>Use the <a href=\"https:\/\/adyen.github.io\/adyen-3ds2-ios\/2.3.1\/documentation\/adyen3ds2\/adyservice\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>ADYService<\/code>\n<\/a> class to create a transaction.<\/p>\n<p>When using <a href=\"https:\/\/github.com\/Adyen\/adyen-3ds2-ios\/releases\/tag\/2.2.0\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Adyen 3DS2 iOS SDK version 2.2.0 and later<\/a>, you must set <code>transactionWithMessageVersion<\/code> to the value of <code>additionalData.threeds2.threeDS2ResponseData.messageVersion<\/code> from the <code>\/authorise<\/code> response.<br \/>\nFor more information about the latest version, refer to <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/migrating-to-2-2\">Migrating to 3DS2 SDK version 2.2.0<\/a>.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>Keep a reference to your <code>ADYTransaction<\/code> instance until the transaction is complete.<\/p>\n<\/div><\/div>\n<p>The following example shows how to create a transaction, using the <code>messageVersion<\/code>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Create a transaction in the SDK'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;swift&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;[ADYService serviceWithParameters:parameters appearanceConfiguration:nil completionHandler:^(ADYService *service) {\\n    NSError *error = nil;\\n    \\\/\\\/ We've set threedsMessageVersion to the value of additionalData.threeds2.threeDS2ResponseData.messageVersion\\n    ADYTransaction *transaction = [service transactionWithMessageVersion:threedsMessageVersion error:&amp;error];\\n    if (transaction) {\\n        ADYAuthenticationRequestParameters *authenticationRequestParameters = [transaction authenticationRequestParameters];\\n        \\\/\\\/ Submit the authenticationRequestParameters to \\\/authorise3ds2.\\n    } else {\\n        \\\/\\\/ An error occurred.\\n    }\\n}];&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<p><\/p>\n<ol start=\"4\">\n<li>\n<p>Get the transaction's\u00a0<code>authenticationRequestParameters<\/code>\u00a0 class and pass the contents to your server.<br \/>\nYou'll get the following information:<\/p>\n<ul>\n<li><code>deviceInformation<\/code><\/li>\n<li><code>SDKTransactionIdentifier<\/code><\/li>\n<li><code>SDKApplicationIdentifier<\/code><\/li>\n<li><code>SDKReferenceNumber<\/code><\/li>\n<li><code>SDKEphemeralPublicKey<\/code>\n<p><\/p><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>From your server, make a POST\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise3ds2\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise3ds2<\/a>\u00a0request to send the encrypted device fingerprint information to Adyen, specifying the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Payment\/latest\/post\/authorise3ds2#request-threeDS2RequestData\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">threeDS2RequestData<\/a> object containing:<\/p>\n<ul>\n<li><code>sdkEncData<\/code>: Device information<\/li>\n<li><code>sdkTransID<\/code>: SDK Transaction Identifier<\/li>\n<li><code>sdkAppID<\/code>: SDK Application Identifier<\/li>\n<li><code>sdkReferenceNumber<\/code>: SDK Reference Number<\/li>\n<li><code>sdkEphemPubKey<\/code>: Object that contains the SDK Ephemeral Public Key. The SDK provides output as a string. Transform this string into a JSON object to send in your <a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise3ds2\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise3ds2<\/a> request.<\/li>\n<\/ul>\n<p>Also make sure you include the <code>threeds2.threeDS2Token<\/code> that was returned in the previous request.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>You can send <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/api-reference-3d-secure-2#3d-secure-2-additional-parameters\">additional parameters<\/a> for better authorization rates, and to increase the chance of a frictionless flow. You do not have to send all the additional parameters.  Send parameters that you know you can provide accurately, or that are mandatory in specific scenarios.<\/p>\n<\/div><\/div>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Send device fingerprint to Adyen'\" :id=\"'send-device-fingerprint-to-adyen-2441894243'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/pal-test.adyen.com\\\/pal\\\/servlet\\\/Payment\\\/v68\\\/authorise3ds2 \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n   \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;threeDS2Token\\&quot;: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;,\\n   \\&quot;threeDS2RequestData\\&quot;: {\\n     \\&quot;deviceChannel\\&quot;: \\&quot;app\\&quot;,\\n     \\&quot;sdkAppID\\&quot;: \\&quot;9063b12c-fcde-43c7-b28e-8d0af5520e8a\\&quot;,\\n     \\&quot;sdkEncData\\&quot;: \\&quot;&lt;device-fingerprint&gt;\\&quot;,\\n     \\&quot;sdkEphemPubKey\\&quot;: {\\n       \\&quot;crv\\&quot;: \\&quot;P-256\\&quot;,\\n       \\&quot;kty\\&quot;: \\&quot;EC\\&quot;,\\n       \\&quot;x\\&quot;: \\&quot;LYImJkRzS92vogM6AUPCBhJ20VagSe8IL0Q9SdisUSo\\&quot;,\\n       \\&quot;y\\&quot;: \\&quot;Rav4sKHnLUIUHVdyR4dyV7G2_EeAnuCn_6621ZhqZYU\\&quot;\\n     },\\n     \\&quot;sdkReferenceNumber\\&quot;: \\&quot;3DS_LOA_SDK_ADBV_739485_94783\\&quot;,\\n     \\&quot;sdkTransID\\&quot;: \\&quot;b60c9879-ac77-4918-a317-7b01c4317053\\\/8Q==..\\&quot;\\n   }\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v32.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.payment.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\npaymentApi service = new paymentApi(client);\\nPaymentResult response = service.authorise3ds2(paymentRequest3ds2, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v23.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\Payments\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;authorise3ds2($paymentRequest3ds2);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v26.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Payment;\\nusing Adyen.Service;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nvar service = new PaymentService(client);\\nvar response = service.Authorise3ds2(paymentRequest3ds2);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v22.1.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, PaymentAPI } = require('@adyen\\\/api-library');\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest3ds2 = {\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  threeDS2Token: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;,\\n  threeDS2RequestData: {\\n    deviceChannel: \\&quot;app\\&quot;,\\n    sdkAppID: \\&quot;9063b12c-fcde-43c7-b28e-8d0af5520e8a\\&quot;,\\n    sdkEncData: \\&quot;&lt;device-fingerprint&gt;\\&quot;,\\n    sdkEphemPubKey: {\\n      crv: \\&quot;P-256\\&quot;,\\n      kty: \\&quot;EC\\&quot;,\\n      x: \\&quot;LYImJkRzS92vogM6AUPCBhJ20VagSe8IL0Q9SdisUSo\\&quot;,\\n      y: \\&quot;Rav4sKHnLUIUHVdyR4dyV7G2_EeAnuCn_6621ZhqZYU\\&quot;\\n    },\\n    sdkReferenceNumber: \\&quot;3DS_LOA_SDK_ADBV_739485_94783\\&quot;,\\n    sdkTransID: \\&quot;b60c9879-ac77-4918-a317-7b01c4317053\\\/8Q==..\\&quot;\\n  }\\n}\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise3ds2(paymentRequest3ds2);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v16.1.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/payments\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nservice := client.Payments()\\nreq := service.PaymentsApi.Authorise3ds2Input().PaymentRequest3ds2(paymentRequest3ds2)\\nres, httpRes, err := service.PaymentsApi.Authorise3ds2(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v13.2.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;threeDS2Token\\&quot;: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;,\\n  \\&quot;threeDS2RequestData\\&quot;: {\\n    \\&quot;deviceChannel\\&quot;: \\&quot;app\\&quot;,\\n    \\&quot;sdkAppID\\&quot;: \\&quot;9063b12c-fcde-43c7-b28e-8d0af5520e8a\\&quot;,\\n    \\&quot;sdkEncData\\&quot;: \\&quot;&lt;device-fingerprint&gt;\\&quot;,\\n    \\&quot;sdkEphemPubKey\\&quot;: {\\n      \\&quot;crv\\&quot;: \\&quot;P-256\\&quot;,\\n      \\&quot;kty\\&quot;: \\&quot;EC\\&quot;,\\n      \\&quot;x\\&quot;: \\&quot;LYImJkRzS92vogM6AUPCBhJ20VagSe8IL0Q9SdisUSo\\&quot;,\\n      \\&quot;y\\&quot;: \\&quot;Rav4sKHnLUIUHVdyR4dyV7G2_EeAnuCn_6621ZhqZYU\\&quot;\\n    },\\n    \\&quot;sdkReferenceNumber\\&quot;: \\&quot;3DS_LOA_SDK_ADBV_739485_94783\\&quot;,\\n    \\&quot;sdkTransID\\&quot;: \\&quot;b60c9879-ac77-4918-a317-7b01c4317053\\\/8Q==..\\&quot;\\n  }\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise3ds2(request=json_request)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v10.1.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :threeDS2Token =&gt; 'BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...',\\n  :threeDS2RequestData =&gt; {\\n    :deviceChannel =&gt; 'app',\\n    :sdkAppID =&gt; '9063b12c-fcde-43c7-b28e-8d0af5520e8a',\\n    :sdkEncData =&gt; '&lt;device-fingerprint&gt;',\\n    :sdkEphemPubKey =&gt; {\\n      :crv =&gt; 'P-256',\\n      :kty =&gt; 'EC',\\n      :x =&gt; 'LYImJkRzS92vogM6AUPCBhJ20VagSe8IL0Q9SdisUSo',\\n      :y =&gt; 'Rav4sKHnLUIUHVdyR4dyV7G2_EeAnuCn_6621ZhqZYU'\\n    },\\n    :sdkReferenceNumber =&gt; '3DS_LOA_SDK_ADBV_739485_94783',\\n    :sdkTransID =&gt; 'b60c9879-ac77-4918-a317-7b01c4317053\\\/8Q==..'\\n  }\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise3ds2(request_body)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v22.1.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, PaymentAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\nconst client = new Client({ apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot; });\\n\\n\\\/\\\/ Create the request object(s)\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise3ds2(paymentRequest3ds2);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p><a id=\"authorise3ds2-response\"><\/a><\/p>\n<p>You receive a response containing a\u00a0<code>resultCode<\/code>. Some of the possible values for <code>resultCode<\/code> are:<\/p>\n<ul>\n<li><strong>Authorised<\/strong>\u00a0\u2013\u00a0Indicates that the\u00a03D Secure 2 authentication was frictionless, and the payment authorisation was successfully completed. This means that you can already proceed with the delivery of goods and services.\u00a0<\/li>\n<li><strong>ChallengeShopper<\/strong>\u00a0\u2013 The issuer has requested further shopper interaction. This means that you'll have to perform the\u00a0<a href=\"#present-a-challenge\">challenge flow<\/a>. You also get the following parameters from the response, which you'll need to start the challenge flow in the SDK:\n<ul>\n<li><code>threeds2.threeDS2ResponseData.threeDSServerTransID<\/code><\/li>\n<li><code>threeds2.threeDS2ResponseData.acsTransID<\/code><\/li>\n<li><code>threeds2.threeDS2ResponseData.acsReferenceNumber<\/code><\/li>\n<li><code>threeds2.threeDS2ResponseData.acsSignedContent<\/code><\/li>\n<li><code>threeds2.threeDS2Token<\/code><\/li>\n<\/ul><\/li>\n<\/ul>\n<div class=\"notices green\">\n<p>For a complete list of\u00a0<code>resultCode<\/code>\u00a0values and the actions that you need to take, see\u00a0<a href=\"\/pt\/online-payments\/payment-result-codes\">Result codes<\/a>.<\/p>\n<\/div>\n<p>Here's an example of a challenge flow response:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response showing ChallengeShopper'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"additionalData\\\": {\\n        \\\"threeds2.threeDS2ResponseData.acsSignedContent\\\": \\\"eyJhbGciOiJQUzI1NiIsIngPVEFOQmdrcWhraUc5dtw4I-RBJ8_OUt8yIZEsoc...\\\",\\n        \\\"threeds2.threeDS2ResponseData.transStatus\\\": \\\"C\\\",\\n        \\\"threeds2.threeDS2ResponseData.acsChallengeMandated\\\": \\\"Y\\\",\\n        \\\"threeds2.threeDS2ResponseData.acsURL\\\": \\\"https:\\\/\\\/pal-test.adyen.com\\\/threeds2simulator\\\/services\\\/ThreeDS2Simulator\\\/v1\\\/handle\\\/83e78317-e73f-4a6f-j738-7hj09p07n178\\\",\\n        \\\"threeds2.threeDS2ResponseData.threeDSServerTransID\\\": \\\"930h2k09-1986-4hl2-800a-c8d7783918bf\\\",\\n        \\\"threeds2.threeDS2ResponseData.authenticationType\\\": \\\"01\\\",\\n        \\\"threeds2.threeDS2ResponseData.messageVersion\\\": \\\"2.1.0\\\",\\n        \\\"threeds2.threeDS2Token\\\": \\\"BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\\",\\n        \\\"threeds2.threeDS2ResponseData.acsTransID\\\": \\\"45e79886-e60c-4c6d-a962-7aa43d59b150\\\",\\n        \\\"threeds2.threeDS2ResponseData.acsReferenceNumber\\\": \\\"ADYEN-ACS-SIMULATOR\\\"\\n    },\\n    \\\"pspReference\\\": \\\"8825495326513370\\\",\\n    \\\"resultCode\\\": \\\"ChallengeShopper\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"present-a-challenge\">Step 3: Present a challenge<\/h2>\n<p>If your server receives\u00a0<strong>ChallengeShopper<\/strong> <code>resultCode<\/code>, this means that the issuer would like to perform additional checks in order to verify that the shopper is indeed the cardholder.<\/p>\n<ol>\n<li>\n<p>Create an instance of <a href=\"https:\/\/adyen.github.io\/adyen-3ds2-ios\/2.3.1\/documentation\/adyen3ds2\/adychallengeparameters\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>ADYChallengeParameters<\/code>\n<\/a> and pass the following:<\/p>\n<ul>\n<li>The values from the <code>\/authorise3ds2<\/code> <a href=\"#authorise3ds2-response\">response<\/a>.<\/li>\n<li>\n<p><code>threeDSRequestorAppURL<\/code>: Supported in 3D Secure version 2.2.0 and later. By regulation, it is required to provide your app's URL in universal link format:<code>[NSURL URLWithString:@\"https:\/\/{YOUR_UNIVERSAL_URL}\"]<\/code>. In an <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/migrating-to-2-2#supported\">out-of-band (OOB) authentication<\/a>, the authenticating app uses this URL to call your app after an OOB authentication occurs. If you specified a previous version of 3D Secure in <a href=\"#get-the-3d-secure-2-device-fingerprint\">step 2<\/a>, this parameter is ignored. For more information about the latest version, refer to <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/migrating-to-2-2\">Migrating to 3DS2 SDK version 2.2.0<\/a>.<\/p>\n<div class=\"notices yellow\">\n<p>Make sure to add the URL should to the app build settings. Go to <strong>Info.plist<\/strong> &gt; <strong>URL Types<\/strong>. For more information, refer to the <a href=\"https:\/\/developer.apple.com\/documentation\/uikit\/inter-process_communication\/allowing_apps_and_websites_to_link_to_your_content\/defining_a_custom_url_scheme_for_your_app\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Apple Developer documentation<\/a>.<\/p>\n<\/div>\n<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Create instance of ADYChallengeParameters'\" :id=\"''\" :code-data='[{\"language\":\"swift\",\"tabTitle\":\"\",\"content\":\"NSDictionary *additionalData = ...; \\\/\\\/ Retrieved from Adyen.\\nADYChallengeParameters *parameters = [ADYChallengeParameters challengeParametersWithServerTransactionIdentifier:additionalData[@\\\"threeds2.threeDS2ResponseData.threeDSServerTransID\\\"]\\n                                                                                         threeDSRequestorAppURL: [NSURL URLWithString:@\\\"https:\\\/\\\/{YOUR_UNIVERSAL_URL}\\\"]\\n                                                                                       ACSTransactionIdentifier:additionalData[@\\\"threeds2.threeDS2ResponseData.acsTransID\\\"]\\n                                                                                             ACSReferenceNumber:additionalData[@\\\"threeds2.threeDS2ResponseData.acsReferenceNumber\\\"]\\n                                                                                               ACSSignedContent:additionalData[@\\\"threeds2.threeDS2ResponseData.acsSignedContent\\\"]];\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Present the challenge.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Perform the challenge flow'\" :id=\"''\" :code-data='[{\"language\":\"swift\",\"tabTitle\":\"\",\"content\":\"[transaction performChallengeWithParameters:parameters completionHandler:^(ADYChallengeResult *result, NSError *error) {\\n    if (result) {\\n        NSString *transactionStatus = [result transactionStatus];\\n        \\\/\\\/ Submit the transactionStatus to \\\/authorise3ds2.\\n    } else {\\n        \\\/\\\/ An error occurred.\\n    }\\n}];\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>When the challenge flow has been completed, get the\u00a0<code>transactionStatus<\/code>\u00a0from the\u00a0<code>result<\/code> and pass this\u00a0to your server.<\/p>\n<\/li>\n<li>\n<p>From your server, make a POST\u00a0<a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/Payment\/authorise3ds2\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/authorise3ds2<\/a>\u00a0request specifying the\u00a0<code>transStatus<\/code>\u00a0generated by the SDK and the\u00a0<code>threeds2.threeDS2Token<\/code>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Send challenge result'\" :id=\"'send-challenge-result-0721136681'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/pal-test.adyen.com\\\/pal\\\/servlet\\\/Payment\\\/v68\\\/authorise3ds2 \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;threeDS2Result\\&quot;: {\\n      \\&quot;transStatus\\&quot;: \\&quot;Y\\&quot;\\n    },\\n  \\&quot;threeDS2Token\\&quot;: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v26.3.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.payment.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.service.*;\\n\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nThreeDS2Result threeDS2Result2 = new ThreeDS2Result()\\n  .transStatus(\\&quot;Y\\&quot;);\\n\\nPaymentRequest3ds2 paymentRequest3ds2 = new PaymentRequest3ds2()\\n  .threeDS2Result(threeDS2Result2)\\n  .threeDS2Token(\\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;)\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;);\\n\\n\\\/\\\/ Send the request\\npaymentApi service = new paymentApi(client);\\nPaymentResult response = service.authorise3ds2(paymentRequest3ds2, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v18.2.1\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Payments\\\\ThreeDS2Result;\\nuse Adyen\\\\Model\\\\Payments\\\\PaymentRequest3ds2;\\nuse Adyen\\\\Service\\\\Payments\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$threeDS2Result2 = new ThreeDS2Result();\\n$threeDS2Result2\\n  -&gt;setTransStatus(\\&quot;Y\\&quot;);\\n\\n$paymentRequest3ds2 = new PaymentRequest3ds2();\\n$paymentRequest3ds2\\n  -&gt;setThreeDS2Result($threeDS2Result2)\\n  -&gt;setThreeDS2Token(\\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;)\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;);\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;authorise3ds2($paymentRequest3ds2);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Model;\\nusing Adyen.Model.Payment;\\nusing Adyen.Service;\\n\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nThreeDS2Result threeDS2Result2 = new ThreeDS2Result\\n{\\n  TransStatus = \\&quot;Y\\&quot;\\n};\\n\\nPaymentRequest3ds2 paymentRequest3ds2 = new PaymentRequest3ds2\\n{\\n  ThreeDS2Result = threeDS2Result2,\\n  ThreeDS2Token = \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;,\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentService(client);\\nvar response = service.Authorise3ds2(paymentRequest3ds2);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v17.3.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, PaymentAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest3ds2 = {\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  threeDS2Result: {\\n    transStatus: \\&quot;Y\\&quot;\\n  },\\n  threeDS2Token: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise3ds2(paymentRequest3ds2);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/payments\\&quot;\\n)\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\nthreeDS2Result2 := payments.ThreeDS2Result{\\n  TransStatus: common.PtrString(\\&quot;Y\\&quot;),\\n}\\n\\npaymentRequest3ds2 := payments.PaymentRequest3ds2{\\n  ThreeDS2Result: &amp;threeDS2Result2,\\n  ThreeDS2Token: common.PtrString(\\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;),\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Payments()\\nreq := service.PaymentsApi.Authorise3ds2Input().PaymentRequest3ds2(paymentRequest3ds2)\\nres, httpRes, err := service.PaymentsApi.Authorise3ds2(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;threeDS2Result\\&quot;: {\\n    \\&quot;transStatus\\&quot;: \\&quot;Y\\&quot;\\n  },\\n  \\&quot;threeDS2Token\\&quot;: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise3ds2(request=json_request)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :threeDS2Result =&gt; {\\n    :transStatus =&gt; 'Y'\\n  },\\n  :threeDS2Token =&gt; 'BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...'\\n}\\n\\n# Send the request\\nresult = adyen.payment.payments_api.authorise3ds2(request_body)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v17.3.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, PaymentAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst threeDS2Result2: Types.payment.ThreeDS2Result = {\\n  transStatus: \\&quot;Y\\&quot;\\n};\\n\\nconst paymentRequest3ds2: Types.payment.PaymentRequest3ds2 = {\\n  threeDS2Result: threeDS2Result2,\\n  threeDS2Token: \\&quot;BQABAQC2LEWucYNwQRzhH9c1\\\/hup5ZZa9HUehFbwdC86PAfhpGJ\\\/+...\\&quot;,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst paymentAPI = new PaymentAPI(client);\\nconst response = paymentAPI.authorise3ds2(paymentRequest3ds2);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You receive\u00a0<strong>Authorised<\/strong>\u00a0as the\u00a0<code>resultCode<\/code>\u00a0if the payment was successful.\u00a0<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"additionalData\\\": {\\n        \\\"liabilityShift\\\": \\\"true\\\",\\n        \\\"authCode\\\": \\\"44402\\\",\\n        \\\"avsResult\\\": \\\"4 AVS not supported for this card type\\\",\\n        \\\"threeDOffered\\\": \\\"true\\\",\\n        \\\"refusalReasonRaw\\\": \\\"AUTHORISED\\\",\\n        \\\"authorisationMid\\\": \\\"1000\\\",\\n        \\\"acquirerAccountCode\\\": \\\"TestPmmAcquirerAccount\\\",\\n        \\\"cvcResult\\\": \\\"1 Matches\\\",\\n        \\\"avsResultRaw\\\": \\\"4\\\",\\n        \\\"threeDAuthenticated\\\": \\\"true\\\",\\n        \\\"cvcResultRaw\\\": \\\"M\\\",\\n        \\\"acquirerCode\\\": \\\"TestPmmAcquirer\\\",\\n        \\\"acquirerReference\\\": \\\"7CASOGMCCB4\\\"\\n    },\\n    \\\"pspReference\\\": \\\"8825495331860022\\\",\\n    \\\"resultCode\\\": \\\"Authorised\\\",\\n    \\\"authCode\\\": \\\"44402\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"ui-customizations\">UI customizations<\/h2>\n<p>The SDK inherits your app's theme to ensure the UI of the challenge flow fits your app's look and feel. If you require further UI customizations, the SDK provides some\u00a0customization options through the\u00a0<code>ADYAppearanceConfiguration<\/code>\u00a0class.\u00a0<\/p>\n<p>To customize the UI:<\/p>\n<ul>\n<li>\n<p>Create an instance of\u00a0<code>ADYAppearanceConfiguration<\/code>, configure the <a href=\"#customizable-ui-elements\">UI elements<\/a> that you want to customize, and pass the configuration instance when you initialize <code>ADYService<\/code>.<br \/>\nFor example, to change the color of the \u00a0<strong>Continue<\/strong>\u00a0button to red and to change its corner radius:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Customize Continue button'\" :id=\"''\" :code-data='[{\"language\":\"swift\",\"tabTitle\":\"\",\"content\":\"ADYAppearanceConfiguration *appearanceConfiguration = [ADYAppearanceConfiguration new];\\n[[appearanceConfiguration buttonAppearanceForButtonType:ADYAppearanceButtonTypeContinue] setBackgroundColor:[UIColor redColor]];\\n[[appearanceConfiguration buttonAppearanceForButtonType:ADYAppearanceButtonTypeContinue] setTextColor:[UIColor whiteColor]];\\n[[appearanceConfiguration buttonAppearanceForButtonType:ADYAppearanceButtonTypeContinue] setCornerRadius:3.0f];\\n\\n[ADYService transactionWithParameters:parameters appearanceConfiguration:appearanceConfiguration completionHandler:...];\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ul>\n<h3>Customizable UI elements<\/h3>\n<div class=\"sc-notice info\"><div>\n<p>Refer to <a href=\"https:\/\/adyen.github.io\/adyen-3ds2-ios\/2.3.1\/documentation\/adyen3ds2\/adyappearanceconfiguration\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ADYAppearanceConfiguration<\/a> class reference documentation for a complete list of customizable properties.<\/p>\n<\/div><\/div>\n<p>You can also customize the following UI elements used in the challenge flow:<\/p>\n<table><colgroup><col style=\"width: 48%\"><col style=\"width: 51%\"><\/colgroup><thead><tr class=\"header\"><th>Customizable elements<\/th><th>Customizable properties<\/th><\/tr><\/thead><tbody><tr><td>\n<p>Body<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><li>\n<p>Line height<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Header<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><li>\n<p>Line height<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Info items<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><li>\n<p>Line height<\/p>\n<\/li><li>\n<p>Border color<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Input fields<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><li>\n<p>Separator color<\/p>\n<\/li><li>\n<p>Keyboard appearance<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Input fields header<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Navigation bar<\/p>\n<\/td><td>\n<ul><li>\n<p>Background color<\/p>\n<\/li><li>\n<p>Status bar style<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Screen<\/p>\n<\/td><td>\n<ul><li>\n<p>Background color<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Submit\/Next\/Continue button<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Text transform<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><li>\n<p>Background color<\/p>\n<\/li><li>\n<p>Corner radius<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Cancel button<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Text transform<\/p>\n<\/li><li>\n<p>Font color<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>Resend button<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Text transform<\/p>\n<\/li><li>\n<p>Text color<\/p>\n<\/li><\/ul>\n<\/td><\/tr><tr><td>\n<p>OOB button<\/p>\n<\/td><td>\n<ul><li>\n<p>Font<\/p>\n<\/li><li>\n<p>Text transform<\/p>\n<\/li><li>\n<p>Text color<\/p>\n<\/li><\/ul>\n<\/td><\/tr><\/tbody><\/table>\n<h2>Get the SDK version<\/h2>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Get the current SDK version'\" :id=\"''\" :code-data='[{\"language\":\"swift\",\"tabTitle\":\"\",\"content\":\"NSString* threeDS2SDKVersion = ADY3DS2SDKVersion();\\nlet threeDS2SDKVersion = ADY3DS2SDKVersion()\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"testing-3d-secure-2\">Testing 3D Secure 2<\/h2>\n<p>Before going live, use the following card numbers and credentials to\u00a0test your integration.<\/p>\n<p>We recommend testing each\u00a0<strong>Card Type<\/strong>.<\/p>\n<p>To test how your integration handles different 3D Secure 2 authentication scenarios, use our test card numbers.<\/p>\n<p>All our test cards use the following expiry dates and security codes:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Expiry Date<\/th>\n<th style=\"text-align: left;\">CVC\/CVV<\/th>\n<th style=\"text-align: left;\">CID<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">03\/2030<\/td>\n<td style=\"text-align: left;\">737<\/td>\n<td style=\"text-align: left;\">7373<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When prompted for 3D Secure 2 text challenges, use the following credentials:<\/p>\n<ul>\n<li>For mobile, use password: <strong>1234<\/strong><\/li>\n<li>For web, use password: <strong>password<\/strong><\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Card Type<\/th>\n<th style=\"text-align: left;\">Card Number<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Cartes Bancaires<\/td>\n<td style=\"text-align: left;\">4035 5014 2814 6300<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Maestro <a href=\"#nocvc\">\n  <sup>1<\/sup>\n<\/a><\/td>\n<td style=\"text-align: left;\">5000 5500 0000 0029<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Mastercard<\/td>\n<td style=\"text-align: left;\">5454 5454 5454 5454<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Visa<\/td>\n<td style=\"text-align: left;\">4917 6100 0000 0000<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><a id=\"nocvc\"><\/a> <sup>1<\/sup> This card doesn't require a CVC.<\/p>\n<p>When you make a payment request with these cards, you'll receive the following result codes depending on your integration:<\/p>\n<ul>\n<li><strong>RedirectShopper<\/strong>: You'll receive this result code if you are using the <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/3d-secure-1\">Redirect authentication<\/a>.<\/li>\n<li><strong>IdentifyShopper<\/strong>:  You'll receive this result code if you are using the <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\">Native authentication<\/a>.<\/li>\n<li><strong>ChallengeShopper<\/strong>: You might get this result code after you submit the 3D Secure 2 device fingerprinting result in a Native authentication, indicating a challenge flow.<\/li>\n<\/ul>\n<!-- list separator -->\n<p>To test the web-based flow where the device fingerprinting step is skipped (because the issuer's ACS has not configured a <code>threeDSMethodURL<\/code>), and you get a <strong>ChallengeShopper<\/strong> <code>resultCode<\/code> <em>immediately<\/em> after submitting the payment request, use the following card:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Card Type<\/th>\n<th style=\"text-align: left;\">Card Number<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Visa<\/td>\n<td style=\"text-align: left;\">4212 3456 7891 0006<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To test the frictionless flow, specify in your payment request:<\/p>\n<ul>\n<li><code>amount.value<\/code>: <strong>12002<\/strong><\/li>\n<\/ul>\n<h4 id=\"app-based-integration\">App-based integration<\/h4>\n<p>To test different authentication scenarios for app-based integration, use the following test cards:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Card number<\/th>\n<th style=\"text-align: left;\">Authentication scenario<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">5201 2855 6567 2311<\/td>\n<td style=\"text-align: left;\">Basic text authentication<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5201 2874 9905 2008<\/td>\n<td style=\"text-align: left;\">Basic single select<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5201 2815 9233 1633<\/td>\n<td style=\"text-align: left;\">Basic multi select<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5201 2888 2269 6974<\/td>\n<td style=\"text-align: left;\">Basic out-of-band (OOB) authentication<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5201 2895 0084 3268<\/td>\n<td style=\"text-align: left;\">HTML OOB authentication<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5201 2861 5377 1465<\/td>\n<td style=\"text-align: left;\">App single select then text authentication<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"other-scenarios\">Other scenarios<\/h4>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Card number<\/th>\n<th style=\"text-align: left;\">Scenario<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">4199 3500 0000 0002<\/td>\n<td style=\"text-align: left;\">The card is not enrolled for 3D Secure transactions,<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5201 2829 9900 5515<\/td>\n<td style=\"text-align: left;\">There was a technical error.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"see-also\">See also<\/h2>\n<ul>\n<li><a href=\"https:\/\/github.com\/Adyen\/adyen-3ds2-ios\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">iOS SDK on GitHub<\/a><\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/ios-sdk-integration","articleFields":{"description":"Support 3D Secure 2 authentication on your iOS app.","feedback_component":true,"parameters":{"anchor_new":"<a href=\/online-payments\/3d-secure\/native-3ds2\/ios>Native 3D Secure 2 for iOS<\/a>","parent_page":"Classic API (<code>\/authorise<\/code>)","new_desc":"integrating using our Checkout APIs"},"sitemap":{"priority":0.3},"id":"42831225","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"14-07-2023 14:34","filters_component":false},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/ios-sdk-integration","title":"iOS 3D Secure 2 SDK","content":"\nAdyen is no longer developing the Classic API integration\nThis page is for the Classic API (\/authorise) integration, which we no longer accept new integrations with. \nWe strongly recommend migrating to the newer Native 3D Secure 2 for iOS integration. To use this newer integration, you must also migrate to the Checkout API.\n\n\nPSD2 complianceIf you are implementing 3D Secure to comply with PSD2 SCA, learn more from our comprehensive guide.\n\nThe Adyen 3DS2 iOS SDK gets the device fingerprint and presents the challenge to your shopper. From your server, you need to send a payment request, the encrypted device fingerprint, and the challenge result to Adyen.\nIn a full 3D Secure 2 implementation, a payment can go through either a frictionless or a challenge authentication flow before it can be authorised.\nIf you only want to perform a 3D Secure 2 authentication and then authorise the payment later, refer to the Authentication-only documentation.\nHow it works\nHere's how a 3D Secure 2 challenge authentication flow works:\n\n  \n\n\nSubmit a payment request\u00a0with the required 3D Secure 2 objects to start the authentication process.\u00a0Build your implementation depending on the\u00a0resultCode\u00a0returned in the response. If the transaction is exempted from 3D Secure, you might get an Authorised result code.\nIf you receive an IdentifyShopper resultCode, get the 3D Secure 2 device fingerprint and send the encrypted device fingerprint information to Adyen. After you send the device fingerprint, it is possible that you receive an AuthorisedresultCode in the response. This means that the 3D Secure 2 authentication was frictionless, and the payment was authorised.\nIf you receive\u00a0ChallengeShopperresultCode, this means that the issuer requires further shopper interaction and you need to present a challenge to the shopper.\n\nThe payment might also be routed to 3D Secure 1, based on issuer performance. This is indicated by a\u00a0RedirectShopper\u00a0resultCode. If you do not want to automatically fall back to 3D Secure 1, contact our Support Team.\nTo test your integration, see\u00a0Testing 3D Secure 2.\nBefore\u00a0you begin\n\nAdyen 3DS2 iOSSubscribe to our GitHub repository to get the latest updates and versions.\n\nBefore you begin to integrate, make sure you have followed the Get started with Adyen guide to:\n\nGet an overview of the steps needed to accept live payments.\nCreate your test account.\n\nAfter you have created your test account:\n\n\nGet your API Key. Save a copy, because you'll need it for API calls you make to the Adyen payments platform.\n\n\nInstall one of our\u00a0Libraries\u00a0to connect with the Adyen APIs.\n\n\nInstall the Adyen 3DS2 iOS SDK latest version. You must use version 2.3.0 or later to trigger the 3D Secure 2 native flow. You can install the SDK through CocoaPods, Carthage, or by manually installing the SDK as a dynamic or static framework.\n\n\n\n\n    \n        \n        \n    \n\n\nStep 1: Submit a\u00a0payment request\nCollect your shopper's card details then make a payment with a POST \/authorise request, and include the following:\n\n\n\nParameter name\nRequired\nDescription\n\n\n\n\ncard\n\nObject that contains the shopper's card details.\n\n\n threeDS2RequestData.deviceChannel\n\nSet to app.\n\n\nbrowserInfo\n\nObject that contains the userAgent and acceptHeader fields. Indicates that your integration can handle 3D Secure 1 redirect authentication in case the transaction is routed to 3D Secure 1. If your integration is unable to generate this information, you can send the same data as in the request below.\n\n\nsdkVersion\n\nWe recommend you use the ADY3DS2SDKVersion() function to determine your 3DS2 sdkVersion. You can also get the sdkVersion from Github\n\n\n\n\nYou can send additional parameters for better authorization rates, and to increase the chance of a frictionless flow. You do not have to send all the additional parameters.  Send parameters that you know you can provide accurately, or that are mandatory in specific scenarios.\n\nHere is an example of how to make a request for a EUR&nbsp;150 purchase:\n\n    \n\n\nYou receive a response containing a resultCode of:\n\n\n\u00a0IdentifyShopper. This means that you need to perform the\u00a0Identify the shopper\u00a0flow. You also get the following parameters from the response, which you'll need to create a transaction in the SDK:\n\nadditionalData.threeds2.threeDS2DirectoryServerInformation.directoryServerId\nadditionalData.threeds2.threeDS2DirectoryServerInformation.publicKey\nadditionalData.threeds2.threeDS2ResponseData.messageVersion\nadditionalData.threeds2.threeDS2DirectoryServerInformation.rootCertificates\n\nYou will also receive a threeds2.threeDS2Token which you will need to store for later use.\n\n\n\nTo optimize authorization rates, Adyen's Authentication Engine routes each payment to either the 3D Secure 2 or the 3D Secure 1 flow, based on issuer performance. See\u00a03D Secure fallback for more information.\n\n\nFor a complete list of resultCode values and the actions you need to take, see\u00a0Result codes.\n\nHere's an example of a response showing an IdentifyShopper result code:\n\n    \n\nStep 2: Get the 3D Secure 2 device fingerprint\nIf your server receives\u00a0IdentifyShopper resultCode, start the 3D Secure 2 device fingerprinting process.\n\n\nIn your app, create an instance of\u00a0\n  ADYServiceParameters\n passing the directoryServerId and the publicKey parameters from the \/authorise response or from your prefetched cached keys.\nADYServiceParameters *parameters = [ADYServiceParameters new];\n[parameters setDirectoryServerIdentifier:...]; \/\/ Retrieved from \/authorise response.\n[parameters setDirectoryServerPublicKey:...]; \/\/ Retrieved from \/authorise response.\n[parameters setDirectoryServerRootCertificates:...]; \/\/ Retrieved from \/authorise response.\n\n\nUse the \n  ADYService\n class to create a transaction.\nWhen using Adyen 3DS2 iOS SDK version 2.2.0 and later, you must set transactionWithMessageVersion to the value of additionalData.threeds2.threeDS2ResponseData.messageVersion from the \/authorise response.\nFor more information about the latest version, refer to Migrating to 3DS2 SDK version 2.2.0.\n\nKeep a reference to your ADYTransaction instance until the transaction is complete.\n\nThe following example shows how to create a transaction, using the messageVersion.\n\n\n\n\n\n\n\n\nGet the transaction's\u00a0authenticationRequestParameters\u00a0 class and pass the contents to your server.\nYou'll get the following information:\n\ndeviceInformation\nSDKTransactionIdentifier\nSDKApplicationIdentifier\nSDKReferenceNumber\nSDKEphemeralPublicKey\n\n\n\n\nFrom your server, make a POST\u00a0\/authorise3ds2\u00a0request to send the encrypted device fingerprint information to Adyen, specifying the  threeDS2RequestData object containing:\n\nsdkEncData: Device information\nsdkTransID: SDK Transaction Identifier\nsdkAppID: SDK Application Identifier\nsdkReferenceNumber: SDK Reference Number\nsdkEphemPubKey: Object that contains the SDK Ephemeral Public Key. The SDK provides output as a string. Transform this string into a JSON object to send in your \/authorise3ds2 request.\n\nAlso make sure you include the threeds2.threeDS2Token that was returned in the previous request.\n\nYou can send additional parameters for better authorization rates, and to increase the chance of a frictionless flow. You do not have to send all the additional parameters.  Send parameters that you know you can provide accurately, or that are mandatory in specific scenarios.\n\n\n\n\n\nYou receive a response containing a\u00a0resultCode. Some of the possible values for resultCode are:\n\nAuthorised\u00a0\u2013\u00a0Indicates that the\u00a03D Secure 2 authentication was frictionless, and the payment authorisation was successfully completed. This means that you can already proceed with the delivery of goods and services.\u00a0\nChallengeShopper\u00a0\u2013 The issuer has requested further shopper interaction. This means that you'll have to perform the\u00a0challenge flow. You also get the following parameters from the response, which you'll need to start the challenge flow in the SDK:\n\nthreeds2.threeDS2ResponseData.threeDSServerTransID\nthreeds2.threeDS2ResponseData.acsTransID\nthreeds2.threeDS2ResponseData.acsReferenceNumber\nthreeds2.threeDS2ResponseData.acsSignedContent\nthreeds2.threeDS2Token\n\n\n\nFor a complete list of\u00a0resultCode\u00a0values and the actions that you need to take, see\u00a0Result codes.\n\nHere's an example of a challenge flow response:\n\n\n\n\n\nStep 3: Present a challenge\nIf your server receives\u00a0ChallengeShopper resultCode, this means that the issuer would like to perform additional checks in order to verify that the shopper is indeed the cardholder.\n\n\nCreate an instance of \n  ADYChallengeParameters\n and pass the following:\n\nThe values from the \/authorise3ds2 response.\n\nthreeDSRequestorAppURL: Supported in 3D Secure version 2.2.0 and later. By regulation, it is required to provide your app's URL in universal link format:[NSURL URLWithString:@\"https:\/\/{YOUR_UNIVERSAL_URL}\"]. In an out-of-band (OOB) authentication, the authenticating app uses this URL to call your app after an OOB authentication occurs. If you specified a previous version of 3D Secure in step 2, this parameter is ignored. For more information about the latest version, refer to Migrating to 3DS2 SDK version 2.2.0.\n\nMake sure to add the URL should to the app build settings. Go to Info.plist &gt; URL Types. For more information, refer to the Apple Developer documentation.\n\n\n\n\n\n\n\n\nPresent the challenge.\n\n\n\n\n\nWhen the challenge flow has been completed, get the\u00a0transactionStatus\u00a0from the\u00a0result and pass this\u00a0to your server.\n\n\nFrom your server, make a POST\u00a0\/authorise3ds2\u00a0request specifying the\u00a0transStatus\u00a0generated by the SDK and the\u00a0threeds2.threeDS2Token.\n\n\n\nYou receive\u00a0Authorised\u00a0as the\u00a0resultCode\u00a0if the payment was successful.\u00a0\n\n\n\n\n\nUI customizations\nThe SDK inherits your app's theme to ensure the UI of the challenge flow fits your app's look and feel. If you require further UI customizations, the SDK provides some\u00a0customization options through the\u00a0ADYAppearanceConfiguration\u00a0class.\u00a0\nTo customize the UI:\n\n\nCreate an instance of\u00a0ADYAppearanceConfiguration, configure the UI elements that you want to customize, and pass the configuration instance when you initialize ADYService.\nFor example, to change the color of the \u00a0Continue\u00a0button to red and to change its corner radius:\n\n\n\n\n\nCustomizable UI elements\n\nRefer to ADYAppearanceConfiguration class reference documentation for a complete list of customizable properties.\n\nYou can also customize the following UI elements used in the challenge flow:\nCustomizable elementsCustomizable properties\nBody\n\n\nFont\n\nFont color\n\nLine height\n\n\nHeader\n\n\nFont\n\nFont color\n\nLine height\n\n\nInfo items\n\n\nFont\n\nFont color\n\nLine height\n\nBorder color\n\n\nInput fields\n\n\nFont\n\nFont color\n\nSeparator color\n\nKeyboard appearance\n\n\nInput fields header\n\n\nFont\n\nFont color\n\n\nNavigation bar\n\n\nBackground color\n\nStatus bar style\n\n\nScreen\n\n\nBackground color\n\n\nSubmit\/Next\/Continue button\n\n\nFont\n\nText transform\n\nFont color\n\nBackground color\n\nCorner radius\n\n\nCancel button\n\n\nFont\n\nText transform\n\nFont color\n\n\nResend button\n\n\nFont\n\nText transform\n\nText color\n\n\nOOB button\n\n\nFont\n\nText transform\n\nText color\n\n\nGet the SDK version\n\n    \n\nTesting 3D Secure 2\nBefore going live, use the following card numbers and credentials to\u00a0test your integration.\nWe recommend testing each\u00a0Card Type.\nTo test how your integration handles different 3D Secure 2 authentication scenarios, use our test card numbers.\nAll our test cards use the following expiry dates and security codes:\n\n\n\nExpiry Date\nCVC\/CVV\nCID\n\n\n\n\n03\/2030\n737\n7373\n\n\n\nWhen prompted for 3D Secure 2 text challenges, use the following credentials:\n\nFor mobile, use password: 1234\nFor web, use password: password\n\n\n\n\nCard Type\nCard Number\n\n\n\n\nCartes Bancaires\n4035 5014 2814 6300\n\n\nMaestro \n  1\n\n5000 5500 0000 0029\n\n\nMastercard\n5454 5454 5454 5454\n\n\nVisa\n4917 6100 0000 0000\n\n\n\n 1 This card doesn't require a CVC.\nWhen you make a payment request with these cards, you'll receive the following result codes depending on your integration:\n\nRedirectShopper: You'll receive this result code if you are using the Redirect authentication.\nIdentifyShopper:  You'll receive this result code if you are using the Native authentication.\nChallengeShopper: You might get this result code after you submit the 3D Secure 2 device fingerprinting result in a Native authentication, indicating a challenge flow.\n\n\nTo test the web-based flow where the device fingerprinting step is skipped (because the issuer's ACS has not configured a threeDSMethodURL), and you get a ChallengeShopper resultCode immediately after submitting the payment request, use the following card:\n\n\n\nCard Type\nCard Number\n\n\n\n\nVisa\n4212 3456 7891 0006\n\n\n\nTo test the frictionless flow, specify in your payment request:\n\namount.value: 12002\n\nApp-based integration\nTo test different authentication scenarios for app-based integration, use the following test cards:\n\n\n\nCard number\nAuthentication scenario\n\n\n\n\n5201 2855 6567 2311\nBasic text authentication\n\n\n5201 2874 9905 2008\nBasic single select\n\n\n5201 2815 9233 1633\nBasic multi select\n\n\n5201 2888 2269 6974\nBasic out-of-band (OOB) authentication\n\n\n5201 2895 0084 3268\nHTML OOB authentication\n\n\n5201 2861 5377 1465\nApp single select then text authentication\n\n\n\nOther scenarios\n\n\n\nCard number\nScenario\n\n\n\n\n4199 3500 0000 0002\nThe card is not enrolled for 3D Secure transactions,\n\n\n5201 2829 9900 5515\nThere was a technical error.\n\n\n\nSee also\n\niOS SDK on GitHub\n","type":"page","locale":"pt","boost":14,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Classic integrations for Ecommerce","lvl3":"Classic API integration","lvl4":"3D Secure authentication","lvl5":"Native 3D Secure 2 authentication","lvl6":"iOS 3D Secure 2 SDK"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration","lvl4":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication","lvl5":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2","lvl6":"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/3d-secure-authentication\/native-3ds2\/ios-sdk-integration"},"levels":7,"category":"Online Payments","category_color":"green","tags":["Secure"]},"articleFiles":{"3ds2-ios.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/02.online-payments\/60.classic-integrations\/01.classic-api-integration\/03.3d-secure-authentication\/09.native-3ds2\/02.ios-sdk-integration\/3ds2-ios.png\" \/>","789911376.js":"<p alt=\"\">789911376.js<\/p>","send-challenge-result-0721136681.js":"<p alt=\"\">send-challenge-result-0721136681.js<\/p>","send-device-fingerprint-to-adyen-2441894243.js":"<p alt=\"\">send-device-fingerprint-to-adyen-2441894243.js<\/p>"}}
