{"title":"Directory Lookup","category":"default","creationDate":1776961627,"content":"<div class=\"sc-notice warning\"><div>\n<p><strong>Hosted Payment Pages are no longer available<\/strong><\/p>\n<p>To accept payments through an Adyen-hosted page, use our <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Hosted%2BCheckout\">Hosted Checkout<\/a>.<\/p>\n<p>This page is for the classic Hosted Payment Pages (HPP) integration, which has reached end-of-life.  We are no longer processing transactions though HPP.<\/p>\n<\/div><\/div>\n<p>Learn how to accept local payment methods\u00a0(such as direct bank transfer, ewallets, or mobile payments) using the Directory Lookup integration.<\/p>\n<hr \/>\n<p>With Directory Lookup, you\u00a0can fetch the available payment methods from Adyen. In return, the\u00a0plataforma de pagamentos da Adyen\u00a0responds with a list of cards and\u00a0<a href=\"\/pt\/payment-methods\">local payment methods<\/a>\u00a0supported for the specified payment amount in the current region.<\/p>\n<div class=\"additional-info-block output-inline\">\n<div class=\"additional-info-block__body\"><p><strong>Enable payment methods<\/strong><\/p><p>Local payment methods vary per country or region.<br \/>\nFor more information, see <a href=\"\/pt\/payment-methods\">payment methods<\/a>.<\/p><\/div><\/div>\n\n<p>Use this payment data to dynamically generate a customized payment page allowing the shopper to complete their\u00a0purchase using a targeted selection of payment methods.<\/p>\n<p>After selecting a payment method, the shopper is redirected to the payment method's\u00a0page (for example, iDEAL or Sofort) and completes the payment.<\/p>\n<p>Following any payment request, Adyen sends back a <a href=\"\/pt\/development-resources\/webhooks\">webhook event<\/a> providing the status of the payment.<\/p>\n<h2 id=\"overview\">Overview<\/h2>\n<p>The flow of a payment using a local payment method is illustrated in the diagram below:<\/p>\n<p><img alt=\"\" src=\"\/user\/pages\/docs\/02.online-payments\/60.classic-integrations\/04.hosted-payment-pages\/02.directory-lookup\/DL-flow.png\" \/>\u00a0<\/p>\n<h2 id=\"before-you-begin\">Requirements<\/h2>\n<p>To process local payment methods, create a new\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/skin\">skin<\/a>\u00a0and\u00a0style the form to let your\u00a0shopper\u00a0select a\u00a0payment method:<\/p>\n<ol>\n<li>Go to\u00a0<a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>\u00a0&gt;\u00a0<strong>Account<\/strong>\u00a0&gt;\u00a0<strong>Skins<\/strong>\u00a0&gt;\u00a0<strong>Create a new skin\u2028.<\/strong><\/li>\n<li>Add the skin description.<\/li>\n<li>Generate the HMAC keys\u00a0for the test and live platforms\u00a0(remember to take a note of this key) and click\u00a0<strong>Save<\/strong>.<\/li>\n<li>Select the skin from the list and click\u00a0<strong>Test<\/strong>\u00a0from the menu bar to verify that\u00a0<strong>Currently on Test<\/strong>\u00a0shows the version information in green.<\/li>\n<\/ol>\n<h2 id=\"step-1-request-local-payment-methods\">Step 1: Request local payment methods<\/h2>\n<p>To retrieve a list of available local payment methods\u00a0make\u00a0a POST request to the\u00a0<code>directory.shtml<\/code>\u00a0endpoint\u00a0with the fields in the code example. For Adyen to verify the authenticity of the request\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hmac-signature-calculation\">calculate the signature<\/a>\u00a0of the request and include this in the\u00a0<code>merchantSig<\/code>\u00a0field.<\/p>\n<p>The example below shows how to make such a request. For additional fields and more details for the payment methods request, refer to the\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hosted-payment-pages-api\/directory-request\">API Reference<\/a>.\u2028\u2028\u00a0<\/p>\n<pre><code class=\"language-bash\">curl https:\/\/test.adyen.com\/hpp\/directory.shtml \\\n -d countryCode=DE \\\n -d currencyCode=EUR \\\n -d merchantAccount=YOUR_MERCHANT_ACCOUNT \\\n -d merchantReference=Test_directory_lookup \\\n -d paymentAmount=2000 \\\n -d sessionValidity=2017-12-25T10%3A31%3A06Z \\\n -d skinCode=sH9qpMyS \\\n -d merchantSig=94AwPXSxs0ECicXi1UDdKEmdzHQ6rf7EF9CC%2FzUO5Tg%3D<\/code><\/pre>\n<div class=\"sc-notice note\"><div>\n<p>All the fields mentioned in the request example (<code>currencyCode<\/code>,\u00a0<code>merchantAccount<\/code>,\u00a0<code>paymentAmount<\/code>, <code>skinCode<\/code>, <code>merchantReference<\/code>, <code>sessionValidity<\/code> and <code>merchantSig<\/code>), except <code>countryCode<\/code>, are mandatory.<\/p>\n<p>We recommended that you provide the <code>countryCode<\/code> field, to accurately state the actual location of the payment, so that the correct payment methods for that location are retrieved.<\/p>\n<\/div><\/div>\n<h2 id=\"step-2-display-local-payment-methods\">Step 2: Display local payment methods<\/h2>\n<p>The directory lookup returns the available payment methods for the shopper based on the country\/region they are shopping from, the amount and currency and skin code you provided. The returned data is a JSON object containing an array with the\u00a0payment methods.\u00a0You can parse the response and provide the list of payment methods to your shopper.<\/p>\n<h3 id=\"version-1\">Version 1<\/h3>\n<p>A response returns a JSON object containing a list of applicable\u00a0payment methods.\u00a0Each payment method has a\u00a0<code>name<\/code>,\u00a0<code>brandCode<\/code>,\u00a0and optionally, a list of issuers (depending on the payment method). In this case, the\u00a0<code>issuerId<\/code>\u00a0identifies a specific issuer and can be used to direct a shopper to the related\u00a0method's webpage.\u2028\u2028<\/p>\n<p>When parsing this response, you can format and display the methods according to your design if you like.<\/p>\n<pre><code class=\"language-json\">{\n   \"paymentMethods\":[\n      {\n         \"brandCode\":\"ideal\",\n         \"name\":\"iDEAL\",\n         \"issuers\":[\n            {\n               \"issuerId\":\"1121\",\n               \"name\":\"Test Issuer\"\n            },\n            {\n               \"issuerId\":\"1152\",\n               \"name\":\"Test Issuer 3\"\n            },\n            {\n               \"issuerId\":\"1151\",\n               \"name\":\"Test Issuer 2\"\n            }\n         ]\n      },\n      {\n         \"brandCode\":\"sepadirectdebit\",\n         \"name\":\"SEPA Direct Debit\"\n      },\n      {\n         \"brandCode\":\"klarna\",\n         \"name\":\"Klarna Invoice\"\n      },\n      {\n         \"brandCode\":\"boku\",\n         \"name\":\"Boku\"\n      },\n      {\n         \"brandCode\":\"paysafecard\",\n         \"name\":\"Paysafecard\"\n      },\n      {\n         \"brandCode\":\"paypal\",\n         \"name\":\"PayPal\"\n      }\n   ]\n}<\/code><\/pre>\n<h3 id=\"version-2\">Version 2<\/h3>\n<p>In case you made a directory lookup request to version 2 (<a href=\"https:\/\/test.adyen.com\/hpp\/directory\/v2.shtml\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/test.adyen.com\/hpp\/directory\/v2.shtml<\/a>), each payment method also returns the\u00a0<code>logos<\/code>\u00a0field containing links to normal, small, and tiny images.<\/p>\n<pre><code class=\"language-json\">\u00a0{\n   \"paymentMethods\":[\n      {\n         \"brandCode\":\"paypal\",\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/paypal.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/paypal_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/paypal_tiny.png\"\n         },\n         \"name\":\"PayPal\"\n      },\n      {\n         \"brandCode\":\"amex\",\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/amex.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/amex_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/amex_tiny.png\"\n         },\n         \"name\":\"American Express\"\n      },\n      {\n         \"brandCode\":\"ideal\",\n         \"issuers\":[\n            {\n               \"issuerId\":\"1121\",\n               \"name\":\"Test Issuer\"\n            },\n            {\n               \"issuerId\":\"1154\",\n               \"name\":\"Test Issuer 5\"\n            }\n         ],\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/ideal.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/ideal_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/ideal_tiny.png\"\n         },\n         \"name\":\"iDEAL\"\n      },\n      {\n         \"brandCode\":\"mc\",\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/mc.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/mc_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/mc_tiny.png\"\n         },\n         \"name\":\"MasterCard\"\n      }\n   ]\n}<\/code><\/pre>\n<h2 id=\"step-3-submit-a-payment-request\">Step 3: Submit a payment request<\/h2>\n<p>After your shopper selects the local payment method, make a POST request including the <code>brandCode<\/code> and <code>issuerId<\/code> (if available) of the selected payment method.\u2028\u2028 Recalculate the signature of your payment request with the <code>brandCode<\/code> and <code>issuerId<\/code> as extra fields and post the request to the\u00a0<code>skipDetails.shtml<\/code>\u00a0endpoint. Your shopper is then redirected to the selected local method to finalize the\u00a0payment.\u2028\u2028\u2028<\/p>\n<div class=\"sc-notice info\"><div>\n<p>Some payment methods restrict WebView in the app for security reasons. We recommend using the following if you want to display local payment method in your app:<\/p>\n<ul>\n<li>\u00a0iOS: SFSafariViewController (<a href=\"https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller<\/a>)<\/li>\n<li>\u00a0Android: Chrome Custom Tabs (<a href=\"https:\/\/developer.chrome.com\/multidevice\/android\/customtabs\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/developer.chrome.com\/multidevice\/android\/customtabs<\/a>)<\/li>\n<\/ul>\n<\/div><\/div>\n<p>The\u00a0HTML code below is an example form.<\/p>\n<pre><code class=\"language-xml\">&lt;html&gt;\n   &lt;body&gt;\n      &lt;form method=\"post\" action=\"https:\/\/test.adyen.com\/hpp\/skipDetails.shtml\" id=\"adyenForm\" name=\"adyenForm\" target=\"_parent\"&gt;\n         &lt;input type=\"hidden\" name=\"merchantSig\" value=\"3iWDU\/V5RMtdaiZC4YRIpoX9\/v0=\" \/&gt;\n         &lt;input type=\"hidden\" name=\"sessionValidity\" value=\"2016-10-11T10:30:00Z\" \/&gt;\n         &lt;input type=\"hidden\" name=\"shopperLocale\" value=\"en_GB\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantAccount\" value=\"YOUR_MERCHANT_ACCOUNT\" \/&gt;\n         &lt;input type=\"hidden\" name=\"paymentAmount\" value=\"10000\" \/&gt;\n         &lt;input type=\"hidden\" name=\"currencyCode\" value=\"GBP\" \/&gt;\n         &lt;input type=\"hidden\" name=\"skinCode\" value=\"4aD37dJA\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantReference\" value=\"Internet order 12345\" \/&gt;\n         &lt;input type=\"hidden\" name=\"brandCode\" value=\"ideal\" \/&gt;\n         &lt;input type=\"hidden\" name=\"issuerId\" value=\"1121\" \/&gt;\n         &lt;input type=\"submit\" value=\"Send\" \/&gt;\n         &lt;input type=\"reset\" \/&gt;\n      &lt;\/form&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<h2 id=\"step-4-payment-response\">Step 4: Payment response<\/h2>\n<p>After shoppers have completed the payment,\u00a0they are redirected to a result page\u00a0of your choice. You can set a custom result URL in the Customer Area on the skin configuration page. Another option is to include the result URL in the\u00a0<code>resURL<\/code>\u00a0field in the payment request.\u2028\u2028<\/p>\n<p>Adyen appends parameters to this result URL to inform you about the payment status. If the status is already determined (either authorised or refused), you can use this information to\u00a0display a payment successful or payment failed page. In a case when the current status is\u00a0<a href=\"\/pt\/online-payments\/payment-result-codes\">pending<\/a>, use\u00a0<a href=\"\/pt\/development-resources\/webhooks\">payment webhook event<\/a>\u00a0to get the outcome of a payment request and store this result in your back office, if necessary.<\/p>\n<p>An example of a redirect URL to a result page:<\/p>\n<pre><code class=\"language-text\">http:\/\/yourSite.com\/pRes.jsp<\/code><\/pre>\n<p>An example of a corresponding\u00a0<code>resultURL<\/code>:<\/p>\n<pre><code class=\"language-text\">http:\/\/yourSite.com\/pRes.jsp?merchantReference=Internet%20order%2012345&amp;skinCode=4aD37dJA&amp;shopperLocale=en_GB&amp;authResult=AUTHORISED&amp;pspReference=1211992213193029&amp;merchantSig=CPb2cObMxmIIE0khO8WhEYyKDJs%3D\n\n&lt;!-- Appended URL parameters:\n* merchantReference = Internet order 12345\n* skinCode = 4aD37dJA\n* shopperLocale = en_GB\n* authResult = AUTHORISED\n* pspReference = 1211992213193029\n* merchantSig = CPb2cObMxmIIE0khO8WhEYyKDJs%3D\n --&gt;<\/code><\/pre>\n<p>To ensure that the response is not tampered with validate the response by calculating the signature of the returned fields, except the merchantSig field. Adyen uses your secret HMAC key to sign the data, so the calculated signature should be the same as the\u00a0<code>merchantSig<\/code>\u00a0included in the response.\u2028\u2028<\/p>\n<h2 id=\"skip-hosted-payment-pages-hpp\">Skip Hosted Payment Pages (HPP)<\/h2>\n<p>If you want, you can skip displaying the payment method selection page with the list of available payment methods returned by the directory lookup. You can route your shopper directly to the payment or order detail entry page.<\/p>\n<p>To use this payment flow:<\/p>\n<ul>\n<li>Make a payment request call to\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/hosted-payment-pages-api\">skipDetails.shtml<\/a>.<\/li>\n<li>In the call, include the\u00a0<code>brandCode<\/code>\u00a0and\u00a0<code>issuerId<\/code>\u00a0parameters.<\/li>\n<\/ul>\n<p>For more information on Skins and Hosted Payment Pages, see\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/skin\">Skin<\/a>.<\/p>\n<h3 id=\"request\">Request<\/h3>\n<pre><code class=\"language-xml\">&lt;html&gt;\n   &lt;body&gt;\n      &lt;form method=\"post\" action=\"https:\/\/test.adyen.com\/hpp\/skipDetails.shtml\" id=\"adyenForm\" name=\"adyenForm\" target=\"_parent\"&gt;\n         &lt;input type=\"hidden\" name=\"merchantSig\" value=\"3iWDU\/V5RMtdaiZC4YRIpoX9\/v0=\" \/&gt;\n         &lt;input type=\"hidden\" name=\"sessionValidity\" value=\"2016-10-11T10:30:00Z\" \/&gt;\n         &lt;input type=\"hidden\" name=\"shopperLocale\" value=\"en_GB\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantAccount\" value=\"YOUR_MERCHANT_ACCOUNT\" \/&gt;\n         &lt;input type=\"hidden\" name=\"paymentAmount\" value=\"10000\" \/&gt;\n         &lt;input type=\"hidden\" name=\"currencyCode\" value=\"GBP\" \/&gt;\n         &lt;input type=\"hidden\" name=\"skinCode\" value=\"4aD37dJA\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantReference\" value=\"Internet order 12345\" \/&gt;\n         &lt;input type=\"hidden\" name=\"brandCode\" value=\"ideal\" \/&gt;\n         &lt;input type=\"hidden\" name=\"issuerId\" value=\"1121\" \/&gt;\n         &lt;input type=\"submit\" value=\"Send\" \/&gt;\n         &lt;input type=\"reset\" \/&gt;\n      &lt;\/form&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;<\/code><\/pre>\n<div class=\"sc-notice note\"><div>\n<p>Fields for this call vary per payment method.<\/p>\n<\/div><\/div>","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/directory-lookup","articleFields":{"id":"42834390","type":"page","_expandable":{"operations":""},"status":"current","sitemap":{"priority":0.3},"parameters":{"anchor_new":"<a href=\"\/online-payments\">Online payments<\/a>","parent_page":"classic Hosted Payment Pages (HPP)"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/directory-lookup","title":"Directory Lookup","content":"\nHosted Payment Pages are no longer available\nTo accept payments through an Adyen-hosted page, use our Hosted Checkout.\nThis page is for the classic Hosted Payment Pages (HPP) integration, which has reached end-of-life.  We are no longer processing transactions though HPP.\n\nLearn how to accept local payment methods\u00a0(such as direct bank transfer, ewallets, or mobile payments) using the Directory Lookup integration.\n\nWith Directory Lookup, you\u00a0can fetch the available payment methods from Adyen. In return, the\u00a0plataforma de pagamentos da Adyen\u00a0responds with a list of cards and\u00a0local payment methods\u00a0supported for the specified payment amount in the current region.\n\nEnable payment methodsLocal payment methods vary per country or region.\nFor more information, see payment methods.\n\nUse this payment data to dynamically generate a customized payment page allowing the shopper to complete their\u00a0purchase using a targeted selection of payment methods.\nAfter selecting a payment method, the shopper is redirected to the payment method's\u00a0page (for example, iDEAL or Sofort) and completes the payment.\nFollowing any payment request, Adyen sends back a webhook event providing the status of the payment.\nOverview\nThe flow of a payment using a local payment method is illustrated in the diagram below:\n\u00a0\nRequirements\nTo process local payment methods, create a new\u00a0skin\u00a0and\u00a0style the form to let your\u00a0shopper\u00a0select a\u00a0payment method:\n\nGo to\u00a0Customer Area\u00a0&gt;\u00a0Account\u00a0&gt;\u00a0Skins\u00a0&gt;\u00a0Create a new skin\u2028.\nAdd the skin description.\nGenerate the HMAC keys\u00a0for the test and live platforms\u00a0(remember to take a note of this key) and click\u00a0Save.\nSelect the skin from the list and click\u00a0Test\u00a0from the menu bar to verify that\u00a0Currently on Test\u00a0shows the version information in green.\n\nStep 1: Request local payment methods\nTo retrieve a list of available local payment methods\u00a0make\u00a0a POST request to the\u00a0directory.shtml\u00a0endpoint\u00a0with the fields in the code example. For Adyen to verify the authenticity of the request\u00a0calculate the signature\u00a0of the request and include this in the\u00a0merchantSig\u00a0field.\nThe example below shows how to make such a request. For additional fields and more details for the payment methods request, refer to the\u00a0API Reference.\u2028\u2028\u00a0\ncurl https:\/\/test.adyen.com\/hpp\/directory.shtml \\\n -d countryCode=DE \\\n -d currencyCode=EUR \\\n -d merchantAccount=YOUR_MERCHANT_ACCOUNT \\\n -d merchantReference=Test_directory_lookup \\\n -d paymentAmount=2000 \\\n -d sessionValidity=2017-12-25T10%3A31%3A06Z \\\n -d skinCode=sH9qpMyS \\\n -d merchantSig=94AwPXSxs0ECicXi1UDdKEmdzHQ6rf7EF9CC%2FzUO5Tg%3D\n\nAll the fields mentioned in the request example (currencyCode,\u00a0merchantAccount,\u00a0paymentAmount, skinCode, merchantReference, sessionValidity and merchantSig), except countryCode, are mandatory.\nWe recommended that you provide the countryCode field, to accurately state the actual location of the payment, so that the correct payment methods for that location are retrieved.\n\nStep 2: Display local payment methods\nThe directory lookup returns the available payment methods for the shopper based on the country\/region they are shopping from, the amount and currency and skin code you provided. The returned data is a JSON object containing an array with the\u00a0payment methods.\u00a0You can parse the response and provide the list of payment methods to your shopper.\nVersion 1\nA response returns a JSON object containing a list of applicable\u00a0payment methods.\u00a0Each payment method has a\u00a0name,\u00a0brandCode,\u00a0and optionally, a list of issuers (depending on the payment method). In this case, the\u00a0issuerId\u00a0identifies a specific issuer and can be used to direct a shopper to the related\u00a0method's webpage.\u2028\u2028\nWhen parsing this response, you can format and display the methods according to your design if you like.\n{\n   \"paymentMethods\":[\n      {\n         \"brandCode\":\"ideal\",\n         \"name\":\"iDEAL\",\n         \"issuers\":[\n            {\n               \"issuerId\":\"1121\",\n               \"name\":\"Test Issuer\"\n            },\n            {\n               \"issuerId\":\"1152\",\n               \"name\":\"Test Issuer 3\"\n            },\n            {\n               \"issuerId\":\"1151\",\n               \"name\":\"Test Issuer 2\"\n            }\n         ]\n      },\n      {\n         \"brandCode\":\"sepadirectdebit\",\n         \"name\":\"SEPA Direct Debit\"\n      },\n      {\n         \"brandCode\":\"klarna\",\n         \"name\":\"Klarna Invoice\"\n      },\n      {\n         \"brandCode\":\"boku\",\n         \"name\":\"Boku\"\n      },\n      {\n         \"brandCode\":\"paysafecard\",\n         \"name\":\"Paysafecard\"\n      },\n      {\n         \"brandCode\":\"paypal\",\n         \"name\":\"PayPal\"\n      }\n   ]\n}\nVersion 2\nIn case you made a directory lookup request to version 2 (https:\/\/test.adyen.com\/hpp\/directory\/v2.shtml), each payment method also returns the\u00a0logos\u00a0field containing links to normal, small, and tiny images.\n\u00a0{\n   \"paymentMethods\":[\n      {\n         \"brandCode\":\"paypal\",\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/paypal.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/paypal_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/paypal_tiny.png\"\n         },\n         \"name\":\"PayPal\"\n      },\n      {\n         \"brandCode\":\"amex\",\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/amex.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/amex_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/amex_tiny.png\"\n         },\n         \"name\":\"American Express\"\n      },\n      {\n         \"brandCode\":\"ideal\",\n         \"issuers\":[\n            {\n               \"issuerId\":\"1121\",\n               \"name\":\"Test Issuer\"\n            },\n            {\n               \"issuerId\":\"1154\",\n               \"name\":\"Test Issuer 5\"\n            }\n         ],\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/ideal.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/ideal_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/ideal_tiny.png\"\n         },\n         \"name\":\"iDEAL\"\n      },\n      {\n         \"brandCode\":\"mc\",\n         \"logos\":{\n            \"normal\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/mc.png\",\n            \"small\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/mc_small.png\",\n            \"tiny\":\"http:\\\/\\\/test\\\/hpp\\\/img\\\/pm\\\/mc_tiny.png\"\n         },\n         \"name\":\"MasterCard\"\n      }\n   ]\n}\nStep 3: Submit a payment request\nAfter your shopper selects the local payment method, make a POST request including the brandCode and issuerId (if available) of the selected payment method.\u2028\u2028 Recalculate the signature of your payment request with the brandCode and issuerId as extra fields and post the request to the\u00a0skipDetails.shtml\u00a0endpoint. Your shopper is then redirected to the selected local method to finalize the\u00a0payment.\u2028\u2028\u2028\n\nSome payment methods restrict WebView in the app for security reasons. We recommend using the following if you want to display local payment method in your app:\n\n\u00a0iOS: SFSafariViewController (https:\/\/developer.apple.com\/documentation\/safariservices\/sfsafariviewcontroller)\n\u00a0Android: Chrome Custom Tabs (https:\/\/developer.chrome.com\/multidevice\/android\/customtabs)\n\n\nThe\u00a0HTML code below is an example form.\n&lt;html&gt;\n   &lt;body&gt;\n      &lt;form method=\"post\" action=\"https:\/\/test.adyen.com\/hpp\/skipDetails.shtml\" id=\"adyenForm\" name=\"adyenForm\" target=\"_parent\"&gt;\n         &lt;input type=\"hidden\" name=\"merchantSig\" value=\"3iWDU\/V5RMtdaiZC4YRIpoX9\/v0=\" \/&gt;\n         &lt;input type=\"hidden\" name=\"sessionValidity\" value=\"2016-10-11T10:30:00Z\" \/&gt;\n         &lt;input type=\"hidden\" name=\"shopperLocale\" value=\"en_GB\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantAccount\" value=\"YOUR_MERCHANT_ACCOUNT\" \/&gt;\n         &lt;input type=\"hidden\" name=\"paymentAmount\" value=\"10000\" \/&gt;\n         &lt;input type=\"hidden\" name=\"currencyCode\" value=\"GBP\" \/&gt;\n         &lt;input type=\"hidden\" name=\"skinCode\" value=\"4aD37dJA\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantReference\" value=\"Internet order 12345\" \/&gt;\n         &lt;input type=\"hidden\" name=\"brandCode\" value=\"ideal\" \/&gt;\n         &lt;input type=\"hidden\" name=\"issuerId\" value=\"1121\" \/&gt;\n         &lt;input type=\"submit\" value=\"Send\" \/&gt;\n         &lt;input type=\"reset\" \/&gt;\n      &lt;\/form&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;\nStep 4: Payment response\nAfter shoppers have completed the payment,\u00a0they are redirected to a result page\u00a0of your choice. You can set a custom result URL in the Customer Area on the skin configuration page. Another option is to include the result URL in the\u00a0resURL\u00a0field in the payment request.\u2028\u2028\nAdyen appends parameters to this result URL to inform you about the payment status. If the status is already determined (either authorised or refused), you can use this information to\u00a0display a payment successful or payment failed page. In a case when the current status is\u00a0pending, use\u00a0payment webhook event\u00a0to get the outcome of a payment request and store this result in your back office, if necessary.\nAn example of a redirect URL to a result page:\nhttp:\/\/yourSite.com\/pRes.jsp\nAn example of a corresponding\u00a0resultURL:\nhttp:\/\/yourSite.com\/pRes.jsp?merchantReference=Internet%20order%2012345&amp;skinCode=4aD37dJA&amp;shopperLocale=en_GB&amp;authResult=AUTHORISED&amp;pspReference=1211992213193029&amp;merchantSig=CPb2cObMxmIIE0khO8WhEYyKDJs%3D\n\n&lt;!-- Appended URL parameters:\n* merchantReference = Internet order 12345\n* skinCode = 4aD37dJA\n* shopperLocale = en_GB\n* authResult = AUTHORISED\n* pspReference = 1211992213193029\n* merchantSig = CPb2cObMxmIIE0khO8WhEYyKDJs%3D\n --&gt;\nTo ensure that the response is not tampered with validate the response by calculating the signature of the returned fields, except the merchantSig field. Adyen uses your secret HMAC key to sign the data, so the calculated signature should be the same as the\u00a0merchantSig\u00a0included in the response.\u2028\u2028\nSkip Hosted Payment Pages (HPP)\nIf you want, you can skip displaying the payment method selection page with the list of available payment methods returned by the directory lookup. You can route your shopper directly to the payment or order detail entry page.\nTo use this payment flow:\n\nMake a payment request call to\u00a0skipDetails.shtml.\nIn the call, include the\u00a0brandCode\u00a0and\u00a0issuerId\u00a0parameters.\n\nFor more information on Skins and Hosted Payment Pages, see\u00a0Skin.\nRequest\n&lt;html&gt;\n   &lt;body&gt;\n      &lt;form method=\"post\" action=\"https:\/\/test.adyen.com\/hpp\/skipDetails.shtml\" id=\"adyenForm\" name=\"adyenForm\" target=\"_parent\"&gt;\n         &lt;input type=\"hidden\" name=\"merchantSig\" value=\"3iWDU\/V5RMtdaiZC4YRIpoX9\/v0=\" \/&gt;\n         &lt;input type=\"hidden\" name=\"sessionValidity\" value=\"2016-10-11T10:30:00Z\" \/&gt;\n         &lt;input type=\"hidden\" name=\"shopperLocale\" value=\"en_GB\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantAccount\" value=\"YOUR_MERCHANT_ACCOUNT\" \/&gt;\n         &lt;input type=\"hidden\" name=\"paymentAmount\" value=\"10000\" \/&gt;\n         &lt;input type=\"hidden\" name=\"currencyCode\" value=\"GBP\" \/&gt;\n         &lt;input type=\"hidden\" name=\"skinCode\" value=\"4aD37dJA\" \/&gt;\n         &lt;input type=\"hidden\" name=\"merchantReference\" value=\"Internet order 12345\" \/&gt;\n         &lt;input type=\"hidden\" name=\"brandCode\" value=\"ideal\" \/&gt;\n         &lt;input type=\"hidden\" name=\"issuerId\" value=\"1121\" \/&gt;\n         &lt;input type=\"submit\" value=\"Send\" \/&gt;\n         &lt;input type=\"reset\" \/&gt;\n      &lt;\/form&gt;\n   &lt;\/body&gt;\n&lt;\/html&gt;\n\nFields for this call vary per payment method.\n","type":"page","locale":"pt","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Classic integrations for Ecommerce","lvl3":"Hosted Payment Pages","lvl4":"Directory Lookup"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations","lvl3":"https:\/\/docs.adyen.com\/pt\/online-payments\/classic-integrations\/hosted-payment-pages","lvl4":"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\/directory-lookup"},"levels":5,"category":"Online Payments","category_color":"green","tags":["Directory","Lookup"]},"articleFiles":{"DL-flow.png":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/02.online-payments\/60.classic-integrations\/04.hosted-payment-pages\/02.directory-lookup\/DL-flow.png\" \/>"}}
