{"title":"PayPal Drop-in integration","category":"default","creationDate":1776961628,"content":"<p>This page explains how to add PayPal to your existing Web Drop-in integration.<\/p>\n<div class=\"notices blue\">\n<p>The PayPal Smart Payment Buttons are available from Drop-in <div data-component-wrapper=\"tag\">\n    <tag :variant=&quot;success&quot;>\n        v 3.7.0\n    <\/tag>\n<\/div>\n and later.<\/p>\n<\/div>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have built your <a href=\"\/pt\/online-payments\/build-your-integration\/sessions-flow?platform=Web&amp;integration=Drop-in%2F%3Ftarget%3D_blank\">Drop-in integration<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin, complete the <a href=\"\/pt\/payment-methods\/paypal\/setup-paypal-direct-merchants\">PayPal setup steps<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>API reference<\/h2>\n<p>Select which endpoint you are using:<\/p>\n\n<div id=\"tabU2rBV\">\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=Web&amp;amp;integration=Drop-in\\&quot;&gt;Drop-in v5.0.0&lt;\\\/a&gt; or later.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Parameter name&lt;\\\/th&gt;\\n&lt;th style=\\&quot;text-align: center;\\&quot;&gt;Required&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-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. For each item, you only need to send &lt;code&gt;quantity&lt;\\\/code&gt;, &lt;code&gt;description&lt;\\\/code&gt;, &lt;code&gt;itemCategory&lt;\\\/code&gt;, &lt;code&gt;sku&lt;\\\/code&gt;, &lt;code&gt;amountExcludingTax&lt;\\\/code&gt;, and &lt;code&gt;taxAmount&lt;\\\/code&gt;. &lt;br&gt; The allowed values for &lt;code&gt;itemCategory&lt;\\\/code&gt; are: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;DIGITAL_GOODS&lt;\\\/strong&gt;: goods that are stored, delivered, and used in electronic format.&lt;\\\/li&gt; &lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;PHYSICAL_GOODS&lt;\\\/strong&gt;: tangible goods that can be shipped with proof of delivery.&lt;\\\/li&gt; &lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;DONATION&lt;\\\/strong&gt;: a contribution or gift for which no goods or services are exchanged, usually to a not-for-profit organization.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;additionalData.paypalPairingId&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td&gt; &lt;strong&gt;Only for customer-initiated transactions where you use the Fraudnet SDK and pass the same pairing ID to Fraudnet and Adyen.&lt;\\\/strong&gt; &lt;br&gt; A unique ID determined by you, to link a transaction to a Fraudnet PayPal risk session.  &lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; PayPal refers to this ID as &lt;em&gt;pairing ID&lt;\\\/em&gt;, &lt;em&gt;CMID&lt;\\\/em&gt;, or &lt;em&gt;tracking ID&lt;\\\/em&gt;.&lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;additionalData.paypalRisk&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;strong&gt;Only for marketplaces and for merchants in specific verticals.&lt;\\\/strong&gt; &lt;br&gt;The &lt;a href=\\&quot;#paypal-risk-fields\\&quot;&gt;PayPal risk fields&lt;\\\/a&gt; that PayPal told you to send. You must include these fields in an &lt;code&gt;additional_data&lt;\\\/code&gt; array and send this in &lt;a href=\\&quot;#risk-fields-formatting\\&quot;&gt;stringified format&lt;\\\/a&gt;. &lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; Contact your PayPal account manager to learn which &lt;code&gt;paypalRisk&lt;\\\/code&gt; fields apply in your case and what happens if you do not populate a specific field. For a list of example fields, refer to the &lt;a href=\\&quot;#risk-field-marketplaces\\&quot;&gt;common risk fields for marketplaces&lt;\\\/a&gt;. &lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;The following example shows a payment request with the &lt;code&gt;lineItems&lt;\\\/code&gt; fields you can use for PayPal, and a few &lt;code&gt;paypalRisk&lt;\\\/code&gt; keys and values in &lt;code&gt;additionalData&lt;\\\/code&gt;.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;paypal-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\\\\\\\/v71\\\\\\\/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;ADYEN_MERCHANT_ACCOUNT\\\\&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;: 1000\\\\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;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [\\\\n    {\\\\n      \\\\&amp;quot;quantity\\\\&amp;quot;: 1,\\\\n      \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n      \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n      \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n      \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 590,\\\\n      \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n    },\\\\n    {\\\\n      \\\\&amp;quot;quantity\\\\&amp;quot;: 3,\\\\n      \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n      \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n      \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n      \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 90,\\\\n      \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n    }\\\\n  ],\\\\n  \\\\&amp;quot;additionalData\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;{\\\\\\\\\\\\&amp;quot;additional_data\\\\\\\\\\\\&amp;quot;:[{\\\\\\\\\\\\&amp;quot;key\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;sender_first_name\\\\\\\\\\\\&amp;quot;,\\\\\\\\\\\\&amp;quot;value\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;Simon\\\\\\\\\\\\&amp;quot;},{\\\\\\\\\\\\&amp;quot;key\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;sender_last_name\\\\\\\\\\\\&amp;quot;,\\\\\\\\\\\\&amp;quot;value\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;Hopper\\\\\\\\\\\\&amp;quot;},{\\\\\\\\\\\\&amp;quot;key\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;receiver_account_id\\\\\\\\\\\\&amp;quot;,\\\\\\\\\\\\&amp;quot;value\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;AH00000000000000000000001\\\\\\\\\\\\&amp;quot;}]}\\\\&amp;quot;\\\\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 v27.0.0\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.model.checkout.*;\\\\nimport java.time.OffsetDateTime;\\\\nimport java.util.*;\\\\nimport com.adyen.model.RequestOptions;\\\\nimport com.adyen.service.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nLineItem lineItem1 = new LineItem()\\\\n  .quantity(1L)\\\\n  .itemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  .amountExcludingTax(590L)\\\\n  .description(\\\\&amp;quot;Red Shoes\\\\&amp;quot;)\\\\n  .sku(\\\\&amp;quot;ABC123\\\\&amp;quot;)\\\\n  .taxAmount(10L);\\\\n\\\\nLineItem lineItem2 = new LineItem()\\\\n  .quantity(3L)\\\\n  .itemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  .amountExcludingTax(90L)\\\\n  .description(\\\\&amp;quot;Polkadot Socks\\\\&amp;quot;)\\\\n  .sku(\\\\&amp;quot;DEF234\\\\&amp;quot;)\\\\n  .taxAmount(10L);\\\\n\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  .value(1000L);\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;)\\\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\\\n  .amount(amount)\\\\n  .merchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .additionalData(new HashMap&amp;lt;String, String&amp;gt;(Map.of(\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;, \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;\\\\n  )))\\\\n  .returnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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;\\\\\\\/\\\\\\\/ Adyen PHP API Library v19.0.0\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\LineItem;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\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, additionally 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;setItemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountExcludingTax(590)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Red Shoes\\\\&amp;quot;)\\\\n  -&amp;gt;setSku(\\\\&amp;quot;ABC123\\\\&amp;quot;)\\\\n  -&amp;gt;setTaxAmount(10);\\\\n\\\\n$lineItem2 = new LineItem();\\\\n$lineItem2\\\\n  -&amp;gt;setQuantity(3)\\\\n  -&amp;gt;setItemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountExcludingTax(90)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Polkadot Socks\\\\&amp;quot;)\\\\n  -&amp;gt;setSku(\\\\&amp;quot;DEF234\\\\&amp;quot;)\\\\n  -&amp;gt;setTaxAmount(10);\\\\n\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(1000);\\\\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;setMerchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setAdditionalData(\\\\n    array(\\\\n      \\\\&amp;quot;paypalRisk\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;\\\\n    )\\\\n  )\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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 v17.0.0\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&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  ItemCategory = \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  AmountExcludingTax = 590,\\\\n  Description = \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n  Sku = \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n  TaxAmount = 10\\\\n};\\\\n\\\\nLineItem lineItem2 = new LineItem\\\\n{\\\\n  Quantity = 3,\\\\n  ItemCategory = \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  AmountExcludingTax = 90,\\\\n  Description = \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n  Sku = \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n  TaxAmount = 10\\\\n};\\\\n\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value = 1000\\\\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  MerchantAccount = \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  AdditionalData = new Dictionary&amp;lt;string, string&amp;gt;\\\\n  {\\\\n\\\\n    { \\\\&amp;quot;paypalRisk\\\\&amp;quot;, \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot; }\\\\n  },\\\\n  ReturnUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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 v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst createCheckoutSessionRequest = {\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  amount: {\\\\n    currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n    value: 1000\\\\n  },\\\\n  shopperReference: \\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;,\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  lineItems: [ {\\\\n    quantity: 1,\\\\n    description: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n    itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    sku: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n    amountExcludingTax: 590,\\\\n    taxAmount: 10\\\\n  }, {\\\\n    quantity: 3,\\\\n    description: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n    itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    sku: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n    amountExcludingTax: 90,\\\\n    taxAmount: 10\\\\n  } ],\\\\n  additionalData: {\\\\n    paypalRisk: \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&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 v10.4.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally 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  ItemCategory: common.PtrString(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;),\\\\n  AmountExcludingTax: common.PtrInt64(590),\\\\n  Description: common.PtrString(\\\\&amp;quot;Red Shoes\\\\&amp;quot;),\\\\n  Sku: common.PtrString(\\\\&amp;quot;ABC123\\\\&amp;quot;),\\\\n  TaxAmount: common.PtrInt64(10),\\\\n}\\\\n\\\\nlineItem2 := checkout.LineItem{\\\\n  Quantity: common.PtrInt64(3),\\\\n  ItemCategory: common.PtrString(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;),\\\\n  AmountExcludingTax: common.PtrInt64(90),\\\\n  Description: common.PtrString(\\\\&amp;quot;Polkadot Socks\\\\&amp;quot;),\\\\n  Sku: common.PtrString(\\\\&amp;quot;DEF234\\\\&amp;quot;),\\\\n  TaxAmount: common.PtrInt64(10),\\\\n}\\\\n\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value: 1000,\\\\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  MerchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  AdditionalData: &amp;amp;map[string]string{\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;,\\\\n  },\\\\n  ReturnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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 v12.5.1\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the live environment, additionally 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;ADYEN_MERCHANT_ACCOUNT\\\\&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;: 1000\\\\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;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: 1,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 590,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n  }, {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: 3,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n    \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 90,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n  } ],\\\\n  \\\\&amp;quot;additionalData\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;{\\\\&amp;quot;additional_data\\\\&amp;quot;:[{\\\\&amp;quot;key\\\\&amp;quot;:\\\\&amp;quot;sender_first_name\\\\&amp;quot;,\\\\&amp;quot;value\\\\&amp;quot;:\\\\&amp;quot;Simon\\\\&amp;quot;},{\\\\&amp;quot;key\\\\&amp;quot;:\\\\&amp;quot;sender_last_name\\\\&amp;quot;,\\\\&amp;quot;value\\\\&amp;quot;:\\\\&amp;quot;Hopper\\\\&amp;quot;},{\\\\&amp;quot;key\\\\&amp;quot;:\\\\&amp;quot;receiver_account_id\\\\&amp;quot;,\\\\&amp;quot;value\\\\&amp;quot;:\\\\&amp;quot;AH00000000000000000000001\\\\&amp;quot;}]}\\\\&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 v9.5.1\\\\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, additionally 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;ADYEN_MERCHANT_ACCOUNT&#039;,\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; &#039;USD&#039;,\\\\n    :value =&amp;gt; 1000\\\\n  },\\\\n  :shopperReference =&amp;gt; &#039;YOUR_UNIQUE_SHOPPER_ID&#039;,\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_NUMBER&#039;,\\\\n  :returnUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..&#039;,\\\\n  :lineItems =&amp;gt; [ {\\\\n    :quantity =&amp;gt; 1,\\\\n    :description =&amp;gt; &#039;Red Shoes&#039;,\\\\n    :itemCategory =&amp;gt; &#039;PHYSICAL_GOODS&#039;,\\\\n    :sku =&amp;gt; &#039;ABC123&#039;,\\\\n    :amountExcludingTax =&amp;gt; 590,\\\\n    :taxAmount =&amp;gt; 10\\\\n  }, {\\\\n    :quantity =&amp;gt; 3,\\\\n    :description =&amp;gt; &#039;Polkadot Socks&#039;,\\\\n    :itemCategory =&amp;gt; &#039;PHYSICAL_GOODS&#039;,\\\\n    :sku =&amp;gt; &#039;DEF234&#039;,\\\\n    :amountExcludingTax =&amp;gt; 90,\\\\n    :taxAmount =&amp;gt; 10\\\\n  } ],\\\\n  :additionalData =&amp;gt; {\\\\n    :paypalRisk =&amp;gt; &#039;{:additional_data =&amp;gt; [{:key =&amp;gt; &#039;sender_first_name&#039;,:value =&amp;gt; &#039;Simon&#039;},{:key =&amp;gt; &#039;sender_last_name&#039;,:value =&amp;gt; &#039;Hopper&#039;},{:key =&amp;gt; &#039;receiver_account_id&#039;,:value =&amp;gt; &#039;AH00000000000000000000001&#039;}]}&#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 v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst lineItem1: Types.checkout.LineItem = {\\\\n  quantity: 1,\\\\n  itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  amountExcludingTax: 590,\\\\n  description: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n  sku: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n  taxAmount: 10\\\\n};\\\\n\\\\nconst lineItem2: Types.checkout.LineItem = {\\\\n  quantity: 3,\\\\n  itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  amountExcludingTax: 90,\\\\n  description: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n  sku: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n  taxAmount: 10\\\\n};\\\\n\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  value: 1000\\\\n};\\\\n\\\\nconst createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  lineItems: [lineItem1, lineItem2],\\\\n  amount: amount,\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  additionalData: {\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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;pp-risk-sessions_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-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. For each item, you only need to send &lt;code&gt;quantity&lt;\\\/code&gt;, &lt;code&gt;description&lt;\\\/code&gt;, &lt;code&gt;itemCategory&lt;\\\/code&gt;, &lt;code&gt;sku&lt;\\\/code&gt;, &lt;code&gt;amountExcludingTax&lt;\\\/code&gt;, and &lt;code&gt;taxAmount&lt;\\\/code&gt;. &lt;br&gt; The allowed values for &lt;code&gt;itemCategory&lt;\\\/code&gt; are: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;DIGITAL_GOODS&lt;\\\/strong&gt;: goods that are stored, delivered, and used in electronic format.&lt;\\\/li&gt; &lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;PHYSICAL_GOODS&lt;\\\/strong&gt;: tangible goods that can be shipped with proof of delivery.&lt;\\\/li&gt; &lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;DONATION&lt;\\\/strong&gt;: a contribution or gift for which no goods or services are exchanged, usually to a not-for-profit organization.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;additionalData.paypalPairingId&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td&gt; &lt;strong&gt;Only for customer-initiated transactions where you use the Fraudnet SDK and pass the same pairing ID to Fraudnet and Adyen.&lt;\\\/strong&gt; &lt;br&gt; A unique ID determined by you, to link a transaction to a Fraudnet PayPal risk session.  &lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; PayPal refers to this ID as &lt;em&gt;pairing ID&lt;\\\/em&gt;, &lt;em&gt;CMID&lt;\\\/em&gt;, or &lt;em&gt;tracking ID&lt;\\\/em&gt;.&lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;additionalData.paypalRisk&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td style=\\&quot;text-align: center;\\&quot;&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;strong&gt;Only for marketplaces as well as merchants in specific verticals.&lt;\\\/strong&gt; &lt;br&gt;The &lt;a href=\\&quot;#paypal-risk-fields\\&quot;&gt;PayPal risk fields&lt;\\\/a&gt; that PayPal told you to send. You must include these fields in an &lt;code&gt;additional_data&lt;\\\/code&gt; array and send this in &lt;a href=\\&quot;#risk-fields-formatting\\&quot;&gt;stringified format&lt;\\\/a&gt;. &lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; Contact your PayPal account manager to learn which &lt;code&gt;paypalRisk&lt;\\\/code&gt; fields apply in your case and what happens if you do not populate a specific field. For a list of example fields, refer to the &lt;a href=\\&quot;#risk-field-marketplaces\\&quot;&gt;common risk fields for marketplaces&lt;\\\/a&gt;. &lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;The following example shows a payment request with the &lt;code&gt;lineItems&lt;\\\/code&gt; fields you can use for PayPal, and a few &lt;code&gt;paypalRisk&lt;\\\/code&gt; keys and values in &lt;code&gt;additionalData&lt;\\\/code&gt;.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;paypal-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\\\\\\\/v72\\\\\\\/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;ADYEN_MERCHANT_ACCOUNT\\\\&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;: 1000\\\\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;paypal\\\\&amp;quot;,\\\\n    \\\\&amp;quot;subtype\\\\&amp;quot;: \\\\&amp;quot;sdk\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [\\\\n    {\\\\n      \\\\&amp;quot;quantity\\\\&amp;quot;: 1,\\\\n      \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n      \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n      \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n      \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 590,\\\\n      \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n    },\\\\n    {\\\\n      \\\\&amp;quot;quantity\\\\&amp;quot;: 3,\\\\n      \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n      \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n      \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n      \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 90,\\\\n      \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n    }\\\\n  ],\\\\n  \\\\&amp;quot;additionalData\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;{\\\\\\\\\\\\&amp;quot;additional_data\\\\\\\\\\\\&amp;quot;:[{\\\\\\\\\\\\&amp;quot;key\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;sender_first_name\\\\\\\\\\\\&amp;quot;,\\\\\\\\\\\\&amp;quot;value\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;Simon\\\\\\\\\\\\&amp;quot;},{\\\\\\\\\\\\&amp;quot;key\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;sender_last_name\\\\\\\\\\\\&amp;quot;,\\\\\\\\\\\\&amp;quot;value\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;Hopper\\\\\\\\\\\\&amp;quot;},{\\\\\\\\\\\\&amp;quot;key\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;receiver_account_id\\\\\\\\\\\\&amp;quot;,\\\\\\\\\\\\&amp;quot;value\\\\\\\\\\\\&amp;quot;:\\\\\\\\\\\\&amp;quot;AH00000000000000000000001\\\\\\\\\\\\&amp;quot;}]}\\\\&amp;quot;\\\\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 v27.0.0\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.model.checkout.*;\\\\nimport java.time.OffsetDateTime;\\\\nimport java.util.*;\\\\nimport com.adyen.model.RequestOptions;\\\\nimport com.adyen.service.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nLineItem lineItem1 = new LineItem()\\\\n  .quantity(1L)\\\\n  .itemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  .amountExcludingTax(590L)\\\\n  .description(\\\\&amp;quot;Red Shoes\\\\&amp;quot;)\\\\n  .sku(\\\\&amp;quot;ABC123\\\\&amp;quot;)\\\\n  .taxAmount(10L);\\\\n\\\\nLineItem lineItem2 = new LineItem()\\\\n  .quantity(3L)\\\\n  .itemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  .amountExcludingTax(90L)\\\\n  .description(\\\\&amp;quot;Polkadot Socks\\\\&amp;quot;)\\\\n  .sku(\\\\&amp;quot;DEF234\\\\&amp;quot;)\\\\n  .taxAmount(10L);\\\\n\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  .value(1000L);\\\\n\\\\nPayPalDetails payPalDetails = new PayPalDetails()\\\\n  .subtype(PayPalDetails.SubtypeEnum.SDK)\\\\n  .type(PayPalDetails.TypeEnum.PAYPAL);\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;)\\\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\\\n  .amount(amount)\\\\n  .merchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .paymentMethod(new CheckoutPaymentMethod(payPalDetails))\\\\n  .additionalData(new HashMap&amp;lt;String, String&amp;gt;(Map.of(\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;, \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;\\\\n  )))\\\\n  .returnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;)\\\\n  .shopperReference(\\\\&amp;quot;YOUR_UNIQUE_SHOPPER_ID\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nPaymentsApi service = new PaymentsApi(client);\\\\nPaymentResponse response = service.payments(paymentRequest, 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;\\\\\\\/\\\\\\\/ Adyen PHP API Library v19.0.0\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\LineItem;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CheckoutPaymentMethod;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\PaymentRequest;\\\\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, additionally 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;setItemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountExcludingTax(590)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Red Shoes\\\\&amp;quot;)\\\\n  -&amp;gt;setSku(\\\\&amp;quot;ABC123\\\\&amp;quot;)\\\\n  -&amp;gt;setTaxAmount(10);\\\\n\\\\n$lineItem2 = new LineItem();\\\\n$lineItem2\\\\n  -&amp;gt;setQuantity(3)\\\\n  -&amp;gt;setItemCategory(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;)\\\\n  -&amp;gt;setAmountExcludingTax(90)\\\\n  -&amp;gt;setDescription(\\\\&amp;quot;Polkadot Socks\\\\&amp;quot;)\\\\n  -&amp;gt;setSku(\\\\&amp;quot;DEF234\\\\&amp;quot;)\\\\n  -&amp;gt;setTaxAmount(10);\\\\n\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(1000);\\\\n\\\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\\\n$checkoutPaymentMethod\\\\n  -&amp;gt;setSubtype(\\\\&amp;quot;sdk\\\\&amp;quot;)\\\\n  -&amp;gt;setType(\\\\&amp;quot;paypal\\\\&amp;quot;);\\\\n\\\\n$paymentRequest = new PaymentRequest();\\\\n$paymentRequest\\\\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;setMerchantAccount(\\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setPaymentMethod($checkoutPaymentMethod)\\\\n  -&amp;gt;setAdditionalData(\\\\n    array(\\\\n      \\\\&amp;quot;paypalRisk\\\\&amp;quot; =&amp;gt; \\\\&amp;quot;STATE_DATA\\\\&amp;quot;\\\\n    )\\\\n  )\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;)\\\\n  -&amp;gt;setShopperReference(\\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&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;payments($paymentRequest, $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 v17.0.0\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&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  ItemCategory = \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  AmountExcludingTax = 590,\\\\n  Description = \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n  Sku = \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n  TaxAmount = 10\\\\n};\\\\n\\\\nLineItem lineItem2 = new LineItem\\\\n{\\\\n  Quantity = 3,\\\\n  ItemCategory = \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  AmountExcludingTax = 90,\\\\n  Description = \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n  Sku = \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n  TaxAmount = 10\\\\n};\\\\n\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value = 1000\\\\n};\\\\n\\\\nPayPalDetails payPalDetails = new PayPalDetails\\\\n{\\\\n  Subtype = PayPalDetails.SubtypeEnum.Sdk,\\\\n  Type = PayPalDetails.TypeEnum.Paypal\\\\n};\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest\\\\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  MerchantAccount = \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  PaymentMethod = new CheckoutPaymentMethod(payPalDetails),\\\\n  AdditionalData = new Dictionary&amp;lt;string, string&amp;gt;\\\\n  {\\\\n\\\\n    { \\\\&amp;quot;paypalRisk\\\\&amp;quot;, \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot; }\\\\n  },\\\\n  ReturnUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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.Payments(paymentRequest, 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 v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst paymentRequest = {\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  amount: {\\\\n    currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n    value: 1000\\\\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;paypal\\\\&amp;quot;,\\\\n    subtype: \\\\&amp;quot;sdk\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  lineItems: [ {\\\\n    quantity: 1,\\\\n    description: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n    itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    sku: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n    amountExcludingTax: 590,\\\\n    taxAmount: 10\\\\n  }, {\\\\n    quantity: 3,\\\\n    description: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n    itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    sku: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n    amountExcludingTax: 90,\\\\n    taxAmount: 10\\\\n  } ],\\\\n  additionalData: {\\\\n    paypalRisk: \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;\\\\n  }\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send 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;go&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Go&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Go API Library v10.4.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally 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  ItemCategory: common.PtrString(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;),\\\\n  AmountExcludingTax: common.PtrInt64(590),\\\\n  Description: common.PtrString(\\\\&amp;quot;Red Shoes\\\\&amp;quot;),\\\\n  Sku: common.PtrString(\\\\&amp;quot;ABC123\\\\&amp;quot;),\\\\n  TaxAmount: common.PtrInt64(10),\\\\n}\\\\n\\\\nlineItem2 := checkout.LineItem{\\\\n  Quantity: common.PtrInt64(3),\\\\n  ItemCategory: common.PtrString(\\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;),\\\\n  AmountExcludingTax: common.PtrInt64(90),\\\\n  Description: common.PtrString(\\\\&amp;quot;Polkadot Socks\\\\&amp;quot;),\\\\n  Sku: common.PtrString(\\\\&amp;quot;DEF234\\\\&amp;quot;),\\\\n  TaxAmount: common.PtrInt64(10),\\\\n}\\\\n\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value: 1000,\\\\n}\\\\n\\\\npayPalDetails := checkout.PayPalDetails{\\\\n  Subtype: common.PtrString(\\\\&amp;quot;sdk\\\\&amp;quot;),\\\\n  Type: \\\\&amp;quot;paypal\\\\&amp;quot;,\\\\n}\\\\n\\\\npaymentRequest := checkout.PaymentRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  LineItems: []checkout.LineItem{\\\\n      lineItem1, lineItem2,\\\\n  },\\\\n  Amount: amount,\\\\n  MerchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  PaymentMethod: checkout.PayPalDetailsAsCheckoutPaymentMethod(&amp;amp;payPalDetails),\\\\n  AdditionalData: &amp;amp;map[string]string{\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;,\\\\n  },\\\\n  ReturnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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.PaymentsInput().IdempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;).PaymentRequest(paymentRequest)\\\\nres, httpRes, err := service.PaymentsApi.Payments(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 v12.5.1\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the live environment, additionally 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;ADYEN_MERCHANT_ACCOUNT\\\\&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;: 1000\\\\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;paypal\\\\&amp;quot;,\\\\n    \\\\&amp;quot;subtype\\\\&amp;quot;: \\\\&amp;quot;sdk\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;lineItems\\\\&amp;quot;: [ {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: 1,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n    \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 590,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n  }, {\\\\n    \\\\&amp;quot;quantity\\\\&amp;quot;: 3,\\\\n    \\\\&amp;quot;description\\\\&amp;quot;: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n    \\\\&amp;quot;itemCategory\\\\&amp;quot;: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n    \\\\&amp;quot;sku\\\\&amp;quot;: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n    \\\\&amp;quot;amountExcludingTax\\\\&amp;quot;: 90,\\\\n    \\\\&amp;quot;taxAmount\\\\&amp;quot;: 10\\\\n  } ],\\\\n  \\\\&amp;quot;additionalData\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;paypalRisk\\\\&amp;quot;: \\\\&amp;quot;{\\\\&amp;quot;additional_data\\\\&amp;quot;:[{\\\\&amp;quot;key\\\\&amp;quot;:\\\\&amp;quot;sender_first_name\\\\&amp;quot;,\\\\&amp;quot;value\\\\&amp;quot;:\\\\&amp;quot;Simon\\\\&amp;quot;},{\\\\&amp;quot;key\\\\&amp;quot;:\\\\&amp;quot;sender_last_name\\\\&amp;quot;,\\\\&amp;quot;value\\\\&amp;quot;:\\\\&amp;quot;Hopper\\\\&amp;quot;},{\\\\&amp;quot;key\\\\&amp;quot;:\\\\&amp;quot;receiver_account_id\\\\&amp;quot;,\\\\&amp;quot;value\\\\&amp;quot;:\\\\&amp;quot;AH00000000000000000000001\\\\&amp;quot;}]}\\\\&amp;quot;\\\\n  }\\\\n}\\\\n\\\\n# Send the request\\\\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.5.1\\\\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, additionally 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;ADYEN_MERCHANT_ACCOUNT&#039;,\\\\n  :amount =&amp;gt; {\\\\n    :currency =&amp;gt; &#039;USD&#039;,\\\\n    :value =&amp;gt; 1000\\\\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;paypal&#039;,\\\\n    :subtype =&amp;gt; &#039;sdk&#039;\\\\n  },\\\\n  :returnUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..&#039;,\\\\n  :lineItems =&amp;gt; [ {\\\\n    :quantity =&amp;gt; 1,\\\\n    :description =&amp;gt; &#039;Red Shoes&#039;,\\\\n    :itemCategory =&amp;gt; &#039;PHYSICAL_GOODS&#039;,\\\\n    :sku =&amp;gt; &#039;ABC123&#039;,\\\\n    :amountExcludingTax =&amp;gt; 590,\\\\n    :taxAmount =&amp;gt; 10\\\\n  }, {\\\\n    :quantity =&amp;gt; 3,\\\\n    :description =&amp;gt; &#039;Polkadot Socks&#039;,\\\\n    :itemCategory =&amp;gt; &#039;PHYSICAL_GOODS&#039;,\\\\n    :sku =&amp;gt; &#039;DEF234&#039;,\\\\n    :amountExcludingTax =&amp;gt; 90,\\\\n    :taxAmount =&amp;gt; 10\\\\n  } ],\\\\n  :additionalData =&amp;gt; {\\\\n    :paypalRisk =&amp;gt; &#039;{:additional_data =&amp;gt; [{:key =&amp;gt; &#039;sender_first_name&#039;,:value =&amp;gt; &#039;Simon&#039;},{:key =&amp;gt; &#039;sender_last_name&#039;,:value =&amp;gt; &#039;Hopper&#039;},{:key =&amp;gt; &#039;receiver_account_id&#039;,:value =&amp;gt; &#039;AH00000000000000000000001&#039;}]}&#039;\\\\n  }\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(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 v18.0.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst lineItem1: Types.checkout.LineItem = {\\\\n  quantity: 1,\\\\n  itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  amountExcludingTax: 590,\\\\n  description: \\\\&amp;quot;Red Shoes\\\\&amp;quot;,\\\\n  sku: \\\\&amp;quot;ABC123\\\\&amp;quot;,\\\\n  taxAmount: 10\\\\n};\\\\n\\\\nconst lineItem2: Types.checkout.LineItem = {\\\\n  quantity: 3,\\\\n  itemCategory: \\\\&amp;quot;PHYSICAL_GOODS\\\\&amp;quot;,\\\\n  amountExcludingTax: 90,\\\\n  description: \\\\&amp;quot;Polkadot Socks\\\\&amp;quot;,\\\\n  sku: \\\\&amp;quot;DEF234\\\\&amp;quot;,\\\\n  taxAmount: 10\\\\n};\\\\n\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  value: 1000\\\\n};\\\\n\\\\nconst payPalDetails: Types.checkout.PayPalDetails = {\\\\n  subtype: Types.checkout.PayPalDetails.SubtypeEnum.Sdk,\\\\n  type: Types.checkout.PayPalDetails.TypeEnum.Paypal\\\\n};\\\\n\\\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_NUMBER\\\\&amp;quot;,\\\\n  lineItems: [lineItem1, lineItem2],\\\\n  amount: amount,\\\\n  merchantAccount: \\\\&amp;quot;ADYEN_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  paymentMethod: payPalDetails,\\\\n  additionalData: {\\\\n      paypalRisk: \\\\&amp;quot;STRINGIFIED_ADDITIONAL_DATA_ARRAY\\\\&amp;quot;\\\\n  },\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&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.payments(paymentRequest, { 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;payments-integration&quot;,&quot;oldTabId&quot;:&quot;pp-risk-payments_2&quot;,&quot;relation&quot;:&quot;payments-integration&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h3>Amounts in Hungarian Forints (HUF)<\/h3>\n<p>In case of a transaction in HUF, PayPal expects the transaction amount and the line item amounts to be rounded to the nearest whole amount. For example, an amount of HUF&nbsp;74499 must be rounded to HUF&nbsp;74500. PayPal also expects the rounded line item amounts to add up to the rounded transaction amount. <\/p>\n<p>If you do not round the amounts, Adyen will do that. However, a discrepancy can occur between the transaction amount and the total of the line item amounts. When this happens, PayPal doesn't accept the transaction. To avoid that problem, we recommend that you round all HUF amounts yourself and check that they add up.<\/p>\n<h3>PayPal risk fields<\/h3>\n<p>PayPal requires <em>marketplaces<\/em> and also merchants in <em>specific verticals<\/em> to send information about the context of the transaction, for risk mitigation purposes.<\/p>\n<p><div class=\"sc-notice note\"><div>Not all businesses need to send risk fields. Contact your PayPal account manager to verify.<\/div><\/div><\/p>\n<h4 id=\"risk-field-marketplaces\">Common PayPal risk fields for marketplaces<\/h4>\n<p>As an example, the following table shows the most common <code>paypalRisk<\/code> fields that marketplaces need to send. It is possible that PayPal requires you to send more, less, or other fields.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">PayPal risk field<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<th style=\"text-align: left;\">Data type\/format<\/th>\n<th style=\"text-align: left;\">Example<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Sender profile<\/strong>  fields:<\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_account_id<\/td>\n<td style=\"text-align: left;\">The unique identifier of the buyer's account on the marketplace platform.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\">A12345N343<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_first_name<\/td>\n<td style=\"text-align: left;\">The buyer's first name registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\">John<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_last_name<\/td>\n<td style=\"text-align: left;\">The buyer's last name registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\">Smith<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_email<\/td>\n<td style=\"text-align: left;\">The buyer's email address registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String in <a href=\"https:\/\/en.wikipedia.org\/wiki\/E.123\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">E.123<\/a> email address format<\/td>\n<td style=\"text-align: left;\">john.smith@email.com<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_phone<\/td>\n<td style=\"text-align: left;\">The buyer's phone number registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String in <a href=\"https:\/\/en.wikipedia.org\/wiki\/E.123\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">E.123<\/a> telephone number format, national notation<\/td>\n<td style=\"text-align: left;\">0687164125<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_address_zip<\/td>\n<td style=\"text-align: left;\"><strong>US only<\/strong>. The buyer's postal code registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\">60661<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_country_code<\/td>\n<td style=\"text-align: left;\">The buyer's country registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String in two-character <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO-3166-1<\/a> alpha-2 country code format. Exception: <em>QZ<\/em> (Kosovo).<\/td>\n<td style=\"text-align: left;\">US<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_create_date<\/td>\n<td style=\"text-align: left;\">The date that the buyer's marketplace account was created.<\/td>\n<td style=\"text-align: left;\">String in <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_8601\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO 8601<\/a> date format<\/td>\n<td style=\"text-align: left;\">2012-12-09T19:14:55.277-0:00<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_signup_ip<\/td>\n<td style=\"text-align: left;\">The IP address that the buyer used when signing up on the marketplace platform.<\/td>\n<td style=\"text-align: left;\">String in IPv4 or IPv6 format<\/td>\n<td style=\"text-align: left;\">213.52.172.120<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">sender_popularity_score<\/td>\n<td style=\"text-align: left;\">If you need to provide this field, ask your PayPal account manager for instructions.<\/td>\n<td style=\"text-align: left;\">String, possible values: <strong>high<\/strong>, <strong>medium<\/strong>, <strong>low<\/strong><\/td>\n<td style=\"text-align: left;\">high<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Receiver profile<\/strong> fields:<\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">receiver_account_id<\/td>\n<td style=\"text-align: left;\">The unique identifier of the seller's account on the marketplace platform.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\">AH00000000000000000000001<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">receiver_create_date<\/td>\n<td style=\"text-align: left;\">The date that the seller's marketplace account was created.<\/td>\n<td style=\"text-align: left;\">String in <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_8601\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO 8601<\/a> date format<\/td>\n<td style=\"text-align: left;\">2012-12-09T19:14:55.277-0:00<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">receiver_email<\/td>\n<td style=\"text-align: left;\">The seller's email address registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String in <a href=\"https:\/\/en.wikipedia.org\/wiki\/E.123\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">E.123<\/a> email address format<\/td>\n<td style=\"text-align: left;\">john.smith@email.com<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">receiver_address_country_code<\/td>\n<td style=\"text-align: left;\">The seller's country registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String in two-character <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_3166-1_alpha-2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO-3166-1<\/a> alpha-2 country code format. Exception: <strong>QZ<\/strong> (Kosovo).<\/td>\n<td style=\"text-align: left;\">US<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">business_name<\/td>\n<td style=\"text-align: left;\">The seller's business name registered with their marketplace account.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">recipient_popularity_score<\/td>\n<td style=\"text-align: left;\">If you need to provide this field, ask your PayPal account manager for instructions.<\/td>\n<td style=\"text-align: left;\">String, possible values: <strong>high<\/strong>, <strong>medium<\/strong>, <strong>low<\/strong><\/td>\n<td style=\"text-align: left;\">high<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Sender-Receiver interaction<\/strong>:<\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">first_interaction_date<\/td>\n<td style=\"text-align: left;\">The date of the first interaction between the buyer and the seller. The marketplace defines what an <em>interaction<\/em> is. For example, a payment transaction, a buyer choosing to follow a seller, and so on.<\/td>\n<td style=\"text-align: left;\">String in <a href=\"https:\/\/en.wikipedia.org\/wiki\/ISO_8601\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">ISO 8601<\/a> date format<\/td>\n<td style=\"text-align: left;\">2012-12-09T19:14:55.277-0:00<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Transaction information<\/strong>:<\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">txn_count_total<\/td>\n<td style=\"text-align: left;\">The total number of transactions that the buyer has made on the platform. These can be PayPal payments, or payments using a different payment method.<\/td>\n<td style=\"text-align: left;\">Number<\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Payment Flow\/Model\/Type<\/strong>:<\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<td style=\"text-align: left;\"><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">vertical<\/td>\n<td style=\"text-align: left;\">If the seller is active in more than one business vertical, this field indicates the vertical that applies to the transaction.<\/td>\n<td style=\"text-align: left;\">String, alphanumeric<\/td>\n<td style=\"text-align: left;\">Household goods<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">transaction_is_tangible<\/td>\n<td style=\"text-align: left;\">Indicates if the transaction is for tangible goods.<\/td>\n<td style=\"text-align: left;\">Boolean in string format. Possible values: <strong>0<\/strong> (false), or <strong>1<\/strong> (true)<\/td>\n<td style=\"text-align: left;\">0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4 id=\"risk-fields-formatting\">Formatting<\/h4>\n<p>To send PayPal risk fields, you must use the <code>additionalData.paypalRisk<\/code> field, and specify the risk fields as a stringified <code>additional_data<\/code> array. Each array item consists of:<\/p>\n<ul>\n<li><code>key<\/code>: the name of the PayPal risk field.<\/li>\n<li><code>value<\/code>: the value of the PayPal risk field for the current transaction.<\/li>\n<\/ul>\n<p>Here is an example of the original array and the array in stringified format.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'additional_data array'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"additional_data\\\": [\\n    {\\n      \\\"key\\\": \\\"sender_first_name\\\",\\n      \\\"value\\\": \\\"Simon\\\"\\n    },\\n    {\\n      \\\"key\\\": \\\"sender_last_name\\\",\\n      \\\"value\\\": \\\"Hopper\\\"\\n    },\\n    {\\n      \\\"key\\\": \\\"receiver_account_id\\\",\\n      \\\"value\\\": \\\"AH00000000000000000000001\\\"\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Stringified array'\" :id=\"''\" :code-data='[{\"language\":\"sh\",\"tabTitle\":\"\",\"content\":\"\\\"{\\\\\\\"additional_data\\\\\\\":[{\\\\\\\"key\\\\\\\":\\\\\\\"sender_first_name\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"Simon\\\\\\\"},{\\\\\\\"key\\\\\\\":\\\\\\\"sender_last_name\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"Hopper\\\\\\\"},{\\\\\\\"key\\\\\\\":\\\\\\\"receiver_account_id\\\\\\\",\\\\\\\"value\\\\\\\":\\\\\\\"AH00000000000000000000001\\\\\\\"}]}\\\"\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Drop-in configuration<\/h2>\n<h3 id=\"required-config\">Required configuration<\/h3>\n<p>Select which endpoint you are using:<\/p>\n\n<div id=\"tabOrW9A\">\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=Web&amp;amp;integration=Drop-in\\&quot;&gt;Drop-in v5.0.0&lt;\\\/a&gt; or later. &lt;br&gt;&lt;\\\/p&gt;\\n&lt;p&gt;There is no additional configuration you need to include for PayPal.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions&quot;,&quot;oldTabId&quot;:&quot;config-sessions_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&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;code&gt;amount&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&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 &lt;code&gt;currency&lt;\\\/code&gt; and &lt;code&gt;value&lt;\\\/code&gt; of the transaction.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;countryCode&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s country\\\/region. This is used to filter the list of available payment methods to your shopper. &lt;br&gt;Format: the 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; country code. Exception: &lt;strong&gt;QZ&lt;\\\/strong&gt; (Kosovo).&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;Include the parameters when creating an object for the global configuration of your Drop-in integration.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&amp;lt;code&amp;gt;AdyenCheckout&amp;lt;\\\/code&amp;gt; configuration&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const configuration = {\\\\n    \\\\\\\/\\\\\\\/ ...  other required configuration\\\\n    environment: \\\\\\&quot;test\\\\\\&quot;, \\\\\\\/\\\\\\\/ Change this to \\\\\\&quot;live\\\\\\&quot; when you are ready to accept live PayPal payments.\\\\n    amount: {\\\\n        currency: \\\\\\&quot;EUR\\\\\\&quot;,\\\\n        value: 1000\\\\n    },\\\\n    countryCode: \\\\\\&quot;NL\\\\\\&quot; \\\\\\\/\\\\\\\/ Only needed for test. When live, this is retrieved automatically.\\\\n};\\&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&lt;h3&gt;Drop-in v3.13.0 or earlier&lt;\\\/h3&gt;\\n&lt;p&gt;For Drop-in v3.13.0 or earlier, you must also provide the following parameters in the payment method configuration.&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&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;code&gt;configuration.merchantId&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&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;Your PayPal Merchant ID.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;configuration.intent&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&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;Set to &lt;code&gt;authorize&lt;\\\/code&gt; if you do not want to immediately capture the funds. The default value is &lt;strong&gt;capture&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;The following example shows additional required configuration Drop-in if you are using v3.13.0 or earlier.&lt;\\\/p&gt;\\n&lt;pre&gt;&lt;code class=\\&quot;language-js\\&quot;&gt;const paypalConfiguration = {\\n    configuration: {\\n        merchantId: \\&quot;YOUR_PAYPAL_MERCHANT_ID\\&quot;,\\n        \\\/\\\/Your PayPal Merchant ID. To find your ID, see the page about setting up PayPal.\\n        intent: \\&quot;authorize\\&quot;\\n    }\\n};&lt;\\\/code&gt;&lt;\\\/pre&gt;\\n&lt;p&gt;Include the &lt;code&gt;paypalConfiguration&lt;\\\/code&gt; object  when &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow?platform=Web&amp;amp;integration=Drop-in#configure\\&quot;&gt;creating a configuration object&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;AdyenCheckout configuration&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const configuration = {\\\\n  \\\\\\\/\\\\\\\/ ...  other required configuration\\\\n  paymentMethodsConfiguration: {\\\\n    paypal: paypalConfiguration\\\\n  }\\\\n};\\&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&lt;p&gt;Pass the Drop-in configuration object when creating your instance of &lt;code&gt;AdyenCheckout&lt;\\\/code&gt;:&lt;\\\/p&gt;\\n&lt;pre&gt;&lt;code class=\\&quot;language-js\\&quot;&gt;const checkout = await AdyenCheckout(configuration);&lt;\\\/code&gt;&lt;\\\/pre&gt;\\n&quot;,&quot;altTitle&quot;:&quot;advanced&quot;,&quot;oldTabId&quot;:&quot;config-payments_2&quot;,&quot;relation&quot;:&quot;advanced&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<div class=\"notices green\">\n<p>Set <code>SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin-allow-popups'<\/code> in the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Reference\/Headers\/Cross-Origin-Opener-Policy\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">header of your web page<\/a> to ensure that important PayPal popups open.<\/p>\n<\/div>\n<h3 id=\"optional-config\">Optional configuration<\/h3>\n<p>When creating an instance of Drop-in, you can also:<\/p>\n<ul>\n<li><a href=\"#csp\">Add a Content Security Policy (CSP) nonce<\/a>.<\/li>\n<li><a href=\"#layout\">Customize the layout<\/a> of the PayPal Smart Payment Buttons.<\/li>\n<li><a href=\"#shipping-changes\">Handle shipping changes<\/a>.<\/li>\n<li><a href=\"#validate-user-input\">Validate user input<\/a>.<\/li>\n<li><a href=\"#paypal-credit\">Disable the PayPal Credit button<\/a>.<\/li>\n<li><a href=\"#add-paylater\">Add PayPal Pay Later messages and buttons<\/a>.<\/li>\n<li><a href=\"#disable-paylater\">Disable PayPal Pay Later<\/a>.<\/li>\n<li><a href=\"#intent\">Set the intent for individual payments<\/a>.<\/li>\n<li><a href=\"#hide-venmo\">Hide Venmo<\/a>.<\/li>\n<\/ul>\n<h4 id=\"csp\">Content Security Policy (CSP) nonce<\/h4>\n<p>You can include a <code>cspNonce<\/code> to add a <a href=\"https:\/\/developer.paypal.com\/sdk\/js\/configuration\/#link-cspnonce\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">CSP nonce<\/a> if you use this on your site. This was added in <a href=\"\/pt\/online-payments\/release-notes\/?title%5B0%5D=Web%2BComponents%2FDrop-in#releaseNote=2021-11-01-web-componentsdrop-in-5.2.0\">v5.2.0<\/a>.<\/p>\n<h4 id=\"layout\">Layout<\/h4>\n<p>You can configure the layout of the PayPal Smart Payment Buttons. To do that, configure the <code>style<\/code> element in the PayPal payment method configuration. Use the <a href=\"https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/buttons-style-guide\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">available style options<\/a>.<\/p>\n<h4 id=\"shipping-changes\">Shipping changes<\/h4>\n<p>You can use <a href=\"https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/shipping-options\/#link-shippingcallbackwithshippingoptions\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">PayPal's callback method <code>onShippingChange<\/code><\/a> to listen to shipping address changes and validate that you support the shipping address.<\/p>\n<h4 id=\"validate-user-input\">Validate user input<\/h4>\n<p>You can <a href=\"https:\/\/developer.paypal.com\/docs\/checkout\/standard\/customize\/validate-user-input\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">validate user input<\/a> with the following parameters:<\/p>\n<ul>\n<li><code>onInit<\/code>: Called when the button renders.<\/li>\n<li><code>onClick<\/code>: Called when one of the PayPal buttons is clicked.<\/li>\n<\/ul>\n<h4 id=\"paypal-credit\">Disable PayPal Credit<\/h4>\n<p>You can use <code>blockPayPalCreditButton<\/code> to control rendering the PayPal Credit button. Set this parameter to <code>true<\/code> if you do not want the PayPal Credit button to be rendered. The default value is <code>false<\/code>.<\/p>\n<h4 id=\"add-paylater\">Add PayPal Pay Later messages and buttons<\/h4>\n<p>PayPal Pay Later is supported in the following countries\/regions: AU, FR, DE, IT, ES, UK, US, with local currencies. Certain limitations apply to cross-border payments, when a shopper pays in a country\/region other than where you are registered. <\/p>\n<p>To present this option:<\/p>\n<ol>\n<li>Set <code>enableMessages<\/code> to <strong>true<\/strong>, to enable Pay Later messaging on your website.<\/li>\n<li>Render Pay Later messages and buttons by adding code to your page as described in <a href=\"https:\/\/developer.paypal.com\/docs\/checkout\/pay-later\/us\/integrate\/#link-rendermessagesandbuttonsonproductpages\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">PayPal's instructions<\/a>.<\/li>\n<\/ol>\n<h4 id=\"disable-paylater\">Disable PayPal Pay Later<\/h4>\n<p>You can use <code>blockPayPalPayLaterButton<\/code> to control rendering the PayPal PayLater button. Set this parameter to <code>true<\/code> if you do not want the PayPal PayLater button to be rendered. The default value is <code>false<\/code>.<\/p>\n<h4>Example<\/h4>\n<pre><code class=\"language-js\">const paypalConfiguration = {\n  style: { \/\/ Optional configuration for PayPal payment buttons.\n      layout: \"vertical\",\n      color: \"blue\"\n  },\n  cspNonce: \"MY_CSP_NONCE\",\n  onShippingChange: function(data, actions) {\n      \/\/ Listen to shipping changes.\n  },\n  onInit: (data, actions) =&gt; {\n      \/\/ onInit is called when the button first renders.\n      \/\/ Call actions.enable() to enable the button.\n      actions.enable();\n      \/\/ Or actions.disable() to disable it.\n  },\n  onClick: () =&gt; {\n      \/\/ onClick is called when the button is clicked.\n  },\n  blockPayPalCreditButton: true,\n  blockPayPalPayLaterButton: true\n};<\/code><\/pre>\n<h4 id=\"intent\">Set the <code>intent<\/code> for individual payments<\/h4>\n<p>From v5.34.0 onwards, you can use <code>intent<\/code> to determine when the funds are captured and whether the payment details are tokenized:<\/p>\n<ul>\n<li><code>capture<\/code>: authorizes and capture immediately.<\/li>\n<li><code>authorize<\/code>: authorizes immediately and captures later.<\/li>\n<li><code>subscription<\/code>: specifies this is a subscription payment.<\/li>\n<li><code>tokenize<\/code>: specifies this is a billing payment.<\/li>\n<\/ul>\n<h4>Example<\/h4>\n<pre><code class=\"language-js\">const paypalConfiguration = {\n    intent: \"authorize\"\n};<\/code><\/pre>\n<h4 id=\"hide-venmo\">Hide Venmo<\/h4>\n<p>If you and your shopper are both located in the US, <a href=\"\/pt\/payment-methods\/paypal#venmo\">Venmo<\/a> is shown in the PayPal Component by default. To hide Venmo in the PayPal Component, set <code>blockPayPalVenmoButton<\/code> to <strong>true<\/strong>.<\/p>\n<h2>Get the payment outcome<\/h2>\n<p>You can use the <code>resultCode<\/code> from the API response to show the shopper the <a href=\"\/pt\/account\/payments-lifecycle\/\">current payment status<\/a>. The <code>resultCode<\/code> values you can receive for PayPal are:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">resultCode<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<th style=\"text-align: left;\">Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Authorised<\/strong><\/td>\n<td style=\"text-align: left;\">The payment was successful.<\/td>\n<td style=\"text-align: left;\">Inform the shopper that the payment was successful. <br> Note that the transaction may still fail, for example due to risk rules that are applied after authorisation. Wait for the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/AUTHORISATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AUTHORISATION<\/a> webhook to learn the final outcome.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Pending<\/strong> or <br> <strong>Received<\/strong><\/td>\n<td style=\"text-align: left;\">The shopper has completed the payment but the final result is not yet known.<\/td>\n<td style=\"text-align: left;\">Inform the shopper that you received their order, and are waiting for the payment to be completed. <br> Wait for the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/AUTHORISATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AUTHORISATION<\/a> webhook to learn the final outcome.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Error<\/strong><\/td>\n<td style=\"text-align: left;\">There was an error when the payment was being processed.<\/td>\n<td style=\"text-align: left;\">Inform the shopper that there was an error processing their payment. <br> Wait for the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/AUTHORISATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AUTHORISATION<\/a> webhook. This will contain a <code>refusalReason<\/code> that indicates the cause of the error.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Refused<\/strong><\/td>\n<td style=\"text-align: left;\">The payment was refused by the shopper's bank.<\/td>\n<td style=\"text-align: left;\">Ask the shopper to try the payment again using a different payment method.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Cancelled<\/strong><\/td>\n<td style=\"text-align: left;\">The shopper canceled the PayPal payment.<\/td>\n<td style=\"text-align: left;\">Ask the shopper to select a different payment method.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>However, the synchronous API response doesn't give you the final outcome. To learn the final status of a payment and determine how to proceed with the order, you should wait for webhooks. This is especially important if you use any <a href=\"\/pt\/risk-management\/configure-standard-risk-rules\">standard risk rules<\/a> or <a href=\"\/pt\/risk-management\/configure-custom-risk-rules\">custom risk rules<\/a> that trigger <strong>after<\/strong> authorisation.<\/p>\n<p>The webhooks you can receive for PayPal are:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">eventCode<\/th>\n<th style=\"text-align: left;\">success field<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<th style=\"text-align: left;\">Action to take<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/AUTHORISATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AUTHORISATION<\/a><\/td>\n<td style=\"text-align: left;\"><strong>false<\/strong><\/td>\n<td style=\"text-align: left;\">The transaction failed.<\/td>\n<td style=\"text-align: left;\">Cancel the order and inform the shopper that the payment failed.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/AUTHORISATION\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">AUTHORISATION<\/a><\/td>\n<td style=\"text-align: left;\"><strong>true<\/strong><\/td>\n<td style=\"text-align: left;\">The shopper successfully completed the payment.<\/td>\n<td style=\"text-align: left;\">Inform the shopper that the payment has been successful and proceed with the order.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/OFFER_CLOSED\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OFFER_CLOSED<\/a><\/td>\n<td style=\"text-align: left;\"><strong>true<\/strong><\/td>\n<td style=\"text-align: left;\">The shopper did not complete the payment.<\/td>\n<td style=\"text-align: left;\">Cancel the order and inform the shopper that the payment timed out. <br>Note that you only receive this information if you <a href=\"#add-to-webhooks\">enable the OFFER_CLOSED event code<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"add-to-webhooks\">Include more information in webhooks<\/h3>\n<p>For PayPal, we recommend adding the following information to your <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\">standard webhooks<\/a>:<\/p>\n<ul>\n<li>\n<p> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/OFFER_CLOSED\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">OFFER_CLOSED<\/a> event code: informs you if the shopper failed to complete the payment. To enable receiving this event code, follow the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/#non-default-event-codes\">instructions for non-default event codes<\/a>.<\/p>\n<\/li>\n<li>\n<p>PayPal specific details. When enabled, your standard webhooks return the following details as <code>additionalData<\/code>:<\/p>\n<ul>\n<li><code>paypalEmail<\/code>: the email address of the shopper's PayPal account.<\/li>\n<li><code>paypalPayerId<\/code>: the shopper's PayPal Payer ID.<\/li>\n<li><code>paypalPayerStatus<\/code>: indicates if the shopper's account has been verified by PayPal.<\/li>\n<li><code>paypalAddressStatus<\/code>: indicates if the shopper's address has been confirmed by PayPal.<\/li>\n<li><code>paypalProtectionEligibility<\/code>: indicates if the payment is eligible for PayPal Seller Protection.<\/li>\n<li><code>paypalPayerResidenceCountry<\/code>: the shopper's country or region of residence.<\/li>\n<\/ul>\n<p>To enable receiving these details, follow the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/additional-settings\/\">instructions for additional settings<\/a>, making sure to select <strong>Include PayPal Details<\/strong>.<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"recurring-paypal-payments\">Recurring payments<\/h2>\n<p>PayPal supports <a href=\"\/pt\/online-payments\/tokenization\">tokenization<\/a> for recurring payments.<\/p>\n<div class=\"sc-notice note\"><div>\n<p>We strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.<\/p>\n<\/div><\/div>\n<h3 id=\"prepare-recurring\">Prepare for tokenization<\/h3>\n<ol>\n<li>\n<p>Note the PayPal setup requirements:<\/p>\n<ul>\n<li>If you are not a marketplace and do not have a so-called indirect settlement arrangement, <strong>Vault (recurring) permissions<\/strong> must be enabled in your <a href=\"\/pt\/payment-methods\/paypal\/setup-paypal-direct-merchants#add-paypal\">PayPal setup<\/a>. If you completed the setup without enabling recurring transactions, restart the setup flow and this time select the relevant option.<\/li>\n<li>If you are a marketplace or have an indirect settlement arrangement, inform our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> that you want to make recurring PayPal payments. They will then take care of the correct setup.<\/li>\n<li>If you intend to share tokens across PayPal accounts, make sure your PayPal accounts are configured to do so. You may need to contact your PayPal account manager or support team.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>To be able to create tokens through initial zero-value authorization requests:<\/p>\n<ul>\n<li>If you use the <code>\/sessions<\/code> endpoint, make sure you are on <strong>v5.3.0<\/strong> or later.<\/li>\n<li>If you use the <code>\/payments<\/code> endpoint, update your configuration as described in the next step.<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>If you want to use the <code>\/payments<\/code> endpoint for creating a token through an initial zero-value authorization request, update your Drop-in configuration in one of the following ways:<\/p>\n<ul>\n<li>Add <code>intent: \"tokenize\"<\/code> to the <a href=\"#optional-config\">PayPal configuration object<\/a>. This requires <strong>v5.34.0<\/strong> or later.<\/li>\n<li>Add the <code>amount<\/code> object to the global Drop-in configuration. This requires <strong>v5.3.0<\/strong> or later.<\/li>\n<\/ul>\n<div class=\"notices green\">\n<p>Skip this step if you are not going to create tokens through zero-value authorization requests to the <code>\/payments<\/code> endpoint.<\/p>\n<\/div>\n\n<div id=\"tabpb3XS\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Using the tokenize intent&quot;,&quot;content&quot;:&quot;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;PayPal configuration object with the tokenize intent&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const paypalConfiguration = {\\\\n  \\\\\\\/\\\\\\\/ ... other optional configuration\\\\n  intent: \\\\\\&quot;tokenize\\\\\\&quot;\\\\n};\\&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;:null,&quot;oldTabId&quot;:&quot;using_the_tokenize_intent_0_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Using the amount object&quot;,&quot;content&quot;:&quot;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Global configuration object with the amount object&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;const configuration = {\\\\n  \\\\\\\/\\\\\\\/ ...  other configuration\\\\n  amount: {\\\\n    currency: \\\\\\&quot;USD\\\\\\&quot;,\\\\n    value: 0\\\\n  }\\\\n};\\&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;:null,&quot;oldTabId&quot;:&quot;using_the_amount_object_1_2&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<div class=\"notices yellow\">\n<p>No token is created if you send a zero-value authorization request to the <code>\/payments<\/code> endpoint without having updated the configuration as described above.<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<h3>Create and use tokens<\/h3>\n<p>When the <a href=\"#prepare-recurring\">preparation<\/a> is completed, creating and using tokens for PayPal payments is the same as described for tokenization in general, except for the following:<\/p>\n<ol>\n<li>\n<p>To create a token through a zero-value authorization request, in your initial  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/sessions<\/a> or  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> payment request include:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>shopperEmail<\/code><\/td>\n<td style=\"text-align: left;\">The shopper's email address. Required when making a zero-value authorization request. Do not include this parameter if the request is not for a zero-value authorization.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>amount.value<\/code><\/td>\n<td style=\"text-align: left;\">Set to <strong>0<\/strong> when making a zero-value authorization request.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Proceed as described for tokenization in general: get the shopper reference and the token from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.created<\/a> webhook, and use this data in future payments for the shopper.<\/p>\n<\/li>\n<\/ol>\n<p>For instructions, see:<\/p>\n<ul>\n<li><a href=\"\/pt\/online-payments\/tokenization\/create-and-use-tokens\/?tab=one_off_payments_1\">CardOnFile<\/a><\/li>\n<li><a href=\"\/pt\/online-payments\/tokenization\/create-and-use-tokens\/?tab=subscriptions_2\">Subscription<\/a><\/li>\n<li><a href=\"\/pt\/online-payments\/tokenization\/create-and-use-tokens\/?tab=automatic_top_ups_3\">UnscheduledCardOnFile<\/a><\/li>\n<li><a href=\"\/pt\/online-payments\/tokenization\/create-and-use-tokens\/#enable-the-webhook\">Recurring tokens life cycle events webhook<\/a><\/li>\n<\/ul>\n<h2 id=\"refunds\">Refunds<\/h2>\n<p>If you have not captured a PayPal payment, you can <a href=\"\/pt\/online-payments\/cancel\">cancel<\/a> it. If you have captured the payment and you want to return the funds to the shopper, you need to <a href=\"\/pt\/online-payments\/refund\/\">refund<\/a> it.<\/p>\n<p>For partial refunds, the instructions differ depending on your capture settings:<\/p>\n<ul>\n<li>If <a href=\"#captured-immediately\">payments are captured immediately after authorization<\/a> you need to include <code>lineItems<\/code> in your partial refund request.<\/li>\n<li>If <a href=\"#captured-later\">payments are captured later<\/a> you need to include a <code>capturePspReference<\/code> in your partial refund request.<\/li>\n<\/ul>\n<h3 id=\"captured-immediately\">Partial refund when payments are captured immediately<\/h3>\n<p>If you are using the default setup where PayPal payments are captured immediately after authorization, partially refund a PayPal payment as follows:<\/p>\n<ol>\n<li>\n<p>In your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/refunds<\/a> request, specify:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>amount<\/code><\/td>\n<td><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td>The amount that is refunded to the shopper.<\/td>\n<\/tr>\n<tr>\n<td><code>lineItems<\/code><\/td>\n<td><\/td>\n<td>Price and product information for the items that the shopper should pay for. The sum of the <code>lineItems<\/code> must match the <code>amount<\/code>. If they do not match, Adyen will add a dummy <code>lineItem<\/code> entry to account for the difference.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Only specify the items that you are refunding the money for.<\/p>\n<p>The following example shows how to make a partial refund for item #1 of the above order.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example \/refunds request for partial refund'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v65\\\/payments\\\/TCG5XS42X8NKGK82\\\/refunds \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_UNIQUE_REFERENCE\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;value\\&quot;: 1200,\\n        \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n    },\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;lineItems\\&quot;: [\\n        {\\n            \\&quot;quantity\\&quot;: \\&quot;1\\&quot;,\\n            \\&quot;taxPercentage\\&quot;: \\&quot;2000\\&quot;,\\n            \\&quot;description\\&quot;: \\&quot;Polo shirt\\&quot;,\\n            \\&quot;id\\&quot;: \\&quot;Item #1\\&quot;,\\n            \\&quot;itemCategory\\&quot;: \\&quot;Shirts\\&quot;,\\n            \\&quot;amountIncludingTax\\&quot;: \\&quot;1200\\&quot;,\\n            \\&quot;taxAmount\\&quot;: \\&quot;200\\&quot;,\\n            \\&quot;amountExcludingTax\\&quot;: \\&quot;1000\\&quot;,\\n            \\&quot;productUrl\\&quot;: \\&quot;https:\\\/\\\/www.mystoredemo.io\\\/#\\\/product\\\/01\\&quot;,\\n            \\&quot;imageUrl\\&quot;: \\&quot;https:\\\/\\\/www.mystoredemo.io\\\/1689f3f40b292d1de2c6.png\\&quot;\\n        }\\n    ]\\n}&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Note that in the response, the <code>pspReference<\/code> is specifically for the refund transaction, not for the original payment.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example \/refunds response'\" :id=\"''\" :code-data='[{\"language\":\"java\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"merchantAccount\\\": \\\"YOUR_MERCHANT_ACCOUNT\\\",\\n    \\\"pspReference\\\": \\\"IHG5XS4FGKVLGK82\\\",\\n    \\\"reference\\\": \\\"YOUR_UNIQUE_REFERENCE\\\",\\n    \\\"status\\\": \\\"received\\\",\\n    \\\"amount\\\": {\\n        \\\"currency\\\": \\\"EUR\\\",\\n        \\\"value\\\": 1200\\n    },\\n    \\\"lineItems\\\": [\\n        {\\n            \\\"quantity\\\": \\\"1\\\",\\n            \\\"taxPercentage\\\": \\\"2000\\\",\\n            \\\"description\\\": \\\"Polo shirt\\\",\\n            \\\"id\\\": \\\"Item #1\\\",\\n            \\\"itemCategory\\\": \\\"Shirts\\\",\\n            \\\"amountIncludingTax\\\": \\\"1200\\\",\\n            \\\"taxAmount\\\": \\\"200\\\",\\n            \\\"amountExcludingTax\\\": \\\"1000\\\",\\n            \\\"productUrl\\\": \\\"https:\\\/\\\/www.mystoredemo.io\\\/#\\\/product\\\/01\\\",\\n            \\\"imageUrl\\\": \\\"https:\\\/\\\/www.mystoredemo.io\\\/1689f3f40b292d1de2c6.png\\\"\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h3 id=\"captured-later\">Partial refund when payments are captured later<\/h3>\n<p>Your request for a partial refund must include a <code>capturePspReference<\/code> if all of the following is true:<\/p>\n<ul>\n<li>You configured capturing payments later, instead of immediately after authorization.<\/li>\n<li>Multiple partial captures are enabled for your account.<\/li>\n<li>You are going to do more than one partial capture.<\/li>\n<\/ul>\n<p>PayPal uses this unique capture reference to locate the transaction in their systems. Without it, the refund can fail.<\/p>\n<p>To partially refund a PayPal payment if payments are captured later:<\/p>\n<ol>\n<li>\n<p>Get the <code>pspReference<\/code> from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/captures<\/a> response for the payment that you want to partially refund. This is the reference to the capture that PayPal needs.<\/p>\n<\/li>\n<li>\n<p>In your  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/refunds\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/refunds<\/a> request, specify:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>capturePspReference<\/code><\/td>\n<td><\/td>\n<td>The <code>pspReference<\/code> from the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/(paymentPspReference)\/captures\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/{paymentPspReference}\/captures<\/a> response. Do not use the <code>paymentPspReference<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example \/refunds request for partial refund when payments are captured later'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/payments\\\/TCG5XS42X8NKGK82\\\/refunds \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n    \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n    \\&quot;reference\\&quot;: \\&quot;YOUR_UNIQUE_REFERENCE\\&quot;,\\n    \\&quot;capturePspReference\\&quot;: \\&quot;QSKF8GZ2KX998X72\\&quot;,\\n    \\&quot;amount\\&quot;: {\\n        \\&quot;value\\&quot;: 1200,\\n        \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n    }\\n}&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"set-up-paypal-seller-protection\">Set up PayPal Seller Protection<\/h2>\n<div class=\"notices blue\">\n<p>PayPal Seller Protection only applies to physical goods.<\/p>\n<\/div>\n<p>If you participate in the <a href=\"https:\/\/www.paypal.com\/us\/webapps\/mpp\/security\/seller-protection\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">PayPal Seller Protection<\/a> program, make sure that you submit the following fields in your payment requests:<\/p>\n<ul>\n<li>\n <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-deliveryAddress\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">deliveryAddress<\/a>\n<\/li>\n<li>\n <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-shopperName\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">shopperName<\/a>\n<\/li>\n<li>\n <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a>\n<\/li>\n<\/ul>\n<p>The details provided in these fields will populate the <strong>Ship to<\/strong> section of the PayPal checkout.<\/p>\n<p>We recommend that you check that your setup is working correctly with a test payment. Make sure that you submit the correct fields, and that the test payment is marked as eligible for PayPal Seller Protection in the transaction details.<\/p>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<h3>Test your integration<\/h3>\n<p>When you are done setting up your integration, use your PayPal sandbox accounts to test the PayPal payment flow. Your <strong>business<\/strong> sandbox account lets you simulate your role as a merchant when testing payments. With your <strong>personal<\/strong> sandbox account you can simulate the role of a customer.<\/p>\n<p>Refer to the following resources:<\/p>\n<\/li>\n<li>For instructions to create sandbox accounts, see <a href=\"\/pt\/payment-methods\/paypal\/setup-paypal-direct-merchants#dev-sandbox-accounts\">Set up PayPal<\/a>.<\/li>\n<li>For testing instructions, see the <a href=\"https:\/\/developer.paypal.com\/api\/rest\/sandbox\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">PayPal sandbox testing guide<\/a>.<\/li>\n<\/ul>\n<p>You can check the status of a PayPal test payment in your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a> &gt; <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<h3>Before you go live<\/h3>\n<p>For live operations, you need to get a live PayPal business account and configure your live environment.  See <a href=\"\/pt\/payment-methods\/paypal\/setup-paypal-direct-merchants#go-live\">Set up PayPal<\/a>. <\/p>\n<p>Note that in the live environment, PayPal will only be available if:<\/p>\n<ul>\n<li>The shopper is logged in to their PayPal account.<\/li>\n<li>The shopper has at least one valid payment method on their PayPal account.<\/li>\n<\/ul>\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\/drop-in-web\"\n                        target=\"_self\"\n                        >\n                    Web Drop-in integration guide\n                <\/a><\/li><li><a href=\"https:\/\/developer.paypal.com\/docs\/api\/overview\/\"\n                        target=\"_blank\"\n                         class=\"external\">\n                    PayPal API\n                <\/a><\/li><li><a href=\"\/development-resources\/raw-acquirer-responses#paypal-raw-responses\"\n                        target=\"_self\"\n                        >\n                    PayPal raw responses\n                <\/a><\/li><li><a href=\"\/payment-methods\/paypal\/paypal-troubleshooting\"\n                        target=\"_self\"\n                        >\n                    Troubleshooting PayPal errors\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\/paypal\/web-drop-in","articleFields":{"description":"Add PayPal to an existing Drop-in integration.","cache_enable":false,"parameters":{"integration":"Drop-in","platform":"Web","integration_guide_url":"build-your-integration\/sessions-flow?platform=Web&integration=Drop-in","component_name":"Drop-in","component_name_capitalized":"Drop-in","payment_method":"PayPal","component_class":"PayPal","payment_method_type":"paypal","component_js_const":"paypal","return_url":"https:\/\/your-company.example.com\/checkout?shopperOrder=12xy.."}},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/paypal\/web-drop-in","title":"PayPal Drop-in integration","content":"This page explains how to add PayPal to your existing Web Drop-in integration.\n\nThe PayPal Smart Payment Buttons are available from Drop-in \n    \n        v 3.7.0\n    \n\n and later.\n\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have built your Drop-in integration.\n\n\nSetup steps\nBefore you begin, complete the PayPal setup steps.\n\n\n\nAPI reference\nSelect which endpoint you are using:\n\n\n    \n        \n        \n    \n\n\nAmounts in Hungarian Forints (HUF)\nIn case of a transaction in HUF, PayPal expects the transaction amount and the line item amounts to be rounded to the nearest whole amount. For example, an amount of HUF&nbsp;74499 must be rounded to HUF&nbsp;74500. PayPal also expects the rounded line item amounts to add up to the rounded transaction amount. \nIf you do not round the amounts, Adyen will do that. However, a discrepancy can occur between the transaction amount and the total of the line item amounts. When this happens, PayPal doesn't accept the transaction. To avoid that problem, we recommend that you round all HUF amounts yourself and check that they add up.\nPayPal risk fields\nPayPal requires marketplaces and also merchants in specific verticals to send information about the context of the transaction, for risk mitigation purposes.\nNot all businesses need to send risk fields. Contact your PayPal account manager to verify.\nCommon PayPal risk fields for marketplaces\nAs an example, the following table shows the most common paypalRisk fields that marketplaces need to send. It is possible that PayPal requires you to send more, less, or other fields.\n\n\n\nPayPal risk field\nDescription\nData type\/format\nExample\n\n\n\n\nSender profile  fields:\n\n\n\n\n\nsender_account_id\nThe unique identifier of the buyer's account on the marketplace platform.\nString, alphanumeric\nA12345N343\n\n\nsender_first_name\nThe buyer's first name registered with their marketplace account.\nString, alphanumeric\nJohn\n\n\nsender_last_name\nThe buyer's last name registered with their marketplace account.\nString, alphanumeric\nSmith\n\n\nsender_email\nThe buyer's email address registered with their marketplace account.\nString in E.123 email address format\njohn.smith@email.com\n\n\nsender_phone\nThe buyer's phone number registered with their marketplace account.\nString in E.123 telephone number format, national notation\n0687164125\n\n\nsender_address_zip\nUS only. The buyer's postal code registered with their marketplace account.\nString, alphanumeric\n60661\n\n\nsender_country_code\nThe buyer's country registered with their marketplace account.\nString in two-character ISO-3166-1 alpha-2 country code format. Exception: QZ (Kosovo).\nUS\n\n\nsender_create_date\nThe date that the buyer's marketplace account was created.\nString in ISO 8601 date format\n2012-12-09T19:14:55.277-0:00\n\n\nsender_signup_ip\nThe IP address that the buyer used when signing up on the marketplace platform.\nString in IPv4 or IPv6 format\n213.52.172.120\n\n\nsender_popularity_score\nIf you need to provide this field, ask your PayPal account manager for instructions.\nString, possible values: high, medium, low\nhigh\n\n\nReceiver profile fields:\n\n\n\n\n\nreceiver_account_id\nThe unique identifier of the seller's account on the marketplace platform.\nString, alphanumeric\nAH00000000000000000000001\n\n\nreceiver_create_date\nThe date that the seller's marketplace account was created.\nString in ISO 8601 date format\n2012-12-09T19:14:55.277-0:00\n\n\nreceiver_email\nThe seller's email address registered with their marketplace account.\nString in E.123 email address format\njohn.smith@email.com\n\n\nreceiver_address_country_code\nThe seller's country registered with their marketplace account.\nString in two-character ISO-3166-1 alpha-2 country code format. Exception: QZ (Kosovo).\nUS\n\n\nbusiness_name\nThe seller's business name registered with their marketplace account.\nString, alphanumeric\n\n\n\nrecipient_popularity_score\nIf you need to provide this field, ask your PayPal account manager for instructions.\nString, possible values: high, medium, low\nhigh\n\n\nSender-Receiver interaction:\n\n\n\n\n\nfirst_interaction_date\nThe date of the first interaction between the buyer and the seller. The marketplace defines what an interaction is. For example, a payment transaction, a buyer choosing to follow a seller, and so on.\nString in ISO 8601 date format\n2012-12-09T19:14:55.277-0:00\n\n\nTransaction information:\n\n\n\n\n\ntxn_count_total\nThe total number of transactions that the buyer has made on the platform. These can be PayPal payments, or payments using a different payment method.\nNumber\n\n\n\nPayment Flow\/Model\/Type:\n\n\n\n\n\nvertical\nIf the seller is active in more than one business vertical, this field indicates the vertical that applies to the transaction.\nString, alphanumeric\nHousehold goods\n\n\ntransaction_is_tangible\nIndicates if the transaction is for tangible goods.\nBoolean in string format. Possible values: 0 (false), or 1 (true)\n0\n\n\n\nFormatting\nTo send PayPal risk fields, you must use the additionalData.paypalRisk field, and specify the risk fields as a stringified additional_data array. Each array item consists of:\n\nkey: the name of the PayPal risk field.\nvalue: the value of the PayPal risk field for the current transaction.\n\nHere is an example of the original array and the array in stringified format.\n\n    \n\n\n    \n\nDrop-in configuration\nRequired configuration\nSelect which endpoint you are using:\n\n\n    \n        \n        \n    \n\n\n\nSet SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin-allow-popups' in the header of your web page to ensure that important PayPal popups open.\n\nOptional configuration\nWhen creating an instance of Drop-in, you can also:\n\nAdd a Content Security Policy (CSP) nonce.\nCustomize the layout of the PayPal Smart Payment Buttons.\nHandle shipping changes.\nValidate user input.\nDisable the PayPal Credit button.\nAdd PayPal Pay Later messages and buttons.\nDisable PayPal Pay Later.\nSet the intent for individual payments.\nHide Venmo.\n\nContent Security Policy (CSP) nonce\nYou can include a cspNonce to add a CSP nonce if you use this on your site. This was added in v5.2.0.\nLayout\nYou can configure the layout of the PayPal Smart Payment Buttons. To do that, configure the style element in the PayPal payment method configuration. Use the available style options.\nShipping changes\nYou can use PayPal's callback method onShippingChange to listen to shipping address changes and validate that you support the shipping address.\nValidate user input\nYou can validate user input with the following parameters:\n\nonInit: Called when the button renders.\nonClick: Called when one of the PayPal buttons is clicked.\n\nDisable PayPal Credit\nYou can use blockPayPalCreditButton to control rendering the PayPal Credit button. Set this parameter to true if you do not want the PayPal Credit button to be rendered. The default value is false.\nAdd PayPal Pay Later messages and buttons\nPayPal Pay Later is supported in the following countries\/regions: AU, FR, DE, IT, ES, UK, US, with local currencies. Certain limitations apply to cross-border payments, when a shopper pays in a country\/region other than where you are registered. \nTo present this option:\n\nSet enableMessages to true, to enable Pay Later messaging on your website.\nRender Pay Later messages and buttons by adding code to your page as described in PayPal's instructions.\n\nDisable PayPal Pay Later\nYou can use blockPayPalPayLaterButton to control rendering the PayPal PayLater button. Set this parameter to true if you do not want the PayPal PayLater button to be rendered. The default value is false.\nExample\nconst paypalConfiguration = {\n  style: { \/\/ Optional configuration for PayPal payment buttons.\n      layout: \"vertical\",\n      color: \"blue\"\n  },\n  cspNonce: \"MY_CSP_NONCE\",\n  onShippingChange: function(data, actions) {\n      \/\/ Listen to shipping changes.\n  },\n  onInit: (data, actions) =&gt; {\n      \/\/ onInit is called when the button first renders.\n      \/\/ Call actions.enable() to enable the button.\n      actions.enable();\n      \/\/ Or actions.disable() to disable it.\n  },\n  onClick: () =&gt; {\n      \/\/ onClick is called when the button is clicked.\n  },\n  blockPayPalCreditButton: true,\n  blockPayPalPayLaterButton: true\n};\nSet the intent for individual payments\nFrom v5.34.0 onwards, you can use intent to determine when the funds are captured and whether the payment details are tokenized:\n\ncapture: authorizes and capture immediately.\nauthorize: authorizes immediately and captures later.\nsubscription: specifies this is a subscription payment.\ntokenize: specifies this is a billing payment.\n\nExample\nconst paypalConfiguration = {\n    intent: \"authorize\"\n};\nHide Venmo\nIf you and your shopper are both located in the US, Venmo is shown in the PayPal Component by default. To hide Venmo in the PayPal Component, set blockPayPalVenmoButton to true.\nGet the payment outcome\nYou can use the resultCode from the API response to show the shopper the current payment status. The resultCode values you can receive for PayPal are:\n\n\n\nresultCode\nDescription\nAction to take\n\n\n\n\nAuthorised\nThe payment was successful.\nInform the shopper that the payment was successful.  Note that the transaction may still fail, for example due to risk rules that are applied after authorisation. Wait for the  AUTHORISATION webhook to learn the final outcome.\n\n\nPending or  Received\nThe shopper has completed the payment but the final result is not yet known.\nInform the shopper that you received their order, and are waiting for the payment to be completed.  Wait for the  AUTHORISATION webhook to learn the final outcome.\n\n\nError\nThere was an error when the payment was being processed.\nInform the shopper that there was an error processing their payment.  Wait for the  AUTHORISATION webhook. This will contain a refusalReason that indicates the cause of the error.\n\n\nRefused\nThe payment was refused by the shopper's bank.\nAsk the shopper to try the payment again using a different payment method.\n\n\nCancelled\nThe shopper canceled the PayPal payment.\nAsk the shopper to select a different payment method.\n\n\n\nHowever, the synchronous API response doesn't give you the final outcome. To learn the final status of a payment and determine how to proceed with the order, you should wait for webhooks. This is especially important if you use any standard risk rules or custom risk rules that trigger after authorisation.\nThe webhooks you can receive for PayPal are:\n\n\n\neventCode\nsuccess field\nDescription\nAction to take\n\n\n\n\n AUTHORISATION\nfalse\nThe transaction failed.\nCancel the order and inform the shopper that the payment failed.\n\n\n AUTHORISATION\ntrue\nThe shopper successfully completed the payment.\nInform the shopper that the payment has been successful and proceed with the order.\n\n\n OFFER_CLOSED\ntrue\nThe shopper did not complete the payment.\nCancel the order and inform the shopper that the payment timed out. Note that you only receive this information if you enable the OFFER_CLOSED event code.\n\n\n\nInclude more information in webhooks\nFor PayPal, we recommend adding the following information to your standard webhooks:\n\n\n OFFER_CLOSED event code: informs you if the shopper failed to complete the payment. To enable receiving this event code, follow the instructions for non-default event codes.\n\n\nPayPal specific details. When enabled, your standard webhooks return the following details as additionalData:\n\npaypalEmail: the email address of the shopper's PayPal account.\npaypalPayerId: the shopper's PayPal Payer ID.\npaypalPayerStatus: indicates if the shopper's account has been verified by PayPal.\npaypalAddressStatus: indicates if the shopper's address has been confirmed by PayPal.\npaypalProtectionEligibility: indicates if the payment is eligible for PayPal Seller Protection.\npaypalPayerResidenceCountry: the shopper's country or region of residence.\n\nTo enable receiving these details, follow the instructions for additional settings, making sure to select Include PayPal Details.\n\n\nRecurring payments\nPayPal supports tokenization for recurring payments.\n\nWe strongly recommend that you ask explicit permission from the shopper if you intend to make future recurring payments. Being transparent about the payment schedule and the charged amount reduces the risk of chargebacks.\n\nPrepare for tokenization\n\n\nNote the PayPal setup requirements:\n\nIf you are not a marketplace and do not have a so-called indirect settlement arrangement, Vault (recurring) permissions must be enabled in your PayPal setup. If you completed the setup without enabling recurring transactions, restart the setup flow and this time select the relevant option.\nIf you are a marketplace or have an indirect settlement arrangement, inform our Support Team that you want to make recurring PayPal payments. They will then take care of the correct setup.\nIf you intend to share tokens across PayPal accounts, make sure your PayPal accounts are configured to do so. You may need to contact your PayPal account manager or support team.\n\n\n\nTo be able to create tokens through initial zero-value authorization requests:\n\nIf you use the \/sessions endpoint, make sure you are on v5.3.0 or later.\nIf you use the \/payments endpoint, update your configuration as described in the next step.\n\n\n\nIf you want to use the \/payments endpoint for creating a token through an initial zero-value authorization request, update your Drop-in configuration in one of the following ways:\n\nAdd intent: \"tokenize\" to the PayPal configuration object. This requires v5.34.0 or later.\nAdd the amount object to the global Drop-in configuration. This requires v5.3.0 or later.\n\n\nSkip this step if you are not going to create tokens through zero-value authorization requests to the \/payments endpoint.\n\n\n\n    \n        \n        \n    \n\n\n\nNo token is created if you send a zero-value authorization request to the \/payments endpoint without having updated the configuration as described above.\n\n\n\nCreate and use tokens\nWhen the preparation is completed, creating and using tokens for PayPal payments is the same as described for tokenization in general, except for the following:\n\n\nTo create a token through a zero-value authorization request, in your initial  \/sessions or  \/payments payment request include:\n\n\n\nParameter\nDescription\n\n\n\n\nshopperEmail\nThe shopper's email address. Required when making a zero-value authorization request. Do not include this parameter if the request is not for a zero-value authorization.\n\n\namount.value\nSet to 0 when making a zero-value authorization request.\n\n\n\n\n\nProceed as described for tokenization in general: get the shopper reference and the token from the  recurring.token.created webhook, and use this data in future payments for the shopper.\n\n\nFor instructions, see:\n\nCardOnFile\nSubscription\nUnscheduledCardOnFile\nRecurring tokens life cycle events webhook\n\nRefunds\nIf you have not captured a PayPal payment, you can cancel it. If you have captured the payment and you want to return the funds to the shopper, you need to refund it.\nFor partial refunds, the instructions differ depending on your capture settings:\n\nIf payments are captured immediately after authorization you need to include lineItems in your partial refund request.\nIf payments are captured later you need to include a capturePspReference in your partial refund request.\n\nPartial refund when payments are captured immediately\nIf you are using the default setup where PayPal payments are captured immediately after authorization, partially refund a PayPal payment as follows:\n\n\nIn your  \/payments\/{paymentPspReference}\/refunds request, specify:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\namount\n\nThe amount that is refunded to the shopper.\n\n\nlineItems\n\nPrice and product information for the items that the shopper should pay for. The sum of the lineItems must match the amount. If they do not match, Adyen will add a dummy lineItem entry to account for the difference.\n\n\n\nOnly specify the items that you are refunding the money for.\nThe following example shows how to make a partial refund for item #1 of the above order.\n\n\n\n\n\nNote that in the response, the pspReference is specifically for the refund transaction, not for the original payment.\n\n\n\n\n\nPartial refund when payments are captured later\nYour request for a partial refund must include a capturePspReference if all of the following is true:\n\nYou configured capturing payments later, instead of immediately after authorization.\nMultiple partial captures are enabled for your account.\nYou are going to do more than one partial capture.\n\nPayPal uses this unique capture reference to locate the transaction in their systems. Without it, the refund can fail.\nTo partially refund a PayPal payment if payments are captured later:\n\n\nGet the pspReference from the  \/payments\/{paymentPspReference}\/captures response for the payment that you want to partially refund. This is the reference to the capture that PayPal needs.\n\n\nIn your  \/payments\/{paymentPspReference}\/refunds request, specify:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\ncapturePspReference\n\nThe pspReference from the  \/payments\/{paymentPspReference}\/captures response. Do not use the paymentPspReference.\n\n\n\n\n\n\n\n\nSet up PayPal Seller Protection\n\nPayPal Seller Protection only applies to physical goods.\n\nIf you participate in the PayPal Seller Protection program, make sure that you submit the following fields in your payment requests:\n\n\n deliveryAddress\n\n\n shopperName\n\n\n lineItems\n\n\nThe details provided in these fields will populate the Ship to section of the PayPal checkout.\nWe recommend that you check that your setup is working correctly with a test payment. Make sure that you submit the correct fields, and that the test payment is marked as eligible for PayPal Seller Protection in the transaction details.\nTest and go live\nTest your integration\nWhen you are done setting up your integration, use your PayPal sandbox accounts to test the PayPal payment flow. Your business sandbox account lets you simulate your role as a merchant when testing payments. With your personal sandbox account you can simulate the role of a customer.\nRefer to the following resources:\n\nFor instructions to create sandbox accounts, see Set up PayPal.\nFor testing instructions, see the PayPal sandbox testing guide.\n\nYou can check the status of a PayPal test payment in your Customer Area &gt; Transactions &gt; Payments.\nBefore you go live\nFor live operations, you need to get a live PayPal business account and configure your live environment.  See Set up PayPal. \nNote that in the live environment, PayPal will only be available if:\n\nThe shopper is logged in to their PayPal account.\nThe shopper has at least one valid payment method on their PayPal account.\n\nSee also\n\n\n                    Web Drop-in integration guide\n                \n                    PayPal API\n                \n                    PayPal raw responses\n                \n                    Troubleshooting PayPal errors\n                \n                    API Explorer\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"PayPal","lvl3":"PayPal Drop-in integration"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/pt\/payment-methods\/paypal","lvl3":"\/pt\/payment-methods\/paypal\/web-drop-in"},"levels":4,"category":"Payment method","category_color":"green","tags":["PayPal","Drop-in","integration"]}}
