{"title":"Redirect 3DS Components integration","category":"default","creationDate":1567783140,"content":"<p>You can use the Redirect Component to handle Redirect 3D Secure 2 authentication if you have an API-only integration.<\/p>\n<p>If you have a Components integration that uses the Card Component, the Card Component can handle Redirect 3D Secure 2 authentication without additional integration. You do not need to use the 3D Secure 2 Component in this case.<\/p>\n<div class=\"notices green\">\n<p>This guide is for integrations using Redirect Component v5.0.0 with the <a href=\"\/pt\/online-payments\/build-your-integration\">Advanced flow<\/a>. <br>For v4.13.3 or earlier, use the <a href=\"\/pt\/online-payments\/3d-secure\/redirect-3ds2\/android-component\/earlier-versions\">guide for earlier versions<\/a>.<\/p>\n<\/div>\n<h2>Requirements<\/h2>\n<p><a href=\"\/pt\/payment-methods\/cards\/api-only\">Build your own UI<\/a> for collecting card details.<\/p>\n<h2>Collect additional parameters in your payment form<\/h2>\n<p>For higher authentication rates, we strongly recommend that you collect the shopper's billing address and email address. Send these parameters to your server when making a payment, because they are required by the card schemes.<\/p>\n<h2>Import the Redirect Component<\/h2>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Android&amp;integration=Components&amp;version=5.0.0#1-import-the-library\">import the library<\/a>, import the Redirect Component:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Import the Redirect Component'\" :id=\"''\" :code-data='[{\"language\":\"kotlin\",\"tabTitle\":\"\",\"content\":\"implementation \\\"com.adyen.checkout:redirect:YOUR_VERSION\\\"\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"make-a-payment\">Make a payment<\/h2>\n<ol>\n<li>\n<p>When you <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Android&amp;integration=Components&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\/android-component\">Card Component<\/a>, pass the <code>paymentComponentState.data.paymentMethod<\/code> object 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. 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>Android<\/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. Get this URL from the Component in the <code>RedirectComponent.getReturnUrl(context)<\/code>. <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:\/\/developer.android.com\/reference\/android\/webkit\/WebSettings#getDefaultUserAgent(android.content.Context)\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">\n  <code>WebSettings.getDefaultUserAgent(Context);<\/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. 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. 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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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;Android\\&quot;,\\n   \\&quot;returnUrl\\&quot;:\\&quot;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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;Android\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setShopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  -&gt;setBillingAddress($billingAddress)\\n  -&gt;setReturnUrl(\\&quot;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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.Android,\\n  PaymentMethod = new CheckoutPaymentMethod(cardDetails),\\n  ShopperEmail = \\&quot;s.hopper@example.com\\&quot;,\\n  BillingAddress = billingAddress,\\n  ReturnUrl = \\&quot;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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;Android\\&quot;,\\n  returnUrl: \\&quot;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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;Android\\&quot;),\\n  PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&amp;cardDetails),\\n  ShopperEmail: common.PtrString(\\&quot;s.hopper@example.com\\&quot;),\\n  BillingAddress: &amp;billingAddress,\\n  ReturnUrl: \\&quot;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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;Android\\&quot;,\\n  \\&quot;returnUrl\\&quot;: \\&quot;adyencheckout:\/\/your.package.name\\&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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36',\\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; 'Android',\\n  :returnUrl =&gt; 'adyencheckout:\/\/your.package.name',\\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 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36\\&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.Android,\\n  paymentMethod: cardDetails,\\n  shopperEmail: \\&quot;s.hopper@example.com\\&quot;,\\n  billingAddress: billingAddress,\\n  returnUrl: \\&quot;adyencheckout:\/\/your.package.name\\&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>Response<\/th>\n<th>Description<\/th>\n<th>What to do<\/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 2 authentication.<\/td>\n<td>Continue to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Android&amp;integration=Components&amp;version=5.0.0#get-the-payment-outcome\">get the payment outcome<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><code>action.type<\/code>: <strong>redirect<\/strong><\/td>\n<td>The payment qualifies for 3D Secure.<\/td>\n<td><a href=\"#handle-the-redirect\">Handle the redirect<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>A sample 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    \\\"paymentMethodType\\\": \\\"scheme\\\",\\n    \\\"url\\\": \\\"https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/threeDS\\\/redirect?MD=M2R...\\\",\\n    \\\"method\\\": \\\"GET\\\",\\n    \\\"type\\\": \\\"redirect\\\"\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2>Handle the redirect<\/h2>\n<p>Pass the <code>action<\/code> object to the Component to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Android&amp;integration=Components&amp;version=5.0.0#handle-the-redirect\">handle the redirect<\/a>. The shopper is redirected to a separate page to perform 3D Secure 2 authentication and returns to your app after.<\/p>\n<p>Continue to <a href=\"\/pt\/online-payments\/build-your-integration\/advanced-flow?platform=Android&amp;integration=Components&amp;version=5.0.0#get-the-payment-outcome\">get the payment outcome<\/a>.<\/p>\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\/psd2-sca-compliance-and-implementation-guide\"\n                        target=\"_self\"\n                        >\n                    PSD2 SCA guide\n                <\/a><\/li><li><a href=\"\/online-payments\/build-your-integration\/sessions-flow?platform=Android&amp;integration=Components\"\n                        target=\"_self\"\n                        >\n                    Android 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\/android-component","articleFields":{"description":"Support cards with 3D Secure authentication through a redirect in your Android app.","feedback_component":true,"parameters":{"country_code":"NL","currency":"EUR","channel":"Android","return_url":"adyencheckout:\/\/your.package.name","shopper_locale":"nl-NL","user_agent":"Mozilla\/5.0 (Linux; Android 6.0.1; Nexus 6P Build\/MMB29P) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/47.0.2526.83 Mobile Safari\/537.36"},"last_edit_on":"11-05-2021 17:37","page_id":"5f6c21f8-e5c2-42f5-9254-01dc8d3c2813","filters_component":false,"decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/3d-secure\/redirect-3ds2\/android-component","title":"Redirect 3DS Components integration","content":"You can use the Redirect Component to handle Redirect 3D Secure 2 authentication if you have an API-only integration.\nIf you have a Components integration that uses the Card Component, the Card Component can handle Redirect 3D Secure 2 authentication without additional integration. You do not need to use the 3D Secure 2 Component in this case.\n\nThis guide is for integrations using Redirect Component v5.0.0 with the Advanced flow. For v4.13.3 or earlier, use the guide for earlier versions.\n\nRequirements\nBuild your own UI for collecting card details.\nCollect additional parameters in your payment form\nFor higher authentication rates, we strongly recommend that you collect the shopper's billing address and email address. Send these parameters to your server when making a payment, because they are required by the card schemes.\nImport the Redirect Component\nWhen you import the library, import the Redirect Component:\n\n    \n\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 paymentComponentState.data.paymentMethod object 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 Android.\n\n\n returnUrl\n\nThe URL where the shopper will be redirected back to after completing 3D Secure authentication. Get this URL from the Component in the RedirectComponent.getReturnUrl(context).  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  WebSettings.getDefaultUserAgent(Context);\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\nResponse\nDescription\nWhat to do\n\n\n\n\nNo action object\nThe transaction was either exempted or out-of-scope for 3D Secure 2 authentication.\nContinue to get the payment outcome.\n\n\naction.type: redirect\nThe payment qualifies for 3D Secure.\nHandle the redirect.\n\n\n\nA sample response with action.type: redirect:\n\n\n\n\n\nHandle the redirect\nPass the action object to the Component to handle the redirect. The shopper is redirected to a separate page to perform 3D Secure 2 authentication and returns to your app after.\nContinue to get the payment outcome.\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                    PSD2 SCA guide\n                \n                    Android 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\/android-component"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Redirect","Components","integration"]}}
