{"title":"Redirect 3DS Components integration","category":"default","creationDate":1567783140,"content":"<p>Use our Redirect Component to redirect the shopper to perform 3D Secure 2 authentication.<\/p>\n<p>When adding card payments with redirect 3D Secure authentication to your integration, you additionally need to:<\/p>\n<ol>\n<li><a href=\"#collect-additional-parameters\">Collect additional parameters in your payment form<\/a>.<\/li>\n<li><a href=\"#make-a-payment\">Provide the required 3D Secure parameters<\/a> when making a payment request.<\/li>\n<li><a href=\"#handle-the-redirect\">Use the Redirect Component<\/a> to handle the redirect.<\/li>\n<\/ol>\n<h2>Requirements<\/h2>\n<p>Before starting your integration:<\/p>\n<ol>\n<li>Make sure that you have integrated our <a href=\"\/pt\/payment-methods\/cards\/ios-component\">Card Component<\/a>, or <a href=\"\/pt\/payment-methods\/cards\/api-only\">built your own UI<\/a> for collecting shopper's card details.<\/li>\n<li>If you are using 3D Secure for PSD2 compliance, read our <a href=\"\/pt\/online-payments\/psd2-sca-compliance-and-implementation-guide\">comprehensive PSD2 SCA guide<\/a>.<\/li>\n<\/ol>\n<h2 id=\"collect-additional-parameters\">Collect additional information at checkout<\/h2>\n<p>For higher authentication rates, we strongly recommend that you collect the cardholder name for payments with 3D Secure authentication.<\/p>\n<p>To collect the cardholder name using our <a href=\"\/pt\/payment-methods\/cards\/ios-component\">Card Component<\/a>, specify the following when <a href=\"\/pt\/payment-methods\/cards\/ios-component\/#optional-configuration\">adding the Card Component<\/a>:<\/p>\n<ul>\n<li><code>showsHolderNameField<\/code>: <strong>true<\/strong><\/li>\n<\/ul>\n<pre><code class=\"language-swift\">let configuration = CardComponent.Configuration(showsHolderNameField: true)\nlet component =  CardComponent(paymentMethod: paymentMethod,\n                                   apiContext: apiContext,\n                                   configuration: configuration)\ncomponent.delegate = self\nself.cardComponent = component\npresent(component.viewController, animated: true)<\/code><\/pre>\n<p>We also recommend that you collect the shopper billing address in advance in your payment form. Deliver this parameter to your backend when <a href=\"#make-a-payment\">making a payment<\/a> as it is required by the card schemes.<\/p>\n<h2>Make a payment<\/h2>\n<ol>\n<li>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=iOS&amp;integration=Drop-in&amp;version=latest#make-a-payment\">make a payment request<\/a>, include the following additional 3D Secure 2 parameters.<\/p>\n<div class=\"notices green\">\n<p>See additional 3D Secure 2 parameters that we recommend to include in your request to increase authentication performance in our <a href=\"\/pt\/online-payments\/3d-secure\/api-reference\">API reference<\/a>.<\/p>\n<\/div>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter name<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The type and required details for a card payment method. When using the <a href=\"\/pt\/payment-methods\/cards\/ios-component\">Card Component<\/a>, pass the <code>data.paymentMethod<\/code> from the <code>didSubmit<\/code> event from your client app. When submitting raw card data, refer to <a href=\"\/pt\/payment-methods\/cards\/raw-card-data#make-a-payment\">Raw card data<\/a> for the fields that you need to pass.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-CardDetails-holderName\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">paymentMethod.holderName<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Conditionally required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Conditionally required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/conditionally-required\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\"><strong>Use case<\/strong>: required for Visa and JCB transactions. <br> The cardholder's name.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-channel\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">channel<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The platform where the transaction takes place. Set to <strong>iOS<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-returnUrl\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">returnUrl<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The URL where the shopper will be redirected back to after completing 3D Secure authentication. Use the custom URL for your app, for example, <code>my-app:\/\/<\/code>. For more information on setting custom URL schemes, 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>. <br> <strong>Format<\/strong>: <ul><li markdown=\"1\">Maximum characters: 1024.<\/li><li markdown=\"1\">Must not include <code>\/\/<\/code> (double slash) after the top-level domain.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-browserInfo\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">browserInfo<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The shopper's browser information. The following sub-fields are required: <ul><li markdown=\"1\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-browserInfo-acceptHeader\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">acceptHeader<\/a>: The accept header value of the shopper's browser. You can use a dummy value.<\/li><li>  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-browserInfo-userAgent\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">userAgent<\/a>: Get it using <a href=\"https:\/\/adyen.github.io\/adyen-ios\/5.3.0\/documentation\/adyen\/browserinfo\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>BrowserInfo.initialize<\/code>\n<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperIP\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperIP<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Conditionally required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Conditionally required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/conditionally-required\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\"><strong>Use case<\/strong>: required for Visa and JCB transactions. <br> The shopper's IP address.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperEmail\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperEmail<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Conditionally required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Conditionally required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/conditionally-required\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\"><strong>Use case<\/strong>: required for Visa and JCB transactions. <br> The cardholder's email address. If you do not include the shopper email, you must include the shopper's phone number in your request.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-telephoneNumber\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">telephoneNumber<\/a><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Conditionally required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Conditionally required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/conditionally-required\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\"><strong>Use case<\/strong>: required for Visa and JCB transactions if you did not include the <code>shopperEmail<\/code> field. <br>The shopper's phone number. To be more specific, you can use the <code>mobilePhone<\/code>, <code>homePhone<\/code>, and <code>workPhone<\/code> fields in the <code>threeDS2RequestData<\/code> object.  <br> <strong>Format<\/strong>: The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits). <br>  <strong>Example<\/strong>: <strong>+4912345678901<\/strong> <div class=\"sc-notice note\"><div> If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. <\/div><\/div><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img alt=\"This is the required icon.\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/requirements-legend\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/> Required for all transactions. <br><img alt=\"This is the conditionally required icon.\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/requirements-legend\/conditionally-required.svg?decoding=auto&amp;fetchpriority=auto\" \/> Required for particular setups, or issuers and card schemes. <br><img alt=\"This is the recommended icon.\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/requirements-legend\/recommended.svg?decoding=auto&amp;fetchpriority=auto\" \/> Recommended for all transactions, but not required.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'payments-request-3ds-redirect-mobile'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments \\\\\\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;:1000\\n   },\\n   \\&quot;reference\\&quot;:\\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n   \\&quot;shopperReference\\&quot;:\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n   \\&quot;{hint:state.data.paymentMethod from didSubmit}paymentMethod{\\\/hint}\\&quot;:{\\n      \\&quot;type\\&quot;:\\&quot;scheme\\&quot;,\\n      \\&quot;encryptedCardNumber\\&quot;:\\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;,\\n      \\&quot;encryptedExpiryMonth\\&quot;:\\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;,\\n      \\&quot;encryptedExpiryYear\\&quot;:\\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;,\\n      \\&quot;encryptedSecurityCode\\&quot;:\\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;,\\n      \\&quot;holderName\\&quot;:\\&quot;S. Hopper\\&quot;\\n   },\\n   \\&quot;{hint:state.data.billingAddress from onSubmit}billingAddress{\\\/hint}\\&quot;: {\\n      \\&quot;street\\&quot;: \\&quot;Infinite Loop\\&quot;,\\n      \\&quot;houseNumberOrName\\&quot;: \\&quot;1\\&quot;,\\n      \\&quot;postalCode\\&quot;: \\&quot;1011DJ\\&quot;,\\n      \\&quot;city\\&quot;: \\&quot;Amsterdam\\&quot;,\\n      \\&quot;country\\&quot;: \\&quot;NL\\&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   \\&quot;shopperEmail\\&quot;:\\&quot;s.hopper@example.com\\&quot;,\\n   \\&quot;channel\\&quot;:\\&quot;iOS\\&quot;,\\n   \\&quot;returnUrl\\&quot;:\\&quot;my-app:\/\/adyen\\&quot;,\\n   \\&quot;merchantAccount\\&quot;:\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v27.0.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\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(1000L);\\n\\nCardDetails cardDetails = new CardDetails()\\n  .encryptedCardNumber(\\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;)\\n  .holderName(\\&quot;S. Hopper\\&quot;)\\n  .encryptedSecurityCode(\\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;)\\n  .encryptedExpiryYear(\\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;)\\n  .encryptedExpiryMonth(\\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;)\\n  .type(CardDetails.TypeEnum.SCHEME);\\n\\nBillingAddress billingAddress = new BillingAddress()\\n  .country(\\&quot;NL\\&quot;)\\n  .city(\\&quot;Amsterdam\\&quot;)\\n  .street(\\&quot;Infinite Loop\\&quot;)\\n  .houseNumberOrName(\\&quot;1\\&quot;)\\n  .postalCode(\\&quot;1011DJ\\&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  .channel(PaymentRequest.ChannelEnum.)\\n  .paymentMethod(new CheckoutPaymentMethod(cardDetails))\\n  .shopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  .billingAddress(billingAddress)\\n  .returnUrl(\\&quot;my-app:\/\/adyen\\&quot;)\\n  .browserInfo(browserInfo)\\n  .shopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v19.0.0\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Model\\\\Checkout\\\\Amount;\\nuse Adyen\\\\Model\\\\Checkout\\\\CheckoutPaymentMethod;\\nuse Adyen\\\\Model\\\\Checkout\\\\BillingAddress;\\nuse Adyen\\\\Model\\\\Checkout\\\\BrowserInfo;\\nuse Adyen\\\\Model\\\\Checkout\\\\PaymentRequest;\\nuse Adyen\\\\Service\\\\Checkout\\\\PaymentsApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\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(1000);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setEncryptedCardNumber(\\&quot;adyenjs_0_1_18\\\\$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;)\\n  -&gt;setHolderName(\\&quot;S. Hopper\\&quot;)\\n  -&gt;setEncryptedSecurityCode(\\&quot;adyenjs_0_1_24\\\\$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;)\\n  -&gt;setEncryptedExpiryYear(\\&quot;adyenjs_0_1_18\\\\$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;)\\n  -&gt;setEncryptedExpiryMonth(\\&quot;adyenjs_0_1_18\\\\$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;)\\n  -&gt;setType(\\&quot;scheme\\&quot;);\\n\\n$billingAddress = new BillingAddress();\\n$billingAddress\\n  -&gt;setCountry(\\&quot;NL\\&quot;)\\n  -&gt;setCity(\\&quot;Amsterdam\\&quot;)\\n  -&gt;setStreet(\\&quot;Infinite Loop\\&quot;)\\n  -&gt;setHouseNumberOrName(\\&quot;1\\&quot;)\\n  -&gt;setPostalCode(\\&quot;1011DJ\\&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;setChannel(\\&quot;iOS\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setShopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  -&gt;setBillingAddress($billingAddress)\\n  -&gt;setReturnUrl(\\&quot;my-app:\/\/adyen\\&quot;)\\n  -&gt;setBrowserInfo($browserInfo)\\n  -&gt;setShopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&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.Checkout;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\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 = 1000\\n};\\n\\nCardDetails cardDetails = new CardDetails\\n{\\n  EncryptedCardNumber = \\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;,\\n  HolderName = \\&quot;S. Hopper\\&quot;,\\n  EncryptedSecurityCode = \\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;,\\n  EncryptedExpiryYear = \\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;,\\n  EncryptedExpiryMonth = \\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;,\\n  Type = CardDetails.TypeEnum.Scheme\\n};\\n\\nBillingAddress billingAddress = new BillingAddress\\n{\\n  Country = \\&quot;NL\\&quot;,\\n  City = \\&quot;Amsterdam\\&quot;,\\n  Street = \\&quot;Infinite Loop\\&quot;,\\n  HouseNumberOrName = \\&quot;1\\&quot;,\\n  PostalCode = \\&quot;1011DJ\\&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  Channel = PaymentRequest.ChannelEnum.iOS,\\n  PaymentMethod = new CheckoutPaymentMethod(cardDetails),\\n  ShopperEmail = \\&quot;s.hopper@example.com\\&quot;,\\n  BillingAddress = billingAddress,\\n  ReturnUrl = \\&quot;my-app:\/\/adyen\\&quot;,\\n  BrowserInfo = browserInfo,\\n  ShopperReference = \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\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: 1000\\n  },\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;scheme\\&quot;,\\n    encryptedCardNumber: \\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;,\\n    encryptedExpiryMonth: \\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;,\\n    encryptedExpiryYear: \\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;,\\n    encryptedSecurityCode: \\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;,\\n    holderName: \\&quot;S. Hopper\\&quot;\\n  },\\n  billingAddress: {\\n    street: \\&quot;Infinite Loop\\&quot;,\\n    houseNumberOrName: \\&quot;1\\&quot;,\\n    postalCode: \\&quot;1011DJ\\&quot;,\\n    city: \\&quot;Amsterdam\\&quot;,\\n    country: \\&quot;NL\\&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  shopperEmail: \\&quot;s.hopper@example.com\\&quot;,\\n  channel: \\&quot;iOS\\&quot;,\\n  returnUrl: \\&quot;my-app:\/\/adyen\\&quot;,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&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\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\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 := checkout.Amount{\\n  Currency: \\&quot;EUR\\&quot;,\\n  Value: 1000,\\n}\\n\\ncardDetails := checkout.CardDetails{\\n  EncryptedCardNumber: common.PtrString(\\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;),\\n  HolderName: common.PtrString(\\&quot;S. Hopper\\&quot;),\\n  EncryptedSecurityCode: common.PtrString(\\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;),\\n  EncryptedExpiryYear: common.PtrString(\\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;),\\n  EncryptedExpiryMonth: common.PtrString(\\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;),\\n  Type: common.PtrString(\\&quot;scheme\\&quot;),\\n}\\n\\nbillingAddress := checkout.BillingAddress{\\n  Country: \\&quot;NL\\&quot;,\\n  City: \\&quot;Amsterdam\\&quot;,\\n  Street: \\&quot;Infinite Loop\\&quot;,\\n  HouseNumberOrName: \\&quot;1\\&quot;,\\n  PostalCode: \\&quot;1011DJ\\&quot;,\\n}\\n\\nbrowserInfo := checkout.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 := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  Channel: common.PtrString(\\&quot;iOS\\&quot;),\\n  PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&amp;cardDetails),\\n  ShopperEmail: common.PtrString(\\&quot;s.hopper@example.com\\&quot;),\\n  BillingAddress: &amp;billingAddress,\\n  ReturnUrl: \\&quot;my-app:\/\/adyen\\&quot;,\\n  BrowserInfo: &amp;browserInfo,\\n  ShopperReference: common.PtrString(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(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;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\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;: 1000\\n  },\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;scheme\\&quot;,\\n    \\&quot;encryptedCardNumber\\&quot;: \\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;,\\n    \\&quot;encryptedExpiryMonth\\&quot;: \\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;,\\n    \\&quot;encryptedExpiryYear\\&quot;: \\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;,\\n    \\&quot;encryptedSecurityCode\\&quot;: \\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;,\\n    \\&quot;holderName\\&quot;: \\&quot;S. Hopper\\&quot;\\n  },\\n  \\&quot;billingAddress\\&quot;: {\\n    \\&quot;street\\&quot;: \\&quot;Infinite Loop\\&quot;,\\n    \\&quot;houseNumberOrName\\&quot;: \\&quot;1\\&quot;,\\n    \\&quot;postalCode\\&quot;: \\&quot;1011DJ\\&quot;,\\n    \\&quot;city\\&quot;: \\&quot;Amsterdam\\&quot;,\\n    \\&quot;country\\&quot;: \\&quot;NL\\&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  \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@example.com\\&quot;,\\n  \\&quot;channel\\&quot;: \\&quot;iOS\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;my-app:\/\/adyen\\&quot;,\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&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'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\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; 1000\\n  },\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :shopperReference =&gt; 'YOUR_UNIQUE_SHOPPER_ID',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'scheme',\\n    :encryptedCardNumber =&gt; 'adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..',\\n    :encryptedExpiryMonth =&gt; 'adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..',\\n    :encryptedExpiryYear =&gt; 'adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..',\\n    :encryptedSecurityCode =&gt; 'adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..',\\n    :holderName =&gt; 'S. Hopper'\\n  },\\n  :billingAddress =&gt; {\\n    :street =&gt; 'Infinite Loop',\\n    :houseNumberOrName =&gt; '1',\\n    :postalCode =&gt; '1011DJ',\\n    :city =&gt; 'Amsterdam',\\n    :country =&gt; 'NL'\\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  :shopperEmail =&gt; 's.hopper@example.com',\\n  :channel =&gt; 'iOS',\\n  :returnUrl =&gt; 'my-app:\/\/adyen',\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;EUR\\&quot;,\\n  value: 1000\\n};\\n\\nconst cardDetails: Types.checkout.CardDetails = {\\n  encryptedCardNumber: \\&quot;adyenjs_0_1_18$k7s65M5V0KdPxTErhBIPoMPI8HlC..\\&quot;,\\n  holderName: \\&quot;S. Hopper\\&quot;,\\n  encryptedSecurityCode: \\&quot;adyenjs_0_1_24$XUyMJyHebrra\\\/TpSda9fha978+..\\&quot;,\\n  encryptedExpiryYear: \\&quot;adyenjs_0_1_18$CkCOLYZsdqpxGjrALWHj3QoGHqe+..\\&quot;,\\n  encryptedExpiryMonth: \\&quot;adyenjs_0_1_18$p2OZxW2XmwAA8C1Avxm3G9UB6e4..\\&quot;,\\n  type: Types.checkout.CardDetails.TypeEnum.Scheme\\n};\\n\\nconst billingAddress: Types.checkout.BillingAddress = {\\n  country: \\&quot;NL\\&quot;,\\n  city: \\&quot;Amsterdam\\&quot;,\\n  street: \\&quot;Infinite Loop\\&quot;,\\n  houseNumberOrName: \\&quot;1\\&quot;,\\n  postalCode: \\&quot;1011DJ\\&quot;\\n};\\n\\nconst browserInfo: Types.checkout.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.checkout.PaymentRequest = {\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  channel: Types.checkout.PaymentRequest.ChannelEnum.iOS,\\n  paymentMethod: cardDetails,\\n  shopperEmail: \\&quot;s.hopper@example.com\\&quot;,\\n  billingAddress: billingAddress,\\n  returnUrl: \\&quot;my-app:\/\/adyen\\&quot;,\\n  browserInfo: browserInfo,\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>In the response, check if there is an <code>action<\/code> object. Your next steps depend on whether the response contains an <code>action<\/code> object, and on the <code>action.type<\/code>.<\/p>\n<table>\n<thead>\n<tr>\n<th><\/th>\n<th>Description<\/th>\n<th>Next steps<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>No <code>action<\/code> object<\/td>\n<td>The transaction was either exempted or out-of-scope for 3D Secure authentication.<\/td>\n<td>Use the <code>resultCode<\/code> to <a href=\"#present-the-payment-result\">present the payment result to your shopper<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><code>action<\/code> object <br><code>type<\/code>:<strong>redirect<\/strong><\/td>\n<td>The payment qualifies for 3D Secure.<\/td>\n<td>1. Pass the <code>action<\/code> object to your client app.<br> 2. <a href=\"#handle-the-redirect\">Use the Redirect Component to handle the redirect<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A sample  <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> response with <code>action.type<\/code>: <strong>redirect<\/strong>:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n   \\\"resultCode\\\":\\\"RedirectShopper\\\",\\n   \\\"action\\\":{\\n      \\\"method\\\":\\\"GET\\\",\\n      \\\"paymentMethodType\\\":\\\"scheme\\\",\\n      \\\"type\\\":\\\"redirect\\\",\\n      \\\"url\\\":\\\"https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/threeDS\\\/redirect?MD=M2R...\\\"\\n   },\\n   ...\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"handle-the-redirect\">Handle the redirect<\/h2>\n<p>Use the Redirect Component to redirect the shopper to complete the 3D Secure authentication.<\/p>\n<ol>\n<li>\n<p>Create and persist an instance of the Redirect Component.<\/p>\n<pre><code class=\"language-swift\">let component = RedirectComponent(apiContext: apiContext)\ncomponent.delegate = delegate\ncomponent.presentationDelegate = presentationDelegate\nself.redirectComponent = component<\/code><\/pre>\n<p>Than use it to handle the action:<\/p>\n<pre><code class=\"language-swift\">let action = try JSONDecoder().decode(Action.self, from: actionData)\nredirectComponent.handle(action)<\/code><\/pre>\n<\/li>\n<li>\n<p>You then need to inform the Component when shopper returns to your app. To do this, implement the following in your <code>UIApplicationDelegate<\/code>:<\/p>\n<pre><code class=\"language-swift\">func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -&gt; Bool {\nRedirectComponent.applicationDidOpen(from: url)\nreturn true\n}<\/code><\/pre>\n<p>After the Redirect Component completes the action, it invokes the <code>didProvide<\/code> method.<\/p>\n<\/li>\n<li>\n<p>From your server, make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request providing the <code>data<\/code> from the <code>didProvide<\/code> method from your client app.<\/p>\n<div class=\"notices green\">\n<p>On Checkout API v67 and later, the payment is authorized after the shopper completes authentication. You make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request to get the payment result. On earlier versions, you need to complete the payment by making a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request containing payment data.<\/p>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"''\" :id=\"'details-request-component-3ds'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/details \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{hint:object passed from the front end or client app}STATE_DATA{\\\/hint}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Set your X-API-KEY with the API key from the Customer Area.\\nString xApiKey = \\&quot;ADYEN_API_KEY\\&quot;;\\nClient client = new Client(xApiKey,Environment.TEST);\\nCheckout checkout = new Checkout(client);\\n\\\/\\\/ STATE_DATA is an object passed from the front end or client app, deserialized from JSON to a data structure.\\nPaymentsDetailsRequest paymentsDetailsRequest = STATE_DATA;\\nPaymentsResponse paymentsDetailsResponse = checkout.paymentsDetails(paymentsDetailsRequest);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Set your X-API-KEY with the API key from the Customer Area.\\n$client = new \\\\Adyen\\\\Client();\\n$client-&gt;setEnvironment(\\\\Adyen\\\\Environment::TEST);\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n$service = new \\\\Adyen\\\\Service\\\\Checkout($client);\\n\\n\\\/\\\/ STATE_DATA is an object passed from the front end or client app, deserialized from JSON to a data structure.\\n$params = STATE_DATA;\\n$result = $service-&gt;paymentsDetails($params);\\n\\n\\\/\\\/ Check if further action is needed\\nif (array_key_exists(\\&quot;action\\&quot;, $result)){\\n   \\\/\\\/ Pass the action object to your frontend.\\n   \\\/\\\/ $result[\\&quot;action\\&quot;]\\n}\\nelse {\\n   \\\/\\\/ No further action needed, pass the resultCode to your front end\\n   \\\/\\\/ $result['resultCode']\\n}&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Set your X-API-KEY with the API key from the Customer Area.\\nstring apiKey = \\&quot;ADYEN_API_KEY\\&quot;;\\nvar client = new Client (apiKey, Environment.Test);\\nvar checkout = new Checkout(client);\\n\\\/\\\/ STATE_DATA is an object passed from the front end or client app, deserialized from JSON to a data structure.\\nvar paymentsDetailsRequest = STATE_DATA;\\nvar paymentsDetailsResponse = checkout.PaymentDetails(paymentsDetailsRequest);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;const {Client, Config, CheckoutAPI} = require('@adyen\\\/api-library');\\nconst config = new Config();\\n\\\/\\\/ Set your X-API-KEY with the API key from the Customer Area.\\nconfig.apiKey = '[ADYEN_API_KEY]';\\nconst client = new Client({ config });\\nclient.setEnvironment(\\&quot;TEST\\&quot;);\\nconst checkout = new CheckoutAPI(client);\\n\\\/\\\/ STATE_DATA is an object passed from the front end or client app, deserialized from JSON to a data structure.\\ncheckout.paymentsDetails(STATE_DATA).then(res =&gt; res);&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Set your X-API-KEY with the API key from the Customer Area.\\nadyen = Adyen.Adyen()\\nadyen.payment.client.platform = \\&quot;test\\&quot;\\nadyen.client.xapikey = 'ADYEN_API_KEY'\\n\\n# STATE_DATA is an object passed from the front end or client app, deserialized from JSON to a data structure.\\nrequest = STATE_DATA\\nresult = adyen.checkout.payments_details(request)\\n\\n# Check if further action is needed.\\nif 'action' in result.message:\\n   # Pass the action object to your front end\\n   # result.message['action']\\nelse:\\n   # No further action needed, pass the resultCode to your front end\\n   # result.message['resultCode']&quot;},{&quot;language&quot;:&quot;ruby&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;require 'adyen-ruby-api-library'\\n\\n# Set your X-API-KEY with the API key from the Customer Area.\\nadyen = Adyen::Client.new\\nadyen.env = :test\\nadyen.api_key = \\&quot;ADYEN_API_KEY\\&quot;\\n\\n# STATE_DATA is an object passed from the front end or client app, deserialized from JSON to a data structure.\\nrequest = STATE_DATA\\nresponse = adyen.checkout.payments.details(request)\\n\\n# Check if further action is needed.\\nif response.body.has_key(:action)\\n   # Pass the action object to your frontend\\n   puts response.body[:action]\\nelse\\n   # No further action needed, pass the resultCode to your frontend\\n   puts response.body[:resultCode]\\nend&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>You receive a response containing:<\/p>\n<ul>\n<li><code>resultCode<\/code>: Use this to <a href=\"#present-the-payment-result\">present the result to your shopper<\/a>.<\/li>\n<li><code>pspReference<\/code>: Our unique identifier for the transaction.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'\/payments\/details response'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"resultCode\\\": \\\"Authorised\\\",\\n  \\\"pspReference\\\": \\\"V4HZ4RBFJGXXGN82\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<div class=\"notices green\">\n<p>For more information and detailed instructions, refer to <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow\/?platform=iOS&amp;integration=Components#handle-the-redirect\">Using the Redirect Component<\/a>.<\/p>\n<\/div>\n<h2 id=\"present-the-payment-result\">Present the payment result<\/h2>\n<p>Use the\u00a0 <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#responses-200-resultCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">resultCode<\/a> from the  <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> or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> response to present the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a <a href=\"\/pt\/development-resources\/webhooks\">webhook<\/a>.<\/p>\n<p><\/p>\n<p>For card payments, you can receive the following <code>resultCode<\/code> values:<\/p>\n<table>\n<thead>\n<tr>\n<th>resultCode<\/th>\n<th>Description<\/th>\n<th>Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Authorised<\/strong><\/td>\n<td>The payment was successful.<\/td>\n<td>Inform the shopper that the payment has been successful. <br> If you are using <a href=\"\/pt\/online-payments\/capture#manual-capture\">manual capture<\/a>, you also need to <a href=\"\/pt\/online-payments\/capture\">capture<\/a> the payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>Cancelled<\/strong><\/td>\n<td>The shopper cancelled the payment.<\/td>\n<td>Ask the shopper if they want to continue with the order, or ask them to select a different payment method.<\/td>\n<\/tr>\n<tr>\n<td><strong>Error<\/strong><\/td>\n<td>There was an error when the payment was being processed. For more information, check the <a href=\"\/pt\/development-resources\/refusal-reasons\">\n  <code>refusalReason<\/code>\n<\/a> field.<\/td>\n<td>Inform the shopper that there was an error processing their payment.<\/td>\n<\/tr>\n<tr>\n<td><strong>Refused<\/strong><\/td>\n<td>The payment was refused.  For more information, check the <a href=\"\/pt\/development-resources\/refusal-reasons\">\n  <code>refusalReason<\/code>\n<\/a> field.<\/td>\n<td>Ask the shopper to try the payment again using a different payment method.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Use our test card numbers to <a href=\"\/pt\/development-resources\/testing\/3d-secure-2-authentication\">test how your integration handles different 3D Secure authentication scenarios<\/a>.<\/p>\n<p>When you are ready to <a href=\"\/pt\/get-started-with-adyen\/#apply-for-your-live-account\">go live<\/a>, follow our <a href=\"\/pt\/online-payments\/go-live-checklist\/\">go-live checklist<\/a>.<\/p>\n<p>When using our <a href=\"\/pt\/development-resources\/live-endpoints\/\">live endpoints<\/a>, make sure that all API requests you make for the same payment session use the same live endpoint region. Using different regions for  <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> and  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> requests may result in errors when authenticating with 3D Secure.<\/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=\"\/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=\"\/online-payments\/3d-secure\/api-reference\"\n                        target=\"_self\"\n                        >\n                    3D Secure 2 API Reference\n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"\/payment-methods\"\n                        target=\"_self\"\n                        >\n                    Payment methods\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/3d-secure\/redirect-3ds2\/ios-component","articleFields":{"description":"Support cards with 3D Secure authentication through a redirect in your iOS app","feedback_component":true,"parameters":{"country_code":"NL","currency":"EUR","channel":"iOS","return_url":"my-app:\/\/adyen","shopper_locale":"nl-NL","user_agent":"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"},"last_edit_on":"11-05-2021 17:34"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/3d-secure\/redirect-3ds2\/ios-component","title":"Redirect 3DS Components integration","content":"Use our Redirect Component to redirect the shopper to perform 3D Secure 2 authentication.\nWhen adding card payments with redirect 3D Secure authentication to your integration, you additionally need to:\n\nCollect additional parameters in your payment form.\nProvide the required 3D Secure parameters when making a payment request.\nUse the Redirect Component to handle the redirect.\n\nRequirements\nBefore starting your integration:\n\nMake sure that you have integrated our Card Component, or built your own UI for collecting shopper's card details.\nIf you are using 3D Secure for PSD2 compliance, read our comprehensive PSD2 SCA guide.\n\nCollect additional information at checkout\nFor higher authentication rates, we strongly recommend that you collect the cardholder name for payments with 3D Secure authentication.\nTo collect the cardholder name using our Card Component, specify the following when adding the Card Component:\n\nshowsHolderNameField: true\n\nlet configuration = CardComponent.Configuration(showsHolderNameField: true)\nlet component =  CardComponent(paymentMethod: paymentMethod,\n                                   apiContext: apiContext,\n                                   configuration: configuration)\ncomponent.delegate = self\nself.cardComponent = component\npresent(component.viewController, animated: true)\nWe also recommend that you collect the shopper billing address in advance in your payment form. Deliver this parameter to your backend when making a payment as it is required by the card schemes.\nMake a payment\n\n\nWhen you make a payment request, include the following additional 3D Secure 2 parameters.\n\nSee additional 3D Secure 2 parameters that we recommend to include in your request to increase authentication performance in our API reference.\n\n\n\n\nParameter name\nRequired\nDescription\n\n\n\n\n paymentMethod\n\nThe type and required details for a card payment method. When using the Card Component, pass the data.paymentMethod from the didSubmit event from your client app. When submitting raw card data, refer to Raw card data for the fields that you need to pass.\n\n\n paymentMethod.holderName\n\nUse case: required for Visa and JCB transactions.  The cardholder's name.\n\n\n channel\n\nThe platform where the transaction takes place. Set to iOS.\n\n\n returnUrl\n\nThe URL where the shopper will be redirected back to after completing 3D Secure authentication. Use the custom URL for your app, for example, my-app:\/\/. For more information on setting custom URL schemes, refer to the Apple Developer documentation.  Format: Maximum characters: 1024.Must not include \/\/ (double slash) after the top-level domain.\n\n\n browserInfo\n\nThe shopper's browser information. The following sub-fields are required:  acceptHeader: The accept header value of the shopper's browser. You can use a dummy value.  userAgent: Get it using \n  BrowserInfo.initialize\n.\n\n\n shopperIP\n\nUse case: required for Visa and JCB transactions.  The shopper's IP address.\n\n\n shopperEmail\n\nUse case: required for Visa and JCB transactions.  The cardholder's email address. If you do not include the shopper email, you must include the shopper's phone number in your request.\n\n\n telephoneNumber\n\nUse case: required for Visa and JCB transactions if you did not include the shopperEmail field. The shopper's phone number. To be more specific, you can use the mobilePhone, homePhone, and workPhone fields in the threeDS2RequestData object.   Format: The phone number must include a plus sign (+) and a country code (1-3 digits), followed by the number (4-15 digits).   Example: +4912345678901  If the value you provide does not follow the guidelines, we drop the value and do not submit it for authentication. \n\n\n\n Required for all transactions.  Required for particular setups, or issuers and card schemes.  Recommended for all transactions, but not required.\n\n\n\n\n\nIn the response, check if there is an action object. Your next steps depend on whether the response contains an action object, and on the action.type.\n\n\n\n\nDescription\nNext steps\n\n\n\n\nNo action object\nThe transaction was either exempted or out-of-scope for 3D Secure authentication.\nUse the resultCode to present the payment result to your shopper.\n\n\naction object type:redirect\nThe payment qualifies for 3D Secure.\n1. Pass the action object to your client app. 2. Use the Redirect Component to handle the redirect.\n\n\n\nA sample  \/payments response with action.type: redirect:\n\n\n\n\n\nHandle the redirect\nUse the Redirect Component to redirect the shopper to complete the 3D Secure authentication.\n\n\nCreate and persist an instance of the Redirect Component.\nlet component = RedirectComponent(apiContext: apiContext)\ncomponent.delegate = delegate\ncomponent.presentationDelegate = presentationDelegate\nself.redirectComponent = component\nThan use it to handle the action:\nlet action = try JSONDecoder().decode(Action.self, from: actionData)\nredirectComponent.handle(action)\n\n\nYou then need to inform the Component when shopper returns to your app. To do this, implement the following in your UIApplicationDelegate:\nfunc application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey: Any] = [:]) -&gt; Bool {\nRedirectComponent.applicationDidOpen(from: url)\nreturn true\n}\nAfter the Redirect Component completes the action, it invokes the didProvide method.\n\n\nFrom your server, make a POST  \/payments\/details request providing the data from the didProvide method from your client app.\n\nOn Checkout API v67 and later, the payment is authorized after the shopper completes authentication. You make a  \/payments\/details request to get the payment result. On earlier versions, you need to complete the payment by making a  \/payments\/details request containing payment data.\n\n\n\n\nYou receive a response containing:\n\nresultCode: Use this to present the result to your shopper.\npspReference: Our unique identifier for the transaction.\n\n\n\n\n\n\n\nFor more information and detailed instructions, refer to Using the Redirect Component.\n\nPresent the payment result\nUse the\u00a0 resultCode from the  \/payments or  \/payments\/details response to present the payment result to your shopper. You will also receive the outcome of the payment asynchronously in a webhook.\n\nFor card payments, you can receive the following resultCode values:\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nAuthorised\nThe payment was successful.\nInform the shopper that the payment has been successful.  If you are using manual capture, you also need to capture the payment.\n\n\nCancelled\nThe shopper cancelled the payment.\nAsk the shopper if they want to continue with the order, or ask them to select a different payment method.\n\n\nError\nThere was an error when the payment was being processed. For more information, check the \n  refusalReason\n field.\nInform the shopper that there was an error processing their payment.\n\n\nRefused\nThe payment was refused.  For more information, check the \n  refusalReason\n field.\nAsk the shopper to try the payment again using a different payment method.\n\n\n\nTest and go live\nUse our test card numbers to test how your integration handles different 3D Secure authentication scenarios.\nWhen you are ready to go live, follow our go-live checklist.\nWhen using our live endpoints, make sure that all API requests you make for the same payment session use the same live endpoint region. Using different regions for  \/payments and  \/payments\/details requests may result in errors when authenticating with 3D Secure.\nSee also\n\n\n                    iOS Components integration guide\n                \n                    3D Secure 2 API Reference\n                \n                    Webhooks\n                \n                    Payment methods\n                \n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"3D Secure 2 authentication","lvl3":"3D Secure 2 redirect authentication","lvl4":"Redirect 3DS Components integration"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/3d-secure","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/3d-secure\/redirect-3ds2","lvl4":"\/pt\/online-payments\/3d-secure\/redirect-3ds2\/ios-component"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Redirect","Components","integration"]}}
