{"title":"Afterpay Drop-in integration","category":"default","creationDate":1776961628,"content":"<p>This page explains how to add Afterpay to your existing iOS Drop-in integration.<\/p>\n<h2>Requirements<\/h2>\n<p>Select the <a href=\"\/pt\/online-payments\/build-your-integration\">server-side flow<\/a> that your integration uses:<\/p>\n\n<div id=\"tabaRney\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Sessions flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built a Sessions flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=iOS&amp;amp;integration=Drop-in\\&quot;&gt;iOS Drop-in integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add Afterpay in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;sessions-requirements_1&quot;,&quot;relation&quot;:&quot;sessions&quot;},{&quot;title&quot;:&quot;Advanced flow&quot;,&quot;content&quot;:&quot;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Requirement&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: left;\\&quot;&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Integration type&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Make sure that you have built an Advanced flow &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/advanced-flow?platform=iOS&amp;amp;integration=Drop-in\\&quot;&gt;iOS Drop-in integration&lt;\\\/a&gt;. &lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;&lt;strong&gt;Setup steps&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: left;\\&quot;&gt;Before you begin, &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/add-payment-methods\\&quot;&gt;add Afterpay in your Customer Area&lt;\\\/a&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;advanced-requirements_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>API reference<\/h2>\n<p>Select which endpoint you are using:<\/p>\n\n<div id=\"tabnkHgE\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;&lt;code&gt;\\\/sessions&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;This is the default with &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=iOS&amp;amp;integration=Drop-in\\&quot;&gt;Drop-in v5.0.0&lt;\\\/a&gt; or later.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Parameter name&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: center;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-shopperName\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperName&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s full name.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-shopperEmail\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperEmail&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s email address.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/#\\\/CheckoutService\\\/latest\\\/post\\\/sessions__reqParam_shopperReference\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperReference&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;A unique reference to identify the shopper. Minimum length: three characters.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/#\\\/CheckoutService\\\/latest\\\/post\\\/sessions__reqParam_countryCode\\&quot; class=\\&quot;codeLabel external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;countryCode&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s country\\\/region.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-billingAddress\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;billingAddress&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The postal address to be included on the invoice.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-deliveryAddress\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;deliveryAddress&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The postal address where the goods will be shipped.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-lineItems\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;lineItems&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Price and product information about the purchased items. \\u00a0&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-telephoneNumber\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;telephoneNumber&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s telephone number, if provided.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;afterpayclearpay-web-sessions&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v69\\\\\\\/sessions \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;value\\\\&amp;quot;:1000,\\\\n     \\\\&amp;quot;currency\\\\&amp;quot;:\\\\&amp;quot;AUD\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;firstName\\\\&amp;quot;:\\\\&amp;quot;\\\\&amp;quot;,\\\\n     \\\\&amp;quot;lastName\\\\&amp;quot;:\\\\&amp;quot;\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot;:\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;:\\\\&amp;quot;\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;:\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;:\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;:\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;:\\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot;:\\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n     \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;AU\\\\&amp;quot;,\\\\n     \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;123\\\\&amp;quot;,\\\\n     \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;2000\\\\&amp;quot;,\\\\n     \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n     \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n     \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;AU\\\\&amp;quot;,\\\\n     \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;123\\\\&amp;quot;,\\\\n     \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;2000\\\\&amp;quot;,\\\\n     \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n     \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;:[\\\\n     {\\\\n        \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;:\\\\&amp;quot;400\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n     },\\\\n     {\\\\n        \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;2\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;:\\\\&amp;quot;300\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n     }\\\\n  ]\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;java&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Java&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Java API Library v39.3.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, also include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nLineItem lineItem1 = new LineItem()\\\\n  .quantity(1L)\\\\n  .amountExcludingTax(331L)\\\\n  .description(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n  .id(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n  .amountIncludingTax(400L)\\\\n  .taxAmount(69L);\\\\n\\\\nLineItem lineItem2 = new LineItem()\\\\n  .quantity(2L)\\\\n  .amountExcludingTax(248L)\\\\n  .description(\\\\&amp;quot;Socks\\\\&amp;quot;)\\\\n  .id(\\\\&amp;quot;Item #2\\\\&amp;quot;)\\\\n  .amountIncludingTax(300L)\\\\n  .taxAmount(52L);\\\\n\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;AUD\\\\&amp;quot;)\\\\n  .value(1000L);\\\\n\\\\nName name = new Name()\\\\n  .firstName(\\\\&amp;quot;\\\\&amp;quot;)\\\\n  .lastName(\\\\&amp;quot;\\\\&amp;quot;);\\\\n\\\\nDeliveryAddress deliveryAddress = new DeliveryAddress()\\\\n  .country(\\\\&amp;quot;AU\\\\&amp;quot;)\\\\n  .stateOrProvince(\\\\&amp;quot;NSW\\\\&amp;quot;)\\\\n  .city(\\\\&amp;quot;Sydney\\\\&amp;quot;)\\\\n  .houseNumberOrName(\\\\&amp;quot;123\\\\&amp;quot;)\\\\n  .street(\\\\&amp;quot;Happy Street\\\\&amp;quot;)\\\\n  .postalCode(\\\\&amp;quot;2000\\\\&amp;quot;);\\\\n\\\\nBillingAddress billingAddress = new BillingAddress()\\\\n  .country(\\\\&amp;quot;AU\\\\&amp;quot;)\\\\n  .stateOrProvince(\\\\&amp;quot;NSW\\\\&amp;quot;)\\\\n  .city(\\\\&amp;quot;Sydney\\\\&amp;quot;)\\\\n  .houseNumberOrName(\\\\&amp;quot;123\\\\&amp;quot;)\\\\n  .street(\\\\&amp;quot;Happy Street\\\\&amp;quot;)\\\\n  .postalCode(\\\\&amp;quot;2000\\\\&amp;quot;);\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\\\n  .amount(amount)\\\\n  .shopperName(name)\\\\n  .telephoneNumber(\\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;)\\\\n  .merchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .deliveryAddress(deliveryAddress)\\\\n  .countryCode(\\\\&amp;quot;AU\\\\&amp;quot;)\\\\n  .shopperEmail(\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;)\\\\n  .billingAddress(billingAddress)\\\\n  .returnUrl(\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;)\\\\n  .shopperReference(\\\\&amp;quot;\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nPaymentsApi service = new PaymentsApi(client);\\\\nCreateCheckoutSessionResponse response = service.sessions(createCheckoutSessionRequest, new RequestOptions().idempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;));&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;PHP&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;&amp;lt;?php\\\\n\\\\\\\/\\\\\\\/ Adyen PHP API Library v28.2.0\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\LineItem;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Name;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\DeliveryAddress;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\BillingAddress;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CreateCheckoutSessionRequest;\\\\nuse Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi;\\\\n\\\\n$client = new Client();\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\n$client-&amp;gt;setEnvironment(Environment::TEST);\\\\n\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\n$lineItem1 = new LineItem();\\\\n$lineItem1\\\\n  -&amp;gt;setQuantity(1)\\\\n  -&amp;gt;setAmountExcludingTax(331)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n  -&amp;gt;setId(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountIncludingTax(400)\\\\n  -&amp;gt;setTaxAmount(69);\\\\n\\\\n$lineItem2 = new LineItem();\\\\n$lineItem2\\\\n  -&amp;gt;setQuantity(2)\\\\n  -&amp;gt;setAmountExcludingTax(248)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Socks\\\\&amp;quot;)\\\\n  -&amp;gt;setId(\\\\&amp;quot;Item #2\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountIncludingTax(300)\\\\n  -&amp;gt;setTaxAmount(52);\\\\n\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;AUD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(1000);\\\\n\\\\n$name = new Name();\\\\n$name\\\\n  -&amp;gt;setFirstName(\\\\&amp;quot;\\\\&amp;quot;)\\\\n  -&amp;gt;setLastName(\\\\&amp;quot;\\\\&amp;quot;);\\\\n\\\\n$deliveryAddress = new DeliveryAddress();\\\\n$deliveryAddress\\\\n  -&amp;gt;setCountry(\\\\&amp;quot;AU\\\\&amp;quot;)\\\\n  -&amp;gt;setStateOrProvince(\\\\&amp;quot;NSW\\\\&amp;quot;)\\\\n  -&amp;gt;setCity(\\\\&amp;quot;Sydney\\\\&amp;quot;)\\\\n  -&amp;gt;setHouseNumberOrName(\\\\&amp;quot;123\\\\&amp;quot;)\\\\n  -&amp;gt;setStreet(\\\\&amp;quot;Happy Street\\\\&amp;quot;)\\\\n  -&amp;gt;setPostalCode(\\\\&amp;quot;2000\\\\&amp;quot;);\\\\n\\\\n$billingAddress = new BillingAddress();\\\\n$billingAddress\\\\n  -&amp;gt;setCountry(\\\\&amp;quot;AU\\\\&amp;quot;)\\\\n  -&amp;gt;setStateOrProvince(\\\\&amp;quot;NSW\\\\&amp;quot;)\\\\n  -&amp;gt;setCity(\\\\&amp;quot;Sydney\\\\&amp;quot;)\\\\n  -&amp;gt;setHouseNumberOrName(\\\\&amp;quot;123\\\\&amp;quot;)\\\\n  -&amp;gt;setStreet(\\\\&amp;quot;Happy Street\\\\&amp;quot;)\\\\n  -&amp;gt;setPostalCode(\\\\&amp;quot;2000\\\\&amp;quot;);\\\\n\\\\n$createCheckoutSessionRequest = new CreateCheckoutSessionRequest();\\\\n$createCheckoutSessionRequest\\\\n  -&amp;gt;setReference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  -&amp;gt;setLineItems(array($lineItem1, $lineItem2))\\\\n  -&amp;gt;setAmount($amount)\\\\n  -&amp;gt;setShopperName($name)\\\\n  -&amp;gt;setTelephoneNumber(\\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;)\\\\n  -&amp;gt;setMerchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setDeliveryAddress($deliveryAddress)\\\\n  -&amp;gt;setCountryCode(\\\\&amp;quot;AU\\\\&amp;quot;)\\\\n  -&amp;gt;setShopperEmail(\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;)\\\\n  -&amp;gt;setBillingAddress($billingAddress)\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;)\\\\n  -&amp;gt;setShopperReference(\\\\&amp;quot;\\\\&amp;quot;);\\\\n\\\\n$requestOptions[&#039;idempotencyKey&#039;] = &#039;UUID&#039;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\n$service = new PaymentsApi($client);\\\\n$response = $service-&amp;gt;sessions($createCheckoutSessionRequest, $requestOptions);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;cs&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;C#&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen .net API Library v32.1.1\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n    Environment = Environment.Test\\\\n};\\\\nvar client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nLineItem lineItem1 = new LineItem\\\\n{\\\\n  Quantity = 1,\\\\n  AmountExcludingTax = 331,\\\\n  Description = \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n  Id = \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n  AmountIncludingTax = 400,\\\\n  TaxAmount = 69\\\\n};\\\\n\\\\nLineItem lineItem2 = new LineItem\\\\n{\\\\n  Quantity = 2,\\\\n  AmountExcludingTax = 248,\\\\n  Description = \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n  Id = \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n  AmountIncludingTax = 300,\\\\n  TaxAmount = 52\\\\n};\\\\n\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;AUD\\\\&amp;quot;,\\\\n  Value = 1000\\\\n};\\\\n\\\\nName name = new Name\\\\n{\\\\n  FirstName = \\\\&amp;quot;\\\\&amp;quot;,\\\\n  LastName = \\\\&amp;quot;\\\\&amp;quot;\\\\n};\\\\n\\\\nDeliveryAddress deliveryAddress = new DeliveryAddress\\\\n{\\\\n  Country = \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  StateOrProvince = \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n  City = \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n  HouseNumberOrName = \\\\&amp;quot;123\\\\&amp;quot;,\\\\n  Street = \\\\&amp;quot;Happy Street\\\\&amp;quot;,\\\\n  PostalCode = \\\\&amp;quot;2000\\\\&amp;quot;\\\\n};\\\\n\\\\nBillingAddress billingAddress = new BillingAddress\\\\n{\\\\n  Country = \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  StateOrProvince = \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n  City = \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n  HouseNumberOrName = \\\\&amp;quot;123\\\\&amp;quot;,\\\\n  Street = \\\\&amp;quot;Happy Street\\\\&amp;quot;,\\\\n  PostalCode = \\\\&amp;quot;2000\\\\&amp;quot;\\\\n};\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest\\\\n{\\\\n  Reference = \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  LineItems = new List&amp;lt;LineItem&amp;gt;{ lineItem1, lineItem2 },\\\\n  Amount = amount,\\\\n  ShopperName = name,\\\\n  TelephoneNumber = \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  MerchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  DeliveryAddress = deliveryAddress,\\\\n  CountryCode = \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  ShopperEmail = \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  BillingAddress = billingAddress,\\\\n  ReturnUrl = \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  ShopperReference = \\\\&amp;quot;\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nvar service = new PaymentsService(client);\\\\nvar response = service.Sessions(createCheckoutSessionRequest, requestOptions: new RequestOptions { IdempotencyKey = \\\\&amp;quot;UUID\\\\&amp;quot;});&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v29.0.0\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nconst config = new Config({\\\\n  apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  environment: EnvironmentEnum.TEST\\\\n});\\\\n\\\\nconst client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst createCheckoutSessionRequest = {\\\\n  amount: {\\\\n    value: 1000,\\\\n    currency: \\\\&amp;quot;AUD\\\\&amp;quot;\\\\n  },\\\\n  shopperName: {\\\\n    firstName: \\\\&amp;quot;\\\\&amp;quot;,\\\\n    lastName: \\\\&amp;quot;\\\\&amp;quot;\\\\n  },\\\\n  shopperEmail: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  shopperReference: \\\\&amp;quot;\\\\&amp;quot;,\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  returnUrl: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  countryCode: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  telephoneNumber: \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  billingAddress: {\\\\n    city: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  deliveryAddress: {\\\\n    city: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  lineItems: [ {\\\\n    description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    quantity: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    amountIncludingTax: \\\\&amp;quot;400\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n  }, {\\\\n    description: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    quantity: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    amountIncludingTax: \\\\&amp;quot;300\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n  } ]\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;go&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Go&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Go API Library v21.0.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v21\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v21\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v21\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nclient := adyen.NewClient(&amp;amp;common.Config{\\\\n  ApiKey:      \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  Environment: common.TestEnv,\\\\n})\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nlineItem1 := checkout.LineItem{\\\\n  Quantity: common.PtrInt64(1),\\\\n  AmountExcludingTax: common.PtrInt64(331),\\\\n  Description: common.PtrString(\\\\&amp;quot;Shoes\\\\&amp;quot;),\\\\n  Id: common.PtrString(\\\\&amp;quot;Item #1\\\\&amp;quot;),\\\\n  AmountIncludingTax: common.PtrInt64(400),\\\\n  TaxAmount: common.PtrInt64(69),\\\\n}\\\\n\\\\nlineItem2 := checkout.LineItem{\\\\n  Quantity: common.PtrInt64(2),\\\\n  AmountExcludingTax: common.PtrInt64(248),\\\\n  Description: common.PtrString(\\\\&amp;quot;Socks\\\\&amp;quot;),\\\\n  Id: common.PtrString(\\\\&amp;quot;Item #2\\\\&amp;quot;),\\\\n  AmountIncludingTax: common.PtrInt64(300),\\\\n  TaxAmount: common.PtrInt64(52),\\\\n}\\\\n\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;AUD\\\\&amp;quot;,\\\\n  Value: 1000,\\\\n}\\\\n\\\\nname := checkout.Name{\\\\n  FirstName: \\\\&amp;quot;\\\\&amp;quot;,\\\\n  LastName: \\\\&amp;quot;\\\\&amp;quot;,\\\\n}\\\\n\\\\ndeliveryAddress := checkout.DeliveryAddress{\\\\n  Country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  StateOrProvince: common.PtrString(\\\\&amp;quot;NSW\\\\&amp;quot;),\\\\n  City: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n  HouseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n  Street: \\\\&amp;quot;Happy Street\\\\&amp;quot;,\\\\n  PostalCode: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n}\\\\n\\\\nbillingAddress := checkout.BillingAddress{\\\\n  Country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  StateOrProvince: common.PtrString(\\\\&amp;quot;NSW\\\\&amp;quot;),\\\\n  City: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n  HouseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n  Street: \\\\&amp;quot;Happy Street\\\\&amp;quot;,\\\\n  PostalCode: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n}\\\\n\\\\ncreateCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  LineItems: []checkout.LineItem{\\\\n      lineItem1, lineItem2,\\\\n  },\\\\n  Amount: amount,\\\\n  ShopperName: &amp;amp;name,\\\\n  TelephoneNumber: common.PtrString(\\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;),\\\\n  MerchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  DeliveryAddress: &amp;amp;deliveryAddress,\\\\n  CountryCode: common.PtrString(\\\\&amp;quot;AU\\\\&amp;quot;),\\\\n  ShopperEmail: common.PtrString(\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;),\\\\n  BillingAddress: &amp;amp;billingAddress,\\\\n  ReturnUrl: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  ShopperReference: common.PtrString(\\\\&amp;quot;\\\\&amp;quot;),\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nservice := client.Checkout()\\\\nreq := service.PaymentsApi.SessionsInput().IdempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;).CreateCheckoutSessionRequest(createCheckoutSessionRequest)\\\\nres, httpRes, err := service.PaymentsApi.Sessions(context.Background(), req)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;py&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Python&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Python API Library v13.6.0\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nadyen.client.platform = \\\\&amp;quot;test\\\\&amp;quot; # The environment to use library in.\\\\n\\\\n# Create the request object(s)\\\\njson_request = {\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 1000,\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;AUD\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;firstName\\\\&amp;quot;: \\\\&amp;quot;\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lastName\\\\&amp;quot;: \\\\&amp;quot;\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot;: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot;: \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: \\\\&amp;quot;400\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n  }, {\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: \\\\&amp;quot;300\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n  } ]\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.sessions(request=json_request, idempotency_key=\\\\&amp;quot;UUID\\\\&amp;quot;)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;rb&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Ruby&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Ruby API Library v10.4.0\\\\nrequire \\\\&amp;quot;adyen-ruby-api-library\\\\&amp;quot;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;ADYEN_API_KEY&#039;\\\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nadyen.env = :test # Set to \\\\&amp;quot;live\\\\&amp;quot; for live environment\\\\n\\\\n# Create the request object(s)\\\\nrequest_body = {\\\\n  :amount =&amp;gt; {\\\\n    :value =&amp;gt; 1000,\\\\n    :currency =&amp;gt; &#039;AUD&#039;\\\\n  },\\\\n  :shopperName =&amp;gt; {\\\\n    :firstName =&amp;gt; &#039;&#039;,\\\\n    :lastName =&amp;gt; &#039;&#039;\\\\n  },\\\\n  :shopperEmail =&amp;gt; &#039;s.hopper@example.com&#039;,\\\\n  :shopperReference =&amp;gt; &#039;&#039;,\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_REFERENCE&#039;,\\\\n  :merchantAccount =&amp;gt; &#039;YOUR_MERCHANT_ACCOUNT&#039;,\\\\n  :returnUrl =&amp;gt; &#039;my-app:\\\/\\\/adyen&#039;,\\\\n  :countryCode =&amp;gt; &#039;AU&#039;,\\\\n  :telephoneNumber =&amp;gt; &#039;+61 2 8520 3890&#039;,\\\\n  :billingAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;Sydney&#039;,\\\\n    :country =&amp;gt; &#039;AU&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;123&#039;,\\\\n    :postalCode =&amp;gt; &#039;2000&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;NSW&#039;,\\\\n    :street =&amp;gt; &#039;Happy Street&#039;\\\\n  },\\\\n  :deliveryAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;Sydney&#039;,\\\\n    :country =&amp;gt; &#039;AU&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;123&#039;,\\\\n    :postalCode =&amp;gt; &#039;2000&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;NSW&#039;,\\\\n    :street =&amp;gt; &#039;Happy Street&#039;\\\\n  },\\\\n  :lineItems =&amp;gt; [ {\\\\n    :description =&amp;gt; &#039;Shoes&#039;,\\\\n    :quantity =&amp;gt; &#039;1&#039;,\\\\n    :amountIncludingTax =&amp;gt; &#039;400&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;331&#039;,\\\\n    :taxAmount =&amp;gt; &#039;69&#039;,\\\\n    :id =&amp;gt; &#039;Item #1&#039;\\\\n  }, {\\\\n    :description =&amp;gt; &#039;Socks&#039;,\\\\n    :quantity =&amp;gt; &#039;2&#039;,\\\\n    :amountIncludingTax =&amp;gt; &#039;300&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;248&#039;,\\\\n    :taxAmount =&amp;gt; &#039;52&#039;,\\\\n    :id =&amp;gt; &#039;Item #2&#039;\\\\n  } ]\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.sessions(request_body, headers: { &#039;Idempotency-Key&#039; =&amp;gt; &#039;UUID&#039; })&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;ts&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (TypeScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v29.0.0\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nconst config = new Config({\\\\n  apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  environment: EnvironmentEnum.TEST\\\\n});\\\\n\\\\nconst client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst lineItem1: Types.checkout.LineItem = {\\\\n  quantity: 1,\\\\n  amountExcludingTax: 331,\\\\n  description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n  id: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n  amountIncludingTax: 400,\\\\n  taxAmount: 69\\\\n};\\\\n\\\\nconst lineItem2: Types.checkout.LineItem = {\\\\n  quantity: 2,\\\\n  amountExcludingTax: 248,\\\\n  description: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n  id: \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n  amountIncludingTax: 300,\\\\n  taxAmount: 52\\\\n};\\\\n\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;AUD\\\\&amp;quot;,\\\\n  value: 1000\\\\n};\\\\n\\\\nconst name: Types.checkout.Name = {\\\\n  firstName: \\\\&amp;quot;\\\\&amp;quot;,\\\\n  lastName: \\\\&amp;quot;\\\\&amp;quot;\\\\n};\\\\n\\\\nconst deliveryAddress: Types.checkout.DeliveryAddress = {\\\\n  country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  stateOrProvince: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n  city: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n  houseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n  street: \\\\&amp;quot;Happy Street\\\\&amp;quot;,\\\\n  postalCode: \\\\&amp;quot;2000\\\\&amp;quot;\\\\n};\\\\n\\\\nconst billingAddress: Types.checkout.BillingAddress = {\\\\n  country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  stateOrProvince: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n  city: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n  houseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n  street: \\\\&amp;quot;Happy Street\\\\&amp;quot;,\\\\n  postalCode: \\\\&amp;quot;2000\\\\&amp;quot;\\\\n};\\\\n\\\\nconst createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  lineItems: [lineItem1, lineItem2],\\\\n  amount: amount,\\\\n  shopperName: name,\\\\n  telephoneNumber: \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  deliveryAddress: deliveryAddress,\\\\n  countryCode: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  shopperEmail: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  billingAddress: billingAddress,\\\\n  returnUrl: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  shopperReference: \\\\&amp;quot;\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;sessions-api_1&quot;,&quot;relation&quot;:&quot;sessions&quot;},{&quot;title&quot;:&quot;&lt;code&gt;\\\/payments&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;If you implemented an &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\&quot;&gt;additional use case&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Parameter name&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: center;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-shopperName\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperName&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s full name.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-shopperEmail\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperEmail&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s email address.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-shopperReference\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperReference&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;A unique reference to identify the shopper. Minimum length: three characters.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-countryCode\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;countryCode&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s country\\\/region.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-billingAddress\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;billingAddress&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The postal address to be included on the invoice.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-deliveryAddress\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;deliveryAddress&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The postal address where the goods will be shipped.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-lineItems\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;lineItems&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Price and product information about the purchased items.\\u00a0&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-telephoneNumber\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;telephoneNumber&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s telephone number, if provided.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;afterpayclearpay-web-payments&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v68\\\\\\\/payments \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;type\\\\&amp;quot;:\\\\&amp;quot;afterpay\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;value\\\\&amp;quot;:1000,\\\\n     \\\\&amp;quot;currency\\\\&amp;quot;:\\\\&amp;quot;AUD\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;firstName\\\\&amp;quot;:\\\\&amp;quot;\\\\&amp;quot;,\\\\n     \\\\&amp;quot;lastName\\\\&amp;quot;:\\\\&amp;quot;\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot;:\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;:\\\\&amp;quot;\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;:\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;:\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;:\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;:\\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot;:\\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n     \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;AU\\\\&amp;quot;,\\\\n     \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;123\\\\&amp;quot;,\\\\n     \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;2000\\\\&amp;quot;,\\\\n     \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n     \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;:{\\\\n     \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n     \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;AU\\\\&amp;quot;,\\\\n     \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;123\\\\&amp;quot;,\\\\n     \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;2000\\\\&amp;quot;,\\\\n     \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n     \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;:[\\\\n     {\\\\n        \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;:\\\\&amp;quot;400\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n     },\\\\n     {\\\\n        \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;2\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;:\\\\&amp;quot;300\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n     }\\\\n  ]\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;java&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Java&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Set ADYEN_API_KEY with the API key from the Customer Area.\\\\n\\\\\\\/\\\\\\\/ Change to Environment.LIVE and add the Live URL prefix when you are ready to accept live payments.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n    Checkout checkout = new Checkout(client);\\\\n\\\\n    PaymentsRequest paymentsRequest = new PaymentsRequest();\\\\n\\\\n    String merchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;;\\\\n    paymentsRequest.setMerchantAccount(merchantAccount);\\\\n\\\\n    Amount amount = new Amount();\\\\n    amount.setCurrency(\\\\&amp;quot;AUD\\\\&amp;quot;);\\\\n    amount.setValue(1000L);\\\\n    paymentsRequest.setAmount(amount);\\\\n\\\\n    DefaultPaymentMethodDetails paymentMethodDetails = new DefaultPaymentMethodDetails();\\\\n    paymentMethodDetails.setType(\\\\&amp;quot;afterpay\\\\&amp;quot;);\\\\n    paymentsRequest.setPaymentMethod(paymentMethodDetails);\\\\n\\\\n    paymentsRequest.setReference(\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;);\\\\n    paymentsRequest.setReturnUrl(\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;);\\\\n\\\\n    Name shopperDetails = new Name();\\\\n    shopperDetails.setFirstName(\\\\&amp;quot;\\\\&amp;quot;);\\\\n    shopperDetails.setLastName(\\\\&amp;quot;\\\\&amp;quot;);\\\\n\\\\n    paymentsRequest.setShopperName(shopperDetails);\\\\n    paymentsRequest.setShopperReference(\\\\&amp;quot;\\\\&amp;quot;);\\\\n    paymentsRequest.setCountryCode(\\\\&amp;quot;AU\\\\&amp;quot;);\\\\n    paymentsRequest.setTelephoneNumber(\\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;);\\\\n    paymentsRequest.setShopperEmail(\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;);\\\\n\\\\n\\\\n    BillingAddress billingAddress = new BillingAddress();\\\\n    billingAddress.setCountry(\\\\&amp;quot;AU\\\\&amp;quot;);\\\\n    billingAddress.setCity(\\\\&amp;quot;Sydney\\\\&amp;quot;);\\\\n    billingAddress.setHouseNumberOrName(\\\\&amp;quot;123\\\\&amp;quot;);\\\\n    billingAddress.setStreet(\\\\&amp;quot;Happy Street\\\\&amp;quot;);\\\\n    billingAddress.setPostalCode(\\\\&amp;quot;2000\\\\&amp;quot;);\\\\n    billingAddress.setStateOrProvince(\\\\&amp;quot;NSW\\\\&amp;quot;);\\\\n\\\\n    paymentsRequest.setBillingAddress(billingAddress);\\\\n\\\\n    DeliveryAddress deliveryAddress = new DeliveryAddress();\\\\n    deliveryAddress.setCountry(\\\\&amp;quot;AU\\\\&amp;quot;);\\\\n    deliveryAddress.setCity(\\\\&amp;quot;Sydney\\\\&amp;quot;);\\\\n    deliveryAddress.setHouseNumberOrName(\\\\&amp;quot;123\\\\&amp;quot;);\\\\n    deliveryAddress.setStreet(\\\\&amp;quot;Happy Street\\\\&amp;quot;);\\\\n    deliveryAddress.setPostalCode(\\\\&amp;quot;2000\\\\&amp;quot;);\\\\n    deliveryAddress.setStateOrProvince(\\\\&amp;quot;NSW\\\\&amp;quot;);\\\\n\\\\n    paymentsRequest.setDeliveryAddress(deliveryAddress);\\\\n\\\\n    List&amp;lt;LineItem&amp;gt; lineItems = new ArrayList&amp;lt;&amp;gt;();\\\\n    lineItems.add(\\\\n        new LineItem()\\\\n            .quantity(1L)\\\\n            .description(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n            .id(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n            .amountIncludingTax(400L)\\\\n            .amountExcludingTax(331L)\\\\n            .taxAmount(69L)\\\\n    );\\\\n    lineItems.add(\\\\n        new LineItem()\\\\n            .quantity(2L)\\\\n            .description(\\\\&amp;quot;Socks\\\\&amp;quot;)\\\\n            .id(\\\\&amp;quot;Item #2\\\\&amp;quot;)\\\\n            .amountIncludingTax(300L)\\\\n            .amountExcludingTax(248L)\\\\n            .taxAmount(52L)\\\\n    );\\\\n\\\\n    paymentsRequest.setLineItems(lineItems);\\\\n\\\\n    PaymentsResponse paymentsResponse = checkout.payments(paymentsRequest);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;PHP&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Set your X-API-KEY with the API key from the Customer Area.\\\\n$client = new \\\\\\\\Adyen\\\\\\\\Client();\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n$service = new \\\\\\\\Adyen\\\\\\\\Service\\\\\\\\Checkout($client);\\\\n\\\\n$params = [\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  \\\\&amp;quot;amount\\\\&amp;quot; =&amp;gt; [\\\\n    \\\\&amp;quot;currency\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;AUD\\\\&amp;quot;,\\\\n    \\\\&amp;quot;value\\\\&amp;quot; =&amp;gt; 1000\\\\n  ],\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot; =&amp;gt; [\\\\n    \\\\&amp;quot;type\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;afterpay\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot; =&amp;gt; [\\\\n       \\\\&amp;quot;firstName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;\\\\&amp;quot;,\\\\n       \\\\&amp;quot;lastName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;\\\\&amp;quot;,\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot; =&amp;gt; [\\\\n       \\\\&amp;quot;city\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n       \\\\&amp;quot;country\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n       \\\\&amp;quot;houseNumberOrName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;123\\\\&amp;quot;,\\\\n       \\\\&amp;quot;postalCode\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n       \\\\&amp;quot;stateOrProvince\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n       \\\\&amp;quot;street\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot; =&amp;gt; [\\\\n       \\\\&amp;quot;city\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n       \\\\&amp;quot;country\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n       \\\\&amp;quot;houseNumberOrName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;123\\\\&amp;quot;,\\\\n       \\\\&amp;quot;postalCode\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n       \\\\&amp;quot;stateOrProvince\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n       \\\\&amp;quot;street\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot; =&amp;gt; [\\\\n     [\\\\n        \\\\&amp;quot;description\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;400\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;331\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;69\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n     ],\\\\n     [\\\\n        \\\\&amp;quot;description\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;2\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountIncludingTax\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;300\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;248\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;52\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n     ]\\\\n    ]\\\\n];\\\\n$result = $service-&amp;gt;payments($params);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;cs&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;C#&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Set your X-API-KEY with the API key from the Customer Area.\\\\nvar client = new Client (\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.Test);\\\\nvar checkout = new Checkout(client);\\\\n\\\\nvar paymentsRequest = new Adyen.Model.Checkout.PaymentRequest\\\\n{\\\\n   MerchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n   Reference = \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n   PaymentMethod = new DefaultPaymentMethodDetails { Type = \\\\&amp;quot;afterpay\\\\&amp;quot; },\\\\n   Amount = new Adyen.Model.Checkout.Amount(currency: \\\\&amp;quot;AUD\\\\&amp;quot;, value: 1000),\\\\n   CountryCode = \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n   TelephoneNumber = \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n   ShopperEmail = \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n   ShopperName = new Adyen.Model.Checkout.Name\\\\n   {\\\\n       FirstName = \\\\&amp;quot;\\\\&amp;quot;,\\\\n       LastName = \\\\&amp;quot;\\\\&amp;quot;\\\\n   },\\\\n   ShopperReference = \\\\&amp;quot;\\\\&amp;quot;,\\\\n   BillingAddress = new Adyen.Model.Checkout.Address\\\\n   {\\\\n       City = \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n       Country = \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n       HouseNumberOrName = \\\\&amp;quot;123\\\\&amp;quot;,\\\\n       PostalCode = \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n       StateOrProvince = \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n       Street = \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n   },\\\\n   DeliveryAddress = new Adyen.Model.Checkout.Address\\\\n   {\\\\n       City = \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n       Country = \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n       HouseNumberOrName = \\\\&amp;quot;123\\\\&amp;quot;,\\\\n       PostalCode = \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n       StateOrProvince = \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n       Street = \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n   },\\\\n   ReturnUrl = \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n   LineItems = new List&amp;lt;LineItem&amp;gt;\\\\n   {\\\\n     new LineItem(quantity:1, description: \\\\&amp;quot;Shoes\\\\&amp;quot;, id: \\\\&amp;quot;Item #1\\\\&amp;quot;, amountIncludingTax: 400, amountExcludingTax: 331, taxAmount: 69),\\\\n     new LineItem(quantity:2, description: \\\\&amp;quot;Socks\\\\&amp;quot;, id: \\\\&amp;quot;Item #2\\\\&amp;quot;, amountIncludingTax: 300, amountExcludingTax: 248, taxAmount: 52)\\\\n   }\\\\n};&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v16.1.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\nconst client = new Client({apiKey: \\\\&amp;quot;YOUR_X_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object\\\\nconst paymentRequest = {\\\\n  paymentMethod: {\\\\n    type: \\\\&amp;quot;afterpay\\\\&amp;quot;\\\\n  },\\\\n  amount: {\\\\n    value: 1000,\\\\n    currency: \\\\&amp;quot;AUD\\\\&amp;quot;\\\\n  },\\\\n  shopperName: {\\\\n    firstName: \\\\&amp;quot;\\\\&amp;quot;,\\\\n    lastName: \\\\&amp;quot;\\\\&amp;quot;\\\\n  },\\\\n  shopperEmail: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  shopperReference: \\\\&amp;quot;\\\\&amp;quot;,\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  returnUrl: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  countryCode: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  telephoneNumber: \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  billingAddress: {\\\\n    city: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  deliveryAddress: {\\\\n    city: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  lineItems: [ {\\\\n    description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    quantity: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    amountIncludingTax: \\\\&amp;quot;400\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n  }, {\\\\n    description: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    quantity: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    amountIncludingTax: \\\\&amp;quot;300\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n  } ]\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Make the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;py&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Python&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Python API Library v12.0.0\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;YOUR_X_API_KEY\\\\&amp;quot;\\\\nadyen.client.platform = \\\\&amp;quot;test\\\\&amp;quot; # The environment to use library in.\\\\n\\\\njson_request = {\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;afterpay\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 1000,\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;AUD\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;firstName\\\\&amp;quot;: \\\\&amp;quot;\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lastName\\\\&amp;quot;: \\\\&amp;quot;\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot;: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot;: \\\\&amp;quot;+61 2 8520 3890\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;Sydney\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;AU\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;123\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;2000\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;NSW\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Happy Street\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: \\\\&amp;quot;400\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #1\\\\&amp;quot;\\\\n  }, {\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountIncludingTax\\\\&amp;quot;: \\\\&amp;quot;300\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #2\\\\&amp;quot;\\\\n  } ]\\\\n}\\\\n\\\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\\\&amp;quot;UUID\\\\&amp;quot;)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;rb&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Ruby&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Ruby API Library v9.1.0\\\\nrequire \\\\&amp;quot;adyen-ruby-api-library\\\\&amp;quot;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;YOUR_X_API_KEY&#039;\\\\nadyen.env = :test # Set to \\\\&amp;quot;live\\\\&amp;quot; for live environment\\\\n\\\\nrequest_body = {\\\\n  :paymentMethod =&amp;gt; {\\\\n    :type =&amp;gt; &#039;afterpay&#039;\\\\n  },\\\\n  :amount =&amp;gt; {\\\\n    :value =&amp;gt; 1000,\\\\n    :currency =&amp;gt; &#039;AUD&#039;\\\\n  },\\\\n  :shopperName =&amp;gt; {\\\\n    :firstName =&amp;gt; &#039;&#039;,\\\\n    :lastName =&amp;gt; &#039;&#039;\\\\n  },\\\\n  :shopperEmail =&amp;gt; &#039;s.hopper@example.com&#039;,\\\\n  :shopperReference =&amp;gt; &#039;&#039;,\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_REFERENCE&#039;,\\\\n  :merchantAccount =&amp;gt; &#039;YOUR_MERCHANT_ACCOUNT&#039;,\\\\n  :returnUrl =&amp;gt; &#039;my-app:\\\/\\\/adyen&#039;,\\\\n  :countryCode =&amp;gt; &#039;AU&#039;,\\\\n  :telephoneNumber =&amp;gt; &#039;+61 2 8520 3890&#039;,\\\\n  :billingAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;Sydney&#039;,\\\\n    :country =&amp;gt; &#039;AU&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;123&#039;,\\\\n    :postalCode =&amp;gt; &#039;2000&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;NSW&#039;,\\\\n    :street =&amp;gt; &#039;Happy Street&#039;\\\\n  },\\\\n  :deliveryAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;Sydney&#039;,\\\\n    :country =&amp;gt; &#039;AU&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;123&#039;,\\\\n    :postalCode =&amp;gt; &#039;2000&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;NSW&#039;,\\\\n    :street =&amp;gt; &#039;Happy Street&#039;\\\\n  },\\\\n  :lineItems =&amp;gt; [ {\\\\n    :description =&amp;gt; &#039;Shoes&#039;,\\\\n    :quantity =&amp;gt; &#039;1&#039;,\\\\n    :amountIncludingTax =&amp;gt; &#039;400&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;331&#039;,\\\\n    :taxAmount =&amp;gt; &#039;69&#039;,\\\\n    :id =&amp;gt; &#039;Item #1&#039;\\\\n  }, {\\\\n    :description =&amp;gt; &#039;Socks&#039;,\\\\n    :quantity =&amp;gt; &#039;2&#039;,\\\\n    :amountIncludingTax =&amp;gt; &#039;300&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;248&#039;,\\\\n    :taxAmount =&amp;gt; &#039;52&#039;,\\\\n    :id =&amp;gt; &#039;Item #2&#039;\\\\n  } ]\\\\n}\\\\n\\\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { &#039;Idempotency-Key&#039; =&amp;gt; &#039;UUID&#039; })&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;advanced-api_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Drop-in configuration<\/h2>\n\n<div id=\"tabMUTQB\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;v5.0.0 or later&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;There is no required Afterpay-specific integration for Drop-in.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;5&quot;,&quot;oldTabId&quot;:&quot;required-config-5_1&quot;,&quot;relation&quot;:&quot;5&quot;},{&quot;title&quot;:&quot;v4.x.x&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;There is no required Afterpay specific integration for Drop-in.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;4&quot;,&quot;oldTabId&quot;:&quot;required-config-4_2&quot;,&quot;relation&quot;:&quot;4&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Capture the payment<\/h2>\n<p>Depending on your merchant account configuration, Afterpay payments are captured automatically after authorisation, or manually captured. If you prefer to capture the payment after the goods have been sent, you need to set up a <a href=\"\/pt\/online-payments\/capture#delayed-automatic-capture\">capture delay<\/a> or use <a href=\"\/pt\/online-payments\/capture#capture-a-payment\">manual capture<\/a>. To partially capture a payment, you also need to use manual capture.<\/p>\n<p>Afterpay payments have to be captured within 13 days after authorisation.<\/p>\n<p>During authorisation, the shopper is charged for the first installment. If the payment is not captured within 13 days, before the second installment, Afterpay cancels the payment and refunds the first installment to the shopper.<\/p>\n<div class=\"notices blue\">\n<p>For testing purposes, Afterpay authorisations expire in one day. When you use manual capture, you need to capture test Afterpay payments within one day after authorisation.<\/p>\n<\/div>\n<h3 id=\"partial-captures\">Full or partial manual captures<\/h3>\n<p>When you use manual capture, in your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/captures<\/a> request specify:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures#request-amount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.value<\/a>: the full or partial amount that the shopper should pay.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>: (optional) price and product information for the items that the shopper should pay for.<\/li>\n<\/ul>\n<p>Any unclaimed amount that is left over after partially capturing a payment is automatically cancelled. When your account is enabled for <em>multiple<\/em> partial captures, the unclaimed amount after an initial capture is not automatically cancelled.<\/p>\n<div class=\"sc-notice info\"><div>\n<p>To set up multiple partial captures, contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a>. Multiple partial captures will create a new invoice for each capture.<\/p>\n<\/div><\/div>\n<h2>Refunds and cancellations<\/h2>\n<p>If a payment has not yet been captured, you can <a href=\"\/pt\/online-payments\/cancel\">cancel<\/a> it. If a payment has already been captured and you want to return the funds to the shopper, you need to <a href=\"\/pt\/online-payments\/refund\">refund<\/a> the payment.<\/p>\n<h3 id=\"partial-refunds\">Full or partial refunds<\/h3>\n<p>To fully or partially refund a payment, in your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/refunds<\/a> request specify:<\/p>\n<ul>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds#request-amount-value\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.value<\/a>: the full or partial amount to be refunded to the shopper.<\/li>\n<li> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>: (optional) price and product information about the refunded items.<\/li>\n<\/ul>\n<h2>Discounts<\/h2>\n<p>To offer discounts, your payment request must include the negative amount to be added to the original price. The following example shows how to specify a discount of 1 AUD on Item #2:<\/p>\n<pre><code class=\"language-json\">{\n  \"amount\":{\n     \"value\":800,\n     \"currency\":\"AUD\"\n  },\n  ...\n  \"lineItems\":[\n\n     {\n        \"description\":\"Test Afterpay 1\",\n        \"quantity\":\"1\",\n        \"amountIncludingTax\":\"400\",\n        \"id\":\"Item #1\"\n     },\n     {\n        \"description\":\"Test Afterpay 2\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"300\",\n        \"id\":\"Item #2\"\n     }\n\n     {\n        \"description\":\"Discount\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"-100\",\n        \"id\":\"Item #2 Discount\"\n     }\n  ]\n}<\/code><\/pre>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>To test Afterpay payments, you need a test shopper account in the Afterpay sandbox environment. If you are testing in multiple countries or regions, create a different test account for each.<\/p>\n<p>To create a test account:<\/p>\n<ol>\n<li>Go to <a href=\"https:\/\/portal.sandbox.afterpay.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/portal.sandbox.afterpay.com\/<\/a>.<\/li>\n<li>Enter a real email address and select <strong>Continue<\/strong>. You'll get confirmations of payments and refunds like any other shopper on this email address.<\/li>\n<li>From the drop-down menu, select the country\/region for which you want to create a test shopper account. Select <strong>Australia<\/strong>, <strong>New Zealand<\/strong>, <strong>US<\/strong>, or <strong>Canada<\/strong>.<\/li>\n<li>Enter a unique mobile number in the correct format and select <strong>Continue<\/strong>. Ensure the number is not associated with an existing account to avoid being redirected to a login page.<\/li>\n<li>When you are prompted to enter your SMS verification code, enter <strong>111111<\/strong>.<\/li>\n<li>Follow the instructions on your screen to complete your profile, accept the terms and conditions, and select <strong>Continue<\/strong>.<\/li>\n<\/ol>\n<p> <\/p>\n<p>To test payments, add a test card to your Afterpay test shopper account.<\/p>\n<p>You can use the card details provided in the <a href=\"https:\/\/developers.afterpay.com\/afterpay-online-developer\/home\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Afterpay developer documentation<\/a>, or use one of the Adyen <a href=\"\/pt\/development-resources\/test-cards-and-credentials\/test-card-numbers\">test cards<\/a>. Use CVV 000 to simulate authorised payments, or CVV 051 to simulate refused payments.<\/p>\n<p> <\/p>\n<p>You can check the status of test payments in your\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>Transactions<\/strong>\u00a0&gt;\u00a0<strong>Payments<\/strong>.<\/p>\n<p> <\/p>\n<p>Before you can accept live Afterpay payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for Afterpay<\/a> in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/build-your-integration\/sessions-flow?platform=iOS&amp;integration=Drop-in\"\n                        target=\"_self\"\n                        >\n                    iOS Drop-in integration guide\n                <\/a><\/li><li><a href=\"\/development-resources\/webhooks\"\n                        target=\"_self\"\n                        >\n                    Webhooks\n                <\/a><\/li><li><a href=\"https:\/\/docs.adyen.com\/api-explorer\/#\/CheckoutService\/latest\/overview\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    API Explorer\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/afterpaytouch\/ios-drop-in","articleFields":{"description":"Add Afterpay to anexisting iOS Drop-in integration.","parameters":{"payment_method":"Afterpay","payment_method_uk":"Clearpay","country_code":"AU","currency_code":"AUD","country_code_uk":"GB","currency_code_uk":"GBP","city":"Sydney","city_uk":"London","housenumberorname":123,"housenumberorname_uk":"8-10","postalcode":2000,"postalcode_uk":"SW1H 0BG","street":"Happy Street","street_uk":"Broadway","stateorprovince":"NSW","stateorprovince_uk":"Westminster","payment_method_type":"afterpay","payment_method_type_uk":"clearpay","shopper_email":"s.hopper@example.com","telephone_number":"+61 2 8520 3890","telephone_number_uk":"+44 203 936 4029","return_url":"my-app:\/\/adyen","integration":"Drop-in","platform":"iOS","integration_guide_url":"build-your-integration\/sessions-flow?platform=iOS&integration=Drop-in","component_name":"the Afterpay Component","component_js_const":"afterpay"}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/afterpaytouch\/ios-drop-in","title":"Afterpay Drop-in integration","content":"This page explains how to add Afterpay to your existing iOS Drop-in integration.\nRequirements\nSelect the server-side flow that your integration uses:\n\n\n    \n        \n        \n    \n\n\nAPI reference\nSelect which endpoint you are using:\n\n\n    \n        \n        \n    \n\n\nDrop-in configuration\n\n\n    \n        \n        \n    \n\n\nCapture the payment\nDepending on your merchant account configuration, Afterpay payments are captured automatically after authorisation, or manually captured. If you prefer to capture the payment after the goods have been sent, you need to set up a capture delay or use manual capture. To partially capture a payment, you also need to use manual capture.\nAfterpay payments have to be captured within 13 days after authorisation.\nDuring authorisation, the shopper is charged for the first installment. If the payment is not captured within 13 days, before the second installment, Afterpay cancels the payment and refunds the first installment to the shopper.\n\nFor testing purposes, Afterpay authorisations expire in one day. When you use manual capture, you need to capture test Afterpay payments within one day after authorisation.\n\nFull or partial manual captures\nWhen you use manual capture, in your  \/payments\/{paymentPspReference}\/captures request specify:\n\n amount.value: the full or partial amount that the shopper should pay.\n lineItems: (optional) price and product information for the items that the shopper should pay for.\n\nAny unclaimed amount that is left over after partially capturing a payment is automatically cancelled. When your account is enabled for multiple partial captures, the unclaimed amount after an initial capture is not automatically cancelled.\n\nTo set up multiple partial captures, contact our Support Team. Multiple partial captures will create a new invoice for each capture.\n\nRefunds and cancellations\nIf a payment has not yet been captured, you can cancel it. If a payment has already been captured and you want to return the funds to the shopper, you need to refund the payment.\nFull or partial refunds\nTo fully or partially refund a payment, in your  \/payments\/{paymentPspReference}\/refunds request specify:\n\n amount.value: the full or partial amount to be refunded to the shopper.\n lineItems: (optional) price and product information about the refunded items.\n\nDiscounts\nTo offer discounts, your payment request must include the negative amount to be added to the original price. The following example shows how to specify a discount of 1 AUD on Item #2:\n{\n  \"amount\":{\n     \"value\":800,\n     \"currency\":\"AUD\"\n  },\n  ...\n  \"lineItems\":[\n\n     {\n        \"description\":\"Test Afterpay 1\",\n        \"quantity\":\"1\",\n        \"amountIncludingTax\":\"400\",\n        \"id\":\"Item #1\"\n     },\n     {\n        \"description\":\"Test Afterpay 2\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"300\",\n        \"id\":\"Item #2\"\n     }\n\n     {\n        \"description\":\"Discount\",\n        \"quantity\":\"2\",\n        \"amountIncludingTax\":\"-100\",\n        \"id\":\"Item #2 Discount\"\n     }\n  ]\n}\nTest and go live\nTo test Afterpay payments, you need a test shopper account in the Afterpay sandbox environment. If you are testing in multiple countries or regions, create a different test account for each.\nTo create a test account:\n\nGo to https:\/\/portal.sandbox.afterpay.com\/.\nEnter a real email address and select Continue. You'll get confirmations of payments and refunds like any other shopper on this email address.\nFrom the drop-down menu, select the country\/region for which you want to create a test shopper account. Select Australia, New Zealand, US, or Canada.\nEnter a unique mobile number in the correct format and select Continue. Ensure the number is not associated with an existing account to avoid being redirected to a login page.\nWhen you are prompted to enter your SMS verification code, enter 111111.\nFollow the instructions on your screen to complete your profile, accept the terms and conditions, and select Continue.\n\n \nTo test payments, add a test card to your Afterpay test shopper account.\nYou can use the card details provided in the Afterpay developer documentation, or use one of the Adyen test cards. Use CVV 000 to simulate authorised payments, or CVV 051 to simulate refused payments.\n \nYou can check the status of test payments in your\u00a0Customer Area\u00a0&gt;\u00a0Transactions\u00a0&gt;\u00a0Payments.\n \nBefore you can accept live Afterpay payments, you need to submit a request for Afterpay in your live Customer Area.\nSee also\n\n\n                    iOS Drop-in integration guide\n                \n                    Webhooks\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Afterpay","lvl3":"Afterpay Drop-in integration"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/afterpaytouch","lvl3":"\/pt\/payment-methods\/afterpaytouch\/ios-drop-in"},"levels":4,"category":"Payment method","category_color":"green","tags":["Afterpay","Drop-in","integration"]},"articleFiles":{"payments.js":"<p alt=\"\">payments.js<\/p>"}}
