{"title":"Affirm iOS Component integration","category":"default","creationDate":1776961628,"content":"<p>This page explains how to add Affirm to your existing  Components 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=\"tabSY5BE\">\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=%7B%7BgetParameter%28%27platform%27%29%7D%7D&amp;amp;integration=Components\\&quot;&gt; Components 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 Affirm 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=%7B%7BgetParameter%28%27platform%27%29%7D%7D&amp;amp;integration=Components\\&quot;&gt; Components 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 Affirm 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=\"tabGNrcu\">\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=Components\\&quot;&gt;Components 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;Shopper&#039;s first name and last 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\\\/#\\\/CheckoutService\\\/latest\\\/post\\\/sessions__resParam_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;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 phone number.&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\\\/Checkout\\\/latest\\\/post\\\/sessions#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;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s country in two-letter &lt;a href=\\&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/ISO_3166-1_alpha-2\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;ISO 3166-1 alpha-2&lt;\\\/a&gt; format. &lt;div class=\\&quot;sc-notice note\\&quot;&gt;&lt;div&gt;Required when transacting in Canada or the UK, because the default &lt;strong&gt;US&lt;\\\/strong&gt; is used if you omit this parameter.&lt;\\\/div&gt;&lt;\\\/div&gt;&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;\\\/td&gt;\\n&lt;td&gt;The address where to send the invoice. The &lt;code&gt;stateOrProvince&lt;\\\/code&gt; address field is required for Canada and the US, and optional for the UK.&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;\\\/td&gt;\\n&lt;td&gt;The address where the purchased goods should be delivered. The &lt;code&gt;stateOrProvince&lt;\\\/code&gt; address field is required for Canada and the US, and optional for the UK. &lt;br&gt; If blank or missing, &lt;code&gt;billingAddress&lt;\\\/code&gt; is used by default.&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;\\\/td&gt;\\n&lt;td&gt;Price and product information about the purchased items. This is optional, but we recommend to include this data to improve approval rates.&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;affirm-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;merchantAccount\\\\&amp;quot;:\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n   \\\\&amp;quot;countryCode\\\\&amp;quot;:\\\\&amp;quot;US\\\\&amp;quot;,\\\\n   \\\\&amp;quot;amount\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;:\\\\&amp;quot;USD\\\\&amp;quot;,\\\\n      \\\\&amp;quot;value\\\\&amp;quot;:5000\\\\n   },\\\\n   \\\\&amp;quot;shopperReference\\\\&amp;quot;:\\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n   \\\\&amp;quot;reference\\\\&amp;quot;:\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperName\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;firstName\\\\&amp;quot;:\\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n      \\\\&amp;quot;lastName\\\\&amp;quot;:\\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;telephoneNumber\\\\&amp;quot;:\\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperEmail\\\\&amp;quot;:\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n   \\\\&amp;quot;{hint:state.data.billingAddress from onSubmit}billingAddress{\\\\\\\/hint}\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n      \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;US\\\\&amp;quot;,\\\\n      \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;274\\\\&amp;quot;,\\\\n      \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;94107\\\\&amp;quot;,\\\\n      \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;CA\\\\&amp;quot;,\\\\n      \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;{hint:state.data.deliveryAddress from onSubmit}deliveryAddress{\\\\\\\/hint}\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n      \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;US\\\\&amp;quot;,\\\\n      \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;274\\\\&amp;quot;,\\\\n      \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;94107\\\\&amp;quot;,\\\\n      \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;CA\\\\&amp;quot;,\\\\n      \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;returnUrl\\\\&amp;quot;:\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n   \\\\&amp;quot;lineItems\\\\&amp;quot;:[\\\\n      {\\\\n         \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;1\\\\&amp;quot;,\\\\n         \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;:\\\\&amp;quot;331\\\\&amp;quot;,\\\\n         \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n         \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n         \\\\&amp;quot;taxAmount\\\\&amp;quot;:\\\\&amp;quot;69\\\\&amp;quot;,\\\\n         \\\\&amp;quot;productUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n         \\\\&amp;quot;imageUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n      },\\\\n      {\\\\n         \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;2\\\\&amp;quot;,\\\\n         \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;:\\\\&amp;quot;248\\\\&amp;quot;,\\\\n         \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n         \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n         \\\\&amp;quot;taxAmount\\\\&amp;quot;:\\\\&amp;quot;52\\\\&amp;quot;,\\\\n         \\\\&amp;quot;productUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n         \\\\&amp;quot;imageUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&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  .imageUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;)\\\\n  .description(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n  .id(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n  .taxAmount(69L)\\\\n  .productUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;);\\\\n\\\\nLineItem lineItem2 = new LineItem()\\\\n  .quantity(2L)\\\\n  .amountExcludingTax(248L)\\\\n  .imageUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;)\\\\n  .description(\\\\&amp;quot;Socks\\\\&amp;quot;)\\\\n  .id(\\\\&amp;quot;Item #2\\\\&amp;quot;)\\\\n  .taxAmount(52L)\\\\n  .productUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;);\\\\n\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  .value(5000L);\\\\n\\\\nName name = new Name()\\\\n  .firstName(\\\\&amp;quot;Simon\\\\&amp;quot;)\\\\n  .lastName(\\\\&amp;quot;Hopper\\\\&amp;quot;);\\\\n\\\\nDeliveryAddress deliveryAddress = new DeliveryAddress()\\\\n  .country(\\\\&amp;quot;US\\\\&amp;quot;)\\\\n  .stateOrProvince(\\\\&amp;quot;CA\\\\&amp;quot;)\\\\n  .city(\\\\&amp;quot;San Francisco\\\\&amp;quot;)\\\\n  .houseNumberOrName(\\\\&amp;quot;274\\\\&amp;quot;)\\\\n  .street(\\\\&amp;quot;Brennan St.\\\\&amp;quot;)\\\\n  .postalCode(\\\\&amp;quot;94107\\\\&amp;quot;);\\\\n\\\\nBillingAddress billingAddress = new BillingAddress()\\\\n  .country(\\\\&amp;quot;US\\\\&amp;quot;)\\\\n  .stateOrProvince(\\\\&amp;quot;CA\\\\&amp;quot;)\\\\n  .city(\\\\&amp;quot;San Francisco\\\\&amp;quot;)\\\\n  .houseNumberOrName(\\\\&amp;quot;274\\\\&amp;quot;)\\\\n  .street(\\\\&amp;quot;Brennan St.\\\\&amp;quot;)\\\\n  .postalCode(\\\\&amp;quot;94107\\\\&amp;quot;);\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;)\\\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\\\n  .amount(amount)\\\\n  .shopperName(name)\\\\n  .telephoneNumber(\\\\&amp;quot;+1612345678\\\\&amp;quot;)\\\\n  .merchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .deliveryAddress(deliveryAddress)\\\\n  .countryCode(\\\\&amp;quot;US\\\\&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;YOUR_UNIQUE_SHOPPER_ID\\\\&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;setImageUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n  -&amp;gt;setId(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n  -&amp;gt;setTaxAmount(69)\\\\n  -&amp;gt;setProductUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;);\\\\n\\\\n$lineItem2 = new LineItem();\\\\n$lineItem2\\\\n  -&amp;gt;setQuantity(2)\\\\n  -&amp;gt;setAmountExcludingTax(248)\\\\n  -&amp;gt;setImageUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Socks\\\\&amp;quot;)\\\\n  -&amp;gt;setId(\\\\&amp;quot;Item #2\\\\&amp;quot;)\\\\n  -&amp;gt;setTaxAmount(52)\\\\n  -&amp;gt;setProductUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;);\\\\n\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(5000);\\\\n\\\\n$name = new Name();\\\\n$name\\\\n  -&amp;gt;setFirstName(\\\\&amp;quot;Simon\\\\&amp;quot;)\\\\n  -&amp;gt;setLastName(\\\\&amp;quot;Hopper\\\\&amp;quot;);\\\\n\\\\n$deliveryAddress = new DeliveryAddress();\\\\n$deliveryAddress\\\\n  -&amp;gt;setCountry(\\\\&amp;quot;US\\\\&amp;quot;)\\\\n  -&amp;gt;setStateOrProvince(\\\\&amp;quot;CA\\\\&amp;quot;)\\\\n  -&amp;gt;setCity(\\\\&amp;quot;San Francisco\\\\&amp;quot;)\\\\n  -&amp;gt;setHouseNumberOrName(\\\\&amp;quot;274\\\\&amp;quot;)\\\\n  -&amp;gt;setStreet(\\\\&amp;quot;Brennan St.\\\\&amp;quot;)\\\\n  -&amp;gt;setPostalCode(\\\\&amp;quot;94107\\\\&amp;quot;);\\\\n\\\\n$billingAddress = new BillingAddress();\\\\n$billingAddress\\\\n  -&amp;gt;setCountry(\\\\&amp;quot;US\\\\&amp;quot;)\\\\n  -&amp;gt;setStateOrProvince(\\\\&amp;quot;CA\\\\&amp;quot;)\\\\n  -&amp;gt;setCity(\\\\&amp;quot;San Francisco\\\\&amp;quot;)\\\\n  -&amp;gt;setHouseNumberOrName(\\\\&amp;quot;274\\\\&amp;quot;)\\\\n  -&amp;gt;setStreet(\\\\&amp;quot;Brennan St.\\\\&amp;quot;)\\\\n  -&amp;gt;setPostalCode(\\\\&amp;quot;94107\\\\&amp;quot;);\\\\n\\\\n$createCheckoutSessionRequest = new CreateCheckoutSessionRequest();\\\\n$createCheckoutSessionRequest\\\\n  -&amp;gt;setReference(\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&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;+1612345678\\\\&amp;quot;)\\\\n  -&amp;gt;setMerchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setDeliveryAddress($deliveryAddress)\\\\n  -&amp;gt;setCountryCode(\\\\&amp;quot;US\\\\&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;YOUR_UNIQUE_SHOPPER_ID\\\\&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  ImageUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;,\\\\n  Description = \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n  Id = \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n  TaxAmount = 69,\\\\n  ProductUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;\\\\n};\\\\n\\\\nLineItem lineItem2 = new LineItem\\\\n{\\\\n  Quantity = 2,\\\\n  AmountExcludingTax = 248,\\\\n  ImageUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;,\\\\n  Description = \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n  Id = \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n  TaxAmount = 52,\\\\n  ProductUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;\\\\n};\\\\n\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value = 5000\\\\n};\\\\n\\\\nName name = new Name\\\\n{\\\\n  FirstName = \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n  LastName = \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n};\\\\n\\\\nDeliveryAddress deliveryAddress = new DeliveryAddress\\\\n{\\\\n  Country = \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  StateOrProvince = \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n  City = \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n  HouseNumberOrName = \\\\&amp;quot;274\\\\&amp;quot;,\\\\n  Street = \\\\&amp;quot;Brennan St.\\\\&amp;quot;,\\\\n  PostalCode = \\\\&amp;quot;94107\\\\&amp;quot;\\\\n};\\\\n\\\\nBillingAddress billingAddress = new BillingAddress\\\\n{\\\\n  Country = \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  StateOrProvince = \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n  City = \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n  HouseNumberOrName = \\\\&amp;quot;274\\\\&amp;quot;,\\\\n  Street = \\\\&amp;quot;Brennan St.\\\\&amp;quot;,\\\\n  PostalCode = \\\\&amp;quot;94107\\\\&amp;quot;\\\\n};\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest\\\\n{\\\\n  Reference = \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  LineItems = new List&amp;lt;LineItem&amp;gt;{ lineItem1, lineItem2 },\\\\n  Amount = amount,\\\\n  ShopperName = name,\\\\n  TelephoneNumber = \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  MerchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  DeliveryAddress = deliveryAddress,\\\\n  CountryCode = \\\\&amp;quot;US\\\\&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;YOUR_UNIQUE_SHOPPER_ID\\\\&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  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  countryCode: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  amount: {\\\\n    currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n    value: 5000\\\\n  },\\\\n  shopperReference: \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  shopperName: {\\\\n    firstName: \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n    lastName: \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n  },\\\\n  telephoneNumber: \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  shopperEmail: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  billingAddress: {\\\\n    city: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  deliveryAddress: {\\\\n    city: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  lineItems: [ {\\\\n    quantity: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n    imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n  }, {\\\\n    quantity: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    description: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n    imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&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  ImageUrl: common.PtrString(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;),\\\\n  Description: common.PtrString(\\\\&amp;quot;Shoes\\\\&amp;quot;),\\\\n  Id: common.PtrString(\\\\&amp;quot;Item #1\\\\&amp;quot;),\\\\n  TaxAmount: common.PtrInt64(69),\\\\n  ProductUrl: common.PtrString(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;),\\\\n}\\\\n\\\\nlineItem2 := checkout.LineItem{\\\\n  Quantity: common.PtrInt64(2),\\\\n  AmountExcludingTax: common.PtrInt64(248),\\\\n  ImageUrl: common.PtrString(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;),\\\\n  Description: common.PtrString(\\\\&amp;quot;Socks\\\\&amp;quot;),\\\\n  Id: common.PtrString(\\\\&amp;quot;Item #2\\\\&amp;quot;),\\\\n  TaxAmount: common.PtrInt64(52),\\\\n  ProductUrl: common.PtrString(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;),\\\\n}\\\\n\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value: 5000,\\\\n}\\\\n\\\\nname := checkout.Name{\\\\n  FirstName: \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n  LastName: \\\\&amp;quot;Hopper\\\\&amp;quot;,\\\\n}\\\\n\\\\ndeliveryAddress := checkout.DeliveryAddress{\\\\n  Country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  StateOrProvince: common.PtrString(\\\\&amp;quot;CA\\\\&amp;quot;),\\\\n  City: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n  HouseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n  Street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;,\\\\n  PostalCode: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n}\\\\n\\\\nbillingAddress := checkout.BillingAddress{\\\\n  Country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  StateOrProvince: common.PtrString(\\\\&amp;quot;CA\\\\&amp;quot;),\\\\n  City: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n  HouseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n  Street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;,\\\\n  PostalCode: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n}\\\\n\\\\ncreateCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  LineItems: []checkout.LineItem{\\\\n      lineItem1, lineItem2,\\\\n  },\\\\n  Amount: amount,\\\\n  ShopperName: &amp;amp;name,\\\\n  TelephoneNumber: common.PtrString(\\\\&amp;quot;+1612345678\\\\&amp;quot;),\\\\n  MerchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  DeliveryAddress: &amp;amp;deliveryAddress,\\\\n  CountryCode: common.PtrString(\\\\&amp;quot;US\\\\&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;YOUR_UNIQUE_SHOPPER_ID\\\\&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;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 5000\\\\n  },\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;firstName\\\\&amp;quot;: \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lastName\\\\&amp;quot;: \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot;: \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot;: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    \\\\&amp;quot;productUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n    \\\\&amp;quot;imageUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n  }, {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    \\\\&amp;quot;productUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n    \\\\&amp;quot;imageUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&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  :merchantAccount =&amp;gt; &#039;YOUR_MERCHANT_ACCOUNT&#039;,\\\\n  :countryCode =&amp;gt; &#039;US&#039;,\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; &#039;USD&#039;,\\\\n    :value =&amp;gt; 5000\\\\n  },\\\\n  :shopperReference =&amp;gt; &#039;YOUR_UNIQUE_SHOPPER_ID&#039;,\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_NUMBER&#039;,\\\\n  :shopperName =&amp;gt; {\\\\n    :firstName =&amp;gt; &#039;Simon&#039;,\\\\n    :lastName =&amp;gt; &#039;Hopper&#039;\\\\n  },\\\\n  :telephoneNumber =&amp;gt; &#039;+1612345678&#039;,\\\\n  :shopperEmail =&amp;gt; &#039;s.hopper@example.com&#039;,\\\\n  :billingAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;San Francisco&#039;,\\\\n    :country =&amp;gt; &#039;US&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;274&#039;,\\\\n    :postalCode =&amp;gt; &#039;94107&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;CA&#039;,\\\\n    :street =&amp;gt; &#039;Brennan St.&#039;\\\\n  },\\\\n  :deliveryAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;San Francisco&#039;,\\\\n    :country =&amp;gt; &#039;US&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;274&#039;,\\\\n    :postalCode =&amp;gt; &#039;94107&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;CA&#039;,\\\\n    :street =&amp;gt; &#039;Brennan St.&#039;\\\\n  },\\\\n  :returnUrl =&amp;gt; &#039;my-app:\\\/\\\/adyen&#039;,\\\\n  :lineItems =&amp;gt; [ {\\\\n    :quantity =&amp;gt; &#039;1&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;331&#039;,\\\\n    :description =&amp;gt; &#039;Shoes&#039;,\\\\n    :id =&amp;gt; &#039;Item #1&#039;,\\\\n    :taxAmount =&amp;gt; &#039;69&#039;,\\\\n    :productUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/&#039;,\\\\n    :imageUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg&#039;\\\\n  }, {\\\\n    :quantity =&amp;gt; &#039;2&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;248&#039;,\\\\n    :description =&amp;gt; &#039;Socks&#039;,\\\\n    :id =&amp;gt; &#039;Item #2&#039;,\\\\n    :taxAmount =&amp;gt; &#039;52&#039;,\\\\n    :productUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/&#039;,\\\\n    :imageUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg&#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  imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;,\\\\n  description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n  id: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n  taxAmount: 69,\\\\n  productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;\\\\n};\\\\n\\\\nconst lineItem2: Types.checkout.LineItem = {\\\\n  quantity: 2,\\\\n  amountExcludingTax: 248,\\\\n  imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;,\\\\n  description: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n  id: \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n  taxAmount: 52,\\\\n  productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;\\\\n};\\\\n\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  value: 5000\\\\n};\\\\n\\\\nconst name: Types.checkout.Name = {\\\\n  firstName: \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n  lastName: \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n};\\\\n\\\\nconst deliveryAddress: Types.checkout.DeliveryAddress = {\\\\n  country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  stateOrProvince: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n  city: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n  houseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n  street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;,\\\\n  postalCode: \\\\&amp;quot;94107\\\\&amp;quot;\\\\n};\\\\n\\\\nconst billingAddress: Types.checkout.BillingAddress = {\\\\n  country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  stateOrProvince: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n  city: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n  houseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n  street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;,\\\\n  postalCode: \\\\&amp;quot;94107\\\\&amp;quot;\\\\n};\\\\n\\\\nconst createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  lineItems: [lineItem1, lineItem2],\\\\n  amount: amount,\\\\n  shopperName: name,\\\\n  telephoneNumber: \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  deliveryAddress: deliveryAddress,\\\\n  countryCode: \\\\&amp;quot;US\\\\&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;YOUR_UNIQUE_SHOPPER_ID\\\\&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;Shopper&#039;s first name and last 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-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;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 phone number.&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;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s country in two-letter &lt;a href=\\&quot;https:\\\/\\\/en.wikipedia.org\\\/wiki\\\/ISO_3166-1_alpha-2\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;ISO 3166-1 alpha-2&lt;\\\/a&gt; format. &lt;div class=\\&quot;sc-notice note\\&quot;&gt;&lt;div&gt;Required when transacting in Canada or the UK because the default &lt;strong&gt;US&lt;\\\/strong&gt; is used if you omit this parameter.&lt;\\\/div&gt;&lt;\\\/div&gt;&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;\\\/td&gt;\\n&lt;td&gt;The address where to send the invoice. The &lt;code&gt;stateOrProvince&lt;\\\/code&gt; address field is required for Canada and the US, and optional for the UK.&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;\\\/td&gt;\\n&lt;td&gt;The address where the purchased goods should be delivered. The &lt;code&gt;stateOrProvince&lt;\\\/code&gt; address field is required for Canada and the US, and optional for the UK. &lt;br&gt; If blank or missing, &lt;code&gt;billingAddress&lt;\\\/code&gt; is used by default.&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;\\\/td&gt;\\n&lt;td&gt;Price and product information about the purchased items. This is optional, but we recommend to include this data to improve approval rates.&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;affirm-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;merchantAccount\\\\&amp;quot;:\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n   \\\\&amp;quot;countryCode\\\\&amp;quot;:\\\\&amp;quot;US\\\\&amp;quot;,\\\\n   \\\\&amp;quot;amount\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;:\\\\&amp;quot;USD\\\\&amp;quot;,\\\\n      \\\\&amp;quot;value\\\\&amp;quot;:5000\\\\n   },\\\\n   \\\\&amp;quot;shopperReference\\\\&amp;quot;:\\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n   \\\\&amp;quot;reference\\\\&amp;quot;:\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n   \\\\&amp;quot;paymentMethod\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;type\\\\&amp;quot;:\\\\&amp;quot;affirm\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;shopperName\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;firstName\\\\&amp;quot;:\\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n      \\\\&amp;quot;lastName\\\\&amp;quot;:\\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;telephoneNumber\\\\&amp;quot;:\\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperEmail\\\\&amp;quot;:\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n   \\\\&amp;quot;{hint:state.data.billingAddress from onSubmit}billingAddress{\\\\\\\/hint}\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n      \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;US\\\\&amp;quot;,\\\\n      \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;274\\\\&amp;quot;,\\\\n      \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;94107\\\\&amp;quot;,\\\\n      \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;CA\\\\&amp;quot;,\\\\n      \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;{hint:state.data.deliveryAddress from onSubmit}deliveryAddress{\\\\\\\/hint}\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;city\\\\&amp;quot;:\\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n      \\\\&amp;quot;country\\\\&amp;quot;:\\\\&amp;quot;US\\\\&amp;quot;,\\\\n      \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;:\\\\&amp;quot;274\\\\&amp;quot;,\\\\n      \\\\&amp;quot;postalCode\\\\&amp;quot;:\\\\&amp;quot;94107\\\\&amp;quot;,\\\\n      \\\\&amp;quot;stateOrProvince\\\\&amp;quot;:\\\\&amp;quot;CA\\\\&amp;quot;,\\\\n      \\\\&amp;quot;street\\\\&amp;quot;:\\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;returnUrl\\\\&amp;quot;:\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n   \\\\&amp;quot;lineItems\\\\&amp;quot;:[\\\\n      {\\\\n         \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;1\\\\&amp;quot;,\\\\n         \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;:\\\\&amp;quot;331\\\\&amp;quot;,\\\\n         \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n         \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n         \\\\&amp;quot;taxAmount\\\\&amp;quot;:\\\\&amp;quot;69\\\\&amp;quot;,\\\\n         \\\\&amp;quot;productUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n         \\\\&amp;quot;imageUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n      },\\\\n      {\\\\n         \\\\&amp;quot;quantity\\\\&amp;quot;:\\\\&amp;quot;2\\\\&amp;quot;,\\\\n         \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;:\\\\&amp;quot;248\\\\&amp;quot;,\\\\n         \\\\&amp;quot;description\\\\&amp;quot;:\\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n         \\\\&amp;quot;id\\\\&amp;quot;:\\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n         \\\\&amp;quot;taxAmount\\\\&amp;quot;:\\\\&amp;quot;52\\\\&amp;quot;,\\\\n         \\\\&amp;quot;productUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n         \\\\&amp;quot;imageUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&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;Client client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\nCheckout checkout = new Checkout(client);\\\\n\\\\nPaymentsRequest paymentsRequest = new PaymentsRequest();\\\\npaymentsRequest.setMerchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;);\\\\npaymentsRequest.setCountryCode(\\\\&amp;quot;US\\\\&amp;quot;);\\\\n\\\\nAmount amount = new Amount();\\\\namount.setCurrency(\\\\&amp;quot;USD\\\\&amp;quot;);\\\\namount.setValue(5000L);\\\\n\\\\npaymentsRequest.setAmount(amount);\\\\npaymentsRequest.setShopperReference(\\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;);\\\\npaymentsRequest.setReference(\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;);\\\\npaymentsRequest.setChannel(PaymentsRequest.ChannelEnum.WEB);\\\\n\\\\nDefaultPaymentMethodDetails defaultPaymentMethodDetails = new DefaultPaymentMethodDetails();\\\\ndefaultPaymentMethodDetails.setType(\\\\&amp;quot;affirm\\\\&amp;quot;);\\\\npaymentsRequest.setPaymentMethod(defaultPaymentMethodDetails);\\\\n\\\\nName shopperName = new Name();\\\\nshopperName.setFirstName(\\\\&amp;quot;Simon\\\\&amp;quot;);\\\\nshopperName.setLastName(\\\\&amp;quot;Hopper\\\\&amp;quot;);\\\\n\\\\npaymentsRequest.setTelephoneNumber(\\\\&amp;quot;+1612345678\\\\&amp;quot;);\\\\npaymentsRequest.setShopperEmail(\\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;);\\\\n\\\\n\\\\n\\\\nAddress billingAddress = new Address();\\\\nbillingAddress.setStreet(\\\\&amp;quot;Brennan St.\\\\&amp;quot;);\\\\nbillingAddress.setHouseNumberOrName(\\\\&amp;quot;274\\\\&amp;quot;);\\\\nbillingAddress.setCity(\\\\&amp;quot;San Francisco\\\\&amp;quot;);\\\\nbillingAddress.setPostalCode(\\\\&amp;quot;94107\\\\&amp;quot;);\\\\nbillingAddress.setStateOrProvince(\\\\&amp;quot;CA\\\\&amp;quot;);\\\\nbillingAddress.setCountry(\\\\&amp;quot;US\\\\&amp;quot;);\\\\n\\\\npaymentsRequest.setBillingAddress(billingAddress);\\\\n\\\\nAddress deliveryAddress = new Address();\\\\n\\\\ndeliveryAddress.setStreet(\\\\&amp;quot;Brennan St.\\\\&amp;quot;);\\\\ndeliveryAddress.setHouseNumberOrName(\\\\&amp;quot;274\\\\&amp;quot;);\\\\ndeliveryAddress.setCity(\\\\&amp;quot;San Francisco\\\\&amp;quot;);\\\\ndeliveryAddress.setPostalCode(\\\\&amp;quot;94107\\\\&amp;quot;);\\\\ndeliveryAddress.setStateOrProvince(\\\\&amp;quot;CA\\\\&amp;quot;);\\\\ndeliveryAddress.setCountry(\\\\&amp;quot;US\\\\&amp;quot;);\\\\n\\\\npaymentsRequest.setDeliveryAddress(deliveryAddress);\\\\npaymentsRequest.setReturnUrl(\\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;);\\\\n\\\\nList&amp;lt;LineItem&amp;gt; lineItems = new ArrayList&amp;lt;&amp;gt;();\\\\n\\\\nlineItems.add(\\\\n        new LineItem()\\\\n                .quantity(1L)\\\\n                .amountExcludingTax(331L)\\\\n                .description(\\\\&amp;quot;Shoes\\\\&amp;quot;)\\\\n                .id(\\\\&amp;quot;Item #1\\\\&amp;quot;)\\\\n                .taxAmount(69L)\\\\n                .productUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;)\\\\n                .imageUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;)\\\\n);\\\\n\\\\nlineItems.add(\\\\n        new LineItem()\\\\n                .quantity(2L)\\\\n                .amountExcludingTax(248L)\\\\n                .description(\\\\&amp;quot;Socks\\\\&amp;quot;)\\\\n                .id(\\\\&amp;quot;Item #2\\\\&amp;quot;)\\\\n                .taxAmount(52L)\\\\n                .productUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;)\\\\n                .imageUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;)\\\\n);\\\\n\\\\npaymentsRequest.setLineItems(lineItems);\\\\n\\\\nPaymentsResponse 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;countryCode\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  \\\\&amp;quot;amount\\\\&amp;quot; =&amp;gt; [\\\\n     \\\\&amp;quot;currency\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n     \\\\&amp;quot;value\\\\&amp;quot; =&amp;gt; 5000\\\\n  ],\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  \\\\&amp;quot;channel\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Web\\\\&amp;quot;,\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot; =&amp;gt; [\\\\n     \\\\&amp;quot;type\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;affirm\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot; =&amp;gt; [\\\\n       \\\\&amp;quot;firstName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n       \\\\&amp;quot;lastName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot; =&amp;gt; [\\\\n        \\\\&amp;quot;city\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n        \\\\&amp;quot;country\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;US\\\\&amp;quot;,\\\\n        \\\\&amp;quot;houseNumberOrName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;274\\\\&amp;quot;,\\\\n        \\\\&amp;quot;postalCode\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n        \\\\&amp;quot;stateOrProvince\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n        \\\\&amp;quot;street\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot; =&amp;gt; [\\\\n        \\\\&amp;quot;city\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n        \\\\&amp;quot;country\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;US\\\\&amp;quot;,\\\\n        \\\\&amp;quot;houseNumberOrName\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;274\\\\&amp;quot;,\\\\n        \\\\&amp;quot;postalCode\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n        \\\\&amp;quot;stateOrProvince\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n        \\\\&amp;quot;street\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  ],\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot; =&amp;gt; [\\\\n     [\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;331\\\\&amp;quot;,\\\\n        \\\\&amp;quot;description\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;69\\\\&amp;quot;,\\\\n        \\\\&amp;quot;productUrl\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n        \\\\&amp;quot;imageUrl\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n     ],\\\\n     [\\\\n        \\\\&amp;quot;quantity\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;2\\\\&amp;quot;,\\\\n        \\\\&amp;quot;amountExcludingTax\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;248\\\\&amp;quot;,\\\\n        \\\\&amp;quot;description\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n        \\\\&amp;quot;id\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n        \\\\&amp;quot;taxAmount\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;52\\\\&amp;quot;,\\\\n\\\\t\\\\t\\\\&amp;quot;productUrl\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n        \\\\&amp;quot;imageUrl\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;\\\\n     ]\\\\n  ]\\\\n];\\\\n\\\\n$result = $service-&amp;gt;payments($params);\\\\n\\\\n\\\\\\\/\\\\\\\/ Check if further action is needed\\\\nif (array_key_exists(\\\\&amp;quot;action\\\\&amp;quot;, $result)){\\\\n   \\\\\\\/\\\\\\\/ Pass the action object to your frontend.\\\\n   \\\\\\\/\\\\\\\/ $result[\\\\&amp;quot;action\\\\&amp;quot;]\\\\n}\\\\nelse {\\\\n   \\\\\\\/\\\\\\\/ No further action needed, pass the resultCode to your front end\\\\n   \\\\\\\/\\\\\\\/ $result[&#039;resultCode&#039;]\\\\n}&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;var paymentsRequest = new Adyen.Model.Checkout.PaymentRequest\\\\n{\\\\n    MerchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n    CountryCode = \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    Amount = new Adyen.Model.Checkout.Amount(\\\\&amp;quot;USD\\\\&amp;quot;, 5000),\\\\n    ShopperReference = \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n    Reference = \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n    Channel = Adyen.Model.Checkout.PaymentRequest.ChannelEnum.Web,\\\\n    TelephoneNumber = \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n    ShopperEmail= \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n    ReturnUrl = \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n\\\\n    LineItems = new List&amp;lt;LineItem&amp;gt;\\\\n    {\\\\n        new LineItem(amountExcludingTax: 248, quantity: 2, id: \\\\&amp;quot;Item #1\\\\&amp;quot;, taxAmount: 69, description: \\\\&amp;quot;Shoes\\\\&amp;quot;, productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;, imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;),\\\\n        new LineItem(amountExcludingTax: 248, quantity: 2, id: \\\\&amp;quot;Item #2\\\\&amp;quot;, taxAmount: 52, description: \\\\&amp;quot;Socks\\\\&amp;quot;, productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;, imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&amp;quot;)    },\\\\n    PaymentMethod = new DefaultPaymentMethodDetails\\\\n    {\\\\n        Type = \\\\&amp;quot;affirm\\\\&amp;quot;,\\\\n        BillingAddress = new Adyen.Model.Checkout.Address(country: \\\\&amp;quot;US\\\\&amp;quot;)\\\\n        {\\\\n            City = \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n            HouseNumberOrName = \\\\&amp;quot;274\\\\&amp;quot;,\\\\n            PostalCode = \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n            StateOrProvince = \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n            Street = \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n        },\\\\n        DeliveryAddress = new Adyen.Model.Checkout.Address\\\\n        {\\\\n            City = \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n            HouseNumberOrName = \\\\&amp;quot;274\\\\&amp;quot;,\\\\n            PostalCode = \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n            StateOrProvince = \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n            Street = \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n        },\\\\n    },\\\\n    ShopperName = new Adyen.Model.Checkout.Name\\\\n    {\\\\n        FirstName = \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n        LastName = \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\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  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  countryCode: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  amount: {\\\\n    currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n    value: 5000\\\\n  },\\\\n  shopperReference: \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  paymentMethod: {\\\\n    type: \\\\&amp;quot;affirm\\\\&amp;quot;\\\\n  },\\\\n  shopperName: {\\\\n    firstName: \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n    lastName: \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n  },\\\\n  telephoneNumber: \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  shopperEmail: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  billingAddress: {\\\\n    city: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  deliveryAddress: {\\\\n    city: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    country: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    houseNumberOrName: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    postalCode: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    stateOrProvince: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    street: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  lineItems: [ {\\\\n    quantity: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    description: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n    imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n  }, {\\\\n    quantity: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    amountExcludingTax: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    description: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    id: \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n    taxAmount: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    productUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n    imageUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&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;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 5000\\\\n  },\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;affirm\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperName\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;firstName\\\\&amp;quot;: \\\\&amp;quot;Simon\\\\&amp;quot;,\\\\n    \\\\&amp;quot;lastName\\\\&amp;quot;: \\\\&amp;quot;Hopper\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;telephoneNumber\\\\&amp;quot;: \\\\&amp;quot;+1612345678\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperEmail\\\\&amp;quot;: \\\\&amp;quot;s.hopper@example.com\\\\&amp;quot;,\\\\n  \\\\&amp;quot;billingAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;deliveryAddress\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;city\\\\&amp;quot;: \\\\&amp;quot;San Francisco\\\\&amp;quot;,\\\\n    \\\\&amp;quot;country\\\\&amp;quot;: \\\\&amp;quot;US\\\\&amp;quot;,\\\\n    \\\\&amp;quot;houseNumberOrName\\\\&amp;quot;: \\\\&amp;quot;274\\\\&amp;quot;,\\\\n    \\\\&amp;quot;postalCode\\\\&amp;quot;: \\\\&amp;quot;94107\\\\&amp;quot;,\\\\n    \\\\&amp;quot;stateOrProvince\\\\&amp;quot;: \\\\&amp;quot;CA\\\\&amp;quot;,\\\\n    \\\\&amp;quot;street\\\\&amp;quot;: \\\\&amp;quot;Brennan St.\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;my-app:\\\/\\\/adyen\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;331\\\\&amp;quot;,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #1\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;69\\\\&amp;quot;,\\\\n    \\\\&amp;quot;productUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/\\\\&amp;quot;,\\\\n    \\\\&amp;quot;imageUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg\\\\&amp;quot;\\\\n  }, {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: \\\\&amp;quot;2\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: \\\\&amp;quot;248\\\\&amp;quot;,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Socks\\\\&amp;quot;,\\\\n    \\\\&amp;quot;id\\\\&amp;quot;: \\\\&amp;quot;Item #2\\\\&amp;quot;,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: \\\\&amp;quot;52\\\\&amp;quot;,\\\\n    \\\\&amp;quot;productUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/\\\\&amp;quot;,\\\\n    \\\\&amp;quot;imageUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg\\\\&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  :merchantAccount =&amp;gt; &#039;YOUR_MERCHANT_ACCOUNT&#039;,\\\\n  :countryCode =&amp;gt; &#039;US&#039;,\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; &#039;USD&#039;,\\\\n    :value =&amp;gt; 5000\\\\n  },\\\\n  :shopperReference =&amp;gt; &#039;YOUR_UNIQUE_SHOPPER_ID&#039;,\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_NUMBER&#039;,\\\\n  :paymentMethod =&amp;gt; {\\\\n    :type =&amp;gt; &#039;affirm&#039;\\\\n  },\\\\n  :shopperName =&amp;gt; {\\\\n    :firstName =&amp;gt; &#039;Simon&#039;,\\\\n    :lastName =&amp;gt; &#039;Hopper&#039;\\\\n  },\\\\n  :telephoneNumber =&amp;gt; &#039;+1612345678&#039;,\\\\n  :shopperEmail =&amp;gt; &#039;s.hopper@example.com&#039;,\\\\n  :billingAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;San Francisco&#039;,\\\\n    :country =&amp;gt; &#039;US&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;274&#039;,\\\\n    :postalCode =&amp;gt; &#039;94107&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;CA&#039;,\\\\n    :street =&amp;gt; &#039;Brennan St.&#039;\\\\n  },\\\\n  :deliveryAddress =&amp;gt; {\\\\n    :city =&amp;gt; &#039;San Francisco&#039;,\\\\n    :country =&amp;gt; &#039;US&#039;,\\\\n    :houseNumberOrName =&amp;gt; &#039;274&#039;,\\\\n    :postalCode =&amp;gt; &#039;94107&#039;,\\\\n    :stateOrProvince =&amp;gt; &#039;CA&#039;,\\\\n    :street =&amp;gt; &#039;Brennan St.&#039;\\\\n  },\\\\n  :returnUrl =&amp;gt; &#039;my-app:\\\/\\\/adyen&#039;,\\\\n  :lineItems =&amp;gt; [ {\\\\n    :quantity =&amp;gt; &#039;1&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;331&#039;,\\\\n    :description =&amp;gt; &#039;Shoes&#039;,\\\\n    :id =&amp;gt; &#039;Item #1&#039;,\\\\n    :taxAmount =&amp;gt; &#039;69&#039;,\\\\n    :productUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1\\\\\\\/&#039;,\\\\n    :imageUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item1.jpg&#039;\\\\n  }, {\\\\n    :quantity =&amp;gt; &#039;2&#039;,\\\\n    :amountExcludingTax =&amp;gt; &#039;248&#039;,\\\\n    :description =&amp;gt; &#039;Socks&#039;,\\\\n    :id =&amp;gt; &#039;Item #2&#039;,\\\\n    :taxAmount =&amp;gt; &#039;52&#039;,\\\\n    :productUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2\\\\\\\/&#039;,\\\\n    :imageUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/item2.jpg&#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>Component configuration<\/h2>\n<h3>v5.0.0 or later<\/h3>\n<p>If your integration uses iOS Components v5.0.0 or later, configure and create an instance of the Affirm Component:<\/p>\n\n<div id=\"tab25sen\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;\\\/sessions&quot;,&quot;content&quot;:&quot;\\n  &lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Component configuration&#039;\\&quot; :id=\\&quot;&#039;presentable_component_sessions&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;swift\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;let paymentMethods = session.sessionContext.paymentMethods\\\\n\\\\\\\/\\\\\\\/ Check that the payment method is supported before showing the Component.\\\\nguard let paymentMethod = paymentMethods.paymentMethod(ofType: AffirmPaymentMethod.self) else { return }\\\\nlet configuration = AffirmComponent.Configuration()\\\\nlet component = AffirmComponent(paymentMethod: paymentMethod,\\\\n                                         context: context,\\\\n                                         configuration: configuration)\\\\nself.currentComponent = component\\\\n\\\\\\\/\\\\\\\/ Set the session as the delegate.\\\\ncomponent.delegate = session\\\\npresent(component)\\&quot;}]&#039; :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-5-config&quot;,&quot;oldTabId&quot;:&quot;sessions-5-config_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Advanced flow&quot;,&quot;content&quot;:&quot;\\n  &lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Component configuration&#039;\\&quot; :id=\\&quot;&#039;presentable_component_advanced&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;swift\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;\\\\\\\/\\\\\\\/ Check that the payment method is supported before showing the Component.\\\\nguard let paymentMethod = paymentMethods.paymentMethod(ofType: AffirmPaymentMethod.self) else { return }\\\\nlet configuration = AffirmComponent.Configuration()\\\\nlet component = AffirmComponent(paymentMethod: paymentMethod,\\\\n                                         context: context,\\\\n                                         configuration: configuration)\\\\nself.currentComponent = component\\\\n\\\\\\\/\\\\\\\/ Set the component as the delegate.\\\\ncomponent.delegate = self\\\\npresent(component)\\&quot;}]&#039; :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-5-config&quot;,&quot;oldTabId&quot;:&quot;advanced-5-config_2&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h3>v4.x.x<\/h3>\n<p>If your integration uses an earlier version of iOS Components:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Component configuration'\" :id=\"''\" :code-data='[{\"language\":\"swift\",\"tabTitle\":\"\",\"content\":\"\\\/\\\/ Check that the payment method is supported before showing the Component.\\nguard let paymentMethod = paymentMethods.paymentMethod(ofType: AffirmPaymentMethod.self) else { return }\\nlet style = FormComponentStyle()\\nlet component = AffirmComponent(paymentMethod: paymentMethod,\\n                                apiContext: context,\\n                                style: style)\\npresent(component)\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>There are no configuration steps specific to Affirm required for Components.<\/p>\n<h3>Optional configuration<\/h3>\n<h3>Pre-filled shopper data<\/h3>\n<p>You can add configuration with the shopper's information, so that you can pre-fill the payment form.<\/p>\n<p>The <code>data<\/code> property includes the following information that you can pre-fill:<\/p>\n<table>\n<thead>\n<tr>\n<th>Property<\/th>\n<th>Description<\/th>\n<th>Data type<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>personalDetails.firstName<\/code><\/td>\n<td>The shopper's first name.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>personalDetails.lastName<\/code><\/td>\n<td>The shopper's last name.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>personalDetails.dateOfBirth<\/code><\/td>\n<td>The shopper's date of birth. Format: <code>YYYY-MM-DD<\/code>.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>personalDetails.shopperEmail<\/code><\/td>\n<td>The shoppers' email address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>personalDetails.telephoneNumber<\/code><\/td>\n<td>The shopper's telephone number.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress.street<\/code><\/td>\n<td>The street name for the billing address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress.houseNumberOrName<\/code><\/td>\n<td>The house number or name for the billing address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress.postalCode<\/code><\/td>\n<td>The postal code for the billing address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress.city<\/code><\/td>\n<td>The city for the billing address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress.stateOrProvince<\/code><\/td>\n<td>The state, province, or region for the billing address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress.country<\/code><\/td>\n<td>The two-character <a href=\"https:\/\/www.iso.org\/iso-3166-country-codes.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO 3166-1 alpha-2 country code<\/a> for the billing address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress.street<\/code><\/td>\n<td>The street name for the delivery address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress.houseNumberOrName<\/code><\/td>\n<td>The house number or building name for the delivery address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress.postalCode<\/code><\/td>\n<td>The postal code for the delivery address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress.city<\/code><\/td>\n<td>The city for the delivery address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress.stateOrProvince<\/code><\/td>\n<td>The state, province, or region for the delivery address.<\/td>\n<td>String<\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress.country<\/code><\/td>\n<td>The two-character <a href=\"https:\/\/www.iso.org\/iso-3166-country-codes.html\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO 3166-1 alpha-2 country code<\/a> for the delivery address.<\/td>\n<td>String<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example of pre-filled data for Affirm'\" :id=\"''\" :code-data='[{\"language\":\"ts\",\"tabTitle\":\"\",\"content\":\"const preFilledData = {\\n  personalDetails: {\\n    firstName: \\\"John\\\",\\n    lastName: \\\"Smith\\\",\\n    shopperEmail: \\\"johnsmith@example.com\\\",\\n    telephoneNumber: \\\"2025550123\\\",\\n  },\\n  billingAddress: {\\n    street: \\\"Main St\\\",\\n    houseNumberOrName: \\\"123\\\",\\n    postalCode: \\\"90210\\\",\\n    city: \\\"Beverly Hills\\\",\\n    stateOrProvince: \\\"CA\\\",\\n    country: \\\"US\\\",\\n  },\\n  deliveryAddress: {\\n    street: \\\"Main St\\\",\\n    houseNumberOrName: \\\"123\\\",\\n    postalCode: \\\"90210\\\",\\n    city: \\\"Beverly Hills\\\",\\n    stateOrProvince: \\\"CA\\\",\\n    country: \\\"US\\\",\\n  }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3>Payment form fields configuration<\/h3>\n<p>In the payment form, you can configure if groups of fields are visible or can be edited by the shopper.<\/p>\n<p>Use the <code>visibility<\/code> property to configure groups of fields with the possible values:<\/p>\n<ul>\n<li><strong>hidden<\/strong>: The fields do not show up in the payment form.<\/li>\n<li><strong>readOnly<\/strong>: The fields show up in the payment form with the pre-filled values. The shopper cannot change the values. If you set any group of fields with this value, you must provide the corresponding information in the pre-filled object.<\/li>\n<li><strong>editable<\/strong>: The fields show up in the payment form with the pre-filled values. The shopper can change the values.<\/li>\n<\/ul>\n<table>\n<thead>\n<tr>\n<th>Fields<\/th>\n<th>Default value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>companyDetails<\/code><\/td>\n<td><strong>hidden<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>personalDetails<\/code><\/td>\n<td><strong>editable<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress<\/code><\/td>\n<td><strong>editable<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>deliveryAddress<\/code><\/td>\n<td><strong>editable<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>bankAccount<\/code><\/td>\n<td><strong>hidden<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example of Affirm configuration object with default visibility values'\" :id=\"''\" :code-data='[{\"language\":\"ts\",\"tabTitle\":\"\",\"content\":\"affirm: {\\n  data: preFilledData,\\n  visibility: {\\n      companyDetails: \\\"hidden\\\",\\n      personalDetails: \\\"editable\\\",\\n      billingAddress: \\\"editable\\\",\\n      deliveryAddress: \\\"editable\\\",\\n      bankAccount: \\\"hidden\\\"\\n  }\\n};\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h4>v6.0.0 or later<\/h4>\n<p>Create an instance of the Component, passing:<\/p>\n<ul>\n<li>Your instance of <code>AdyenCheckout<\/code>.<\/li>\n<li>The  payment method-specific configuration.<\/li>\n<\/ul>\n<pre><code class=\"language-js\">const affirmComponent = new (checkout, affirmConfiguration).mount('#affirm-container');<\/code><\/pre>\n<div class=\"accordion-shortcode adl-accordion adl-accordion--max-height-transition\" data-expand=\"true\" data-ignore=\"anchorjs-link\">\n    \n    <div class=\"adl-accordion__item\" style=\"\">\n        <div tabindex=\"0\" role=\"item\" aria-expanded=\"false\" class=\"adl-accordion__header\">\n            <i class=\"adl-accordion__toggle adl-icon-chevron-down\"><\/i>\n            <div class=\"adl-accordion__title-wrapper\" data-accordion=\"#v5-x-x-or-earlier\">\n                                    <h4 class=\"adl-accordion__title\">v5.x.x or earlier<\/h4>\n                            <\/div>\n        <\/div>\n        <div role=\"region\" class=\"adl-accordion__content\">\n            \n<p>Use the <code>create<\/code> method of your <code>AdyenCheckout<\/code> instance, in this case <code>checkout<\/code>, to create an instance of the Component. Add the configuration object if you created one.<\/p>\n<pre><code class=\"language-js\">const affirmComponent = checkout.create('affirm', affirmConfiguration).mount('#affirm-container');<\/code><\/pre>\n\n        <\/div>\n    <\/div>\n<\/div>\n\n<h2 id=\"capture-the-payment\">Capture the payment<\/h2>\n<p>After the goods have been sent, you also need to capture the payment. All Affirm payments have to be captured within 28 days. Capturing the payment is what triggers the installment payment schedule for the shopper. If you do not capture the payment within 28 days, the authorization will expire.<\/p>\n<p>If for any reason you need to capture a lesser amount than what was authorised, you need to issue a <a href=\"\/pt\/online-payments\/refund\">refund<\/a> for the difference after the capture. For example, a customer purchases two items of USD&nbsp;500 each, totaling USD&nbsp;1,000, but only one is fulfilled. After capturing USD&nbsp;1,000, you should issue a subsequent refund for the unfulfilled item of USD&nbsp;500.<\/p>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>To receive your test credentials, contact Affirm. After reviewing your test transactions, Affirm will provide you with the credentials for processing live transactions.<\/p>\n<p><\/p>\n<p>You can check the status of the test payments in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a> &gt; <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<p><\/p>\n<p>Before you can accept live Affirm payments, you need to <a href=\"\/pt\/payment-methods\/add-payment-methods\">submit a request for Affirm<\/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>, and provide us with your Affirm live credentials.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/online-payments\/build-your-integration\/sessions-flow?platform=iOS&amp;integration=Components\"\n                        target=\"_self\"\n                        >\n                    iOS Components integration guide\n                <\/a><\/li><li><a href=\"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\/affirm\/ios-component","articleFields":{"description":"Add Affirm to your existing iOS Components integration.","parameters":{"channel":"iOS","ios_config_component_type":"PresentableComponent","ios_config_payment_method":"Affirm","ios_config_component_name":"Affirm","integration":"Components","plaform":"iOS","integration_guide_url":"build-your-integration\/sessions-flow?platform=iOS&integration=Components","component_name":"the Component","component_name_capitalized":"The Component","payment_method":"Affirm","payment_method_type":"affirm","component_js_const":"affirm","country_code":"US","currency_code":"USD","city":"San Francisco","housenumberorname":"274","postalcode":"94107","street":"Brennan St.","stateorprovince":"CA","shopper_email":"s.hopper@example.com","shopper_name_first":"Simon","shopper_name_last":"Hopper","telephone_number":"+1612345678","return_url":"my-app:\/\/adyen"},"feedback_component":true},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/affirm\/ios-component","title":"Affirm iOS Component integration","content":"This page explains how to add Affirm to your existing  Components 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\nComponent configuration\nv5.0.0 or later\nIf your integration uses iOS Components v5.0.0 or later, configure and create an instance of the Affirm Component:\n\n\n    \n        \n        \n    \n\n\nv4.x.x\nIf your integration uses an earlier version of iOS Components:\n\n    \n\nThere are no configuration steps specific to Affirm required for Components.\nOptional configuration\nPre-filled shopper data\nYou can add configuration with the shopper's information, so that you can pre-fill the payment form.\nThe data property includes the following information that you can pre-fill:\n\n\n\nProperty\nDescription\nData type\n\n\n\n\npersonalDetails.firstName\nThe shopper's first name.\nString\n\n\npersonalDetails.lastName\nThe shopper's last name.\nString\n\n\npersonalDetails.dateOfBirth\nThe shopper's date of birth. Format: YYYY-MM-DD.\nString\n\n\npersonalDetails.shopperEmail\nThe shoppers' email address.\nString\n\n\npersonalDetails.telephoneNumber\nThe shopper's telephone number.\nString\n\n\nbillingAddress.street\nThe street name for the billing address.\nString\n\n\nbillingAddress.houseNumberOrName\nThe house number or name for the billing address.\nString\n\n\nbillingAddress.postalCode\nThe postal code for the billing address.\nString\n\n\nbillingAddress.city\nThe city for the billing address.\nString\n\n\nbillingAddress.stateOrProvince\nThe state, province, or region for the billing address.\nString\n\n\nbillingAddress.country\nThe two-character ISO 3166-1 alpha-2 country code for the billing address.\nString\n\n\ndeliveryAddress.street\nThe street name for the delivery address.\nString\n\n\ndeliveryAddress.houseNumberOrName\nThe house number or building name for the delivery address.\nString\n\n\ndeliveryAddress.postalCode\nThe postal code for the delivery address.\nString\n\n\ndeliveryAddress.city\nThe city for the delivery address.\nString\n\n\ndeliveryAddress.stateOrProvince\nThe state, province, or region for the delivery address.\nString\n\n\ndeliveryAddress.country\nThe two-character ISO 3166-1 alpha-2 country code for the delivery address.\nString\n\n\n\n\n    \n\nPayment form fields configuration\nIn the payment form, you can configure if groups of fields are visible or can be edited by the shopper.\nUse the visibility property to configure groups of fields with the possible values:\n\nhidden: The fields do not show up in the payment form.\nreadOnly: The fields show up in the payment form with the pre-filled values. The shopper cannot change the values. If you set any group of fields with this value, you must provide the corresponding information in the pre-filled object.\neditable: The fields show up in the payment form with the pre-filled values. The shopper can change the values.\n\n\n\n\nFields\nDefault value\n\n\n\n\ncompanyDetails\nhidden\n\n\npersonalDetails\neditable\n\n\nbillingAddress\neditable\n\n\ndeliveryAddress\neditable\n\n\nbankAccount\nhidden\n\n\n\n\n    \n\nv6.0.0 or later\nCreate an instance of the Component, passing:\n\nYour instance of AdyenCheckout.\nThe  payment method-specific configuration.\n\nconst affirmComponent = new (checkout, affirmConfiguration).mount('#affirm-container');\n\n    \n    \n        \n            \n            \n                                    v5.x.x or earlier\n                            \n        \n        \n            \nUse the create method of your AdyenCheckout instance, in this case checkout, to create an instance of the Component. Add the configuration object if you created one.\nconst affirmComponent = checkout.create('affirm', affirmConfiguration).mount('#affirm-container');\n\n        \n    \n\n\nCapture the payment\nAfter the goods have been sent, you also need to capture the payment. All Affirm payments have to be captured within 28 days. Capturing the payment is what triggers the installment payment schedule for the shopper. If you do not capture the payment within 28 days, the authorization will expire.\nIf for any reason you need to capture a lesser amount than what was authorised, you need to issue a refund for the difference after the capture. For example, a customer purchases two items of USD&nbsp;500 each, totaling USD&nbsp;1,000, but only one is fulfilled. After capturing USD&nbsp;1,000, you should issue a subsequent refund for the unfulfilled item of USD&nbsp;500.\nTest and go live\nTo receive your test credentials, contact Affirm. After reviewing your test transactions, Affirm will provide you with the credentials for processing live transactions.\n\nYou can check the status of the test payments in your test Customer Area &gt; Transactions &gt; Payments.\n\nBefore you can accept live Affirm payments, you need to submit a request for Affirm in your live Customer Area, and provide us with your Affirm live credentials.\nSee also\n\n\n                    iOS Components integration guide\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"Affirm","lvl3":"Affirm iOS Component 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\/affirm","lvl3":"\/pt\/payment-methods\/affirm\/ios-component"},"levels":4,"category":"Payment method","category_color":"green","tags":["Affirm","Component","integration"]}}
