{"title":"PayPal for API only","category":"default","creationDate":1781697833,"content":"<p>You can add PayPal to your existing integration. The following instructions show only what you must add to your integration specifically for PayPal.<\/p>\n<p>If an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.<\/p>\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 an existing <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\">API-only integration<\/a>.<\/td>\n<td> <\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Redirect handling<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your existing integration is set up to <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#handle-the-redirect\">handle the redirect<\/a>. <br>  <code>action.type<\/code>: <strong>redirect<\/strong>.<\/td>\n<td><\/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:<br\/><ul><li markdown=\"1\"><a href=\"\/payment-methods\/add-payment-methods\">add PayPal in your Customer Area<\/a>. <\/li><li markdown=\"1\">complete the <a href=\"\/online-payments\/payment-methods\/paypal\/setup-paypal-direct-merchants\/\">PayPal setup steps<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<ol>\n<li>The shopper selects PayPal as the payment method.<\/li>\n<li>If applicable,the shopper enters their details in the <a href=\"#build-your-payment-form\">payment form that you build<\/a>.<\/li>\n<li>When you make the payment request, you <a href=\"#additional-parameters-payments\">include additional information about the items that the shopper intends to purchase<\/a>.<\/li>\n<\/ol>\n<h2 id=\"build-your-payment-form\">Build your payment form<\/h2>\n<p>Include PayPal in the list of <a href=\"#payment-methods\">available payment methods<\/a>.<\/p>\n<p>You don't have to include other fields in the payment form to collect information from your shopper .<\/p>\n<div class=\"notices green\">\n<p>You can <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%2Bonly&amp;version=71#downloading-logos\">download the logo for PayPal<\/a> to use in your form.<\/p>\n<\/div>\n<h2 id=\"payment-methods\">Get PayPal as an available payment method<\/h2>\n<p>When you make the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a> to <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#get-available-payment-methods\">get available payment methods<\/a>, specify the following so that PayPal is included in the response.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-countryCode\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">countryCode<\/a><\/td>\n<td><strong>AU<\/strong>, <strong>AT<\/strong>, <strong>BE<\/strong>, <strong>BR<\/strong>, <strong>BG<\/strong>, <strong>CA<\/strong>, <strong>HR<\/strong>, <strong>CY<\/strong>, <strong>CZ<\/strong>, <strong>DK<\/strong>, <strong>EE<\/strong>, <strong>FI<\/strong>, <strong>FR<\/strong>, <strong>DE<\/strong>, <strong>GIB<\/strong>, <strong>HK<\/strong>, <strong>HU<\/strong>, <strong>IS<\/strong>, <strong>ID<\/strong>, <strong>IE<\/strong>, <strong>IT<\/strong>, <strong>JP<\/strong>, <strong>LV<\/strong>, <strong>LT<\/strong>, <strong>LU<\/strong>, <strong>MY<\/strong>, <strong>MT<\/strong>, <strong>NL<\/strong>, <strong>NZ<\/strong>, <strong>PH<\/strong>, <strong>PL<\/strong>, <strong>PT<\/strong>, <strong>RO<\/strong>, <strong>SK<\/strong>, <strong>SI<\/strong>, <strong>KR<\/strong>, <strong>ES<\/strong>, <strong>SE<\/strong>, <strong>CH<\/strong>, <strong>TH<\/strong>, <strong>UA<\/strong>, <strong>AE<\/strong>, <strong>GB<\/strong>, <strong>US<\/strong><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods#request-amount-currency\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">amount.currency<\/a><\/td>\n<td><strong>AUD<\/strong>, <strong>BGN<\/strong>, <strong>CAD<\/strong>, <strong>CHF<\/strong>, <strong>CZK<\/strong>, <strong>DKK<\/strong>, <strong>EUR<\/strong>, <strong>GBP<\/strong>, <strong>HKD<\/strong>, <strong>NOK<\/strong>, <strong>PLN<\/strong>, <strong>SEK<\/strong>, <strong>USD<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request for available payment methods'\" :id=\"'payment-methods-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v71\\\/paymentMethods \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST \\\\\\n-d '{\\n   \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n   \\&quot;countryCode\\&quot;: \\&quot;US\\&quot;,\\n   \\&quot;amount\\&quot;: {\\n      \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n\\t  \\&quot;value\\&quot;: 1000\\n   }\\n}'&quot;}]\" :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=\"'Example response with PayPal available'\" :id=\"'payment-methods-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"paymentMethods\\\": [\\n        {\\n            \\\"name\\\": \\\"PayPal\\\",\\n            \\\"type\\\": \\\"paypal\\\"\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"additional-parameters-payments\">Add additional parameters to your \/payments request<\/h2>\n<p>When you <a href=\"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only#make-a-payment\">make a payment<\/a>, add the following parameters:<\/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> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-lineItems\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">lineItems<\/a><\/td>\n<td><\/td>\n<td>Price and product information about the purchased items. For each item, you only need to send <code>quantity<\/code>, <code>description<\/code>, <code>itemCategory<\/code>, <code>sku<\/code>, <code>amountExcludingTax<\/code>, and <code>taxAmount<\/code>. <br> The allowed values for <code>itemCategory<\/code> are: <ul><li markdown=\"1\"><strong>DIGITAL_GOODS<\/strong>: goods that are stored, delivered, and used in electronic format.<\/li> <li markdown=\"1\"><strong>PHYSICAL_GOODS<\/strong>: tangible goods that can be shipped with proof of delivery.<\/li> <li markdown=\"1\"><strong>DONATION<\/strong>: a contribution or gift for which no goods or services are exchanged, usually to a not-for-profit organization.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td><code>additionalData.paypalPairingId<\/code><\/td>\n<td><\/td>\n<td> <strong>Only for customer-initiated transactions where you use the Fraudnet SDK and pass the same pairing ID to Fraudnet and Adyen.<\/strong> <br> A unique ID determined by you, to link a transaction to a Fraudnet PayPal risk session.  <div class=\"sc-notice info\"><div> PayPal refers to this ID as <em>pairing ID<\/em>, <em>CMID<\/em>, or <em>tracking ID<\/em>.<\/div><\/div><\/td>\n<\/tr>\n<tr>\n<td><code>additionalData.paypalRisk<\/code><\/td>\n<td><\/td>\n<td><strong>Only for marketplaces as well as merchants in specific verticals.<\/strong> <br>The <a href=\"#paypal-risk-fields\">PayPal risk fields<\/a> that PayPal told you to send. You must include these fields in an <code>additional_data<\/code> array and send this in <a href=\"#risk-fields-formatting\">stringified format<\/a>. <div class=\"sc-notice info\"><div> Contact your PayPal account manager to learn which <code>paypalRisk<\/code> 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 <a href=\"#risk-field-marketplaces\">common risk fields for marketplaces<\/a>. <\/div><\/div><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example payment request for PayPal'\" :id=\"'payments-request'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v71\\\/payments \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-X POST \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;paypal\\&quot;,\\n    \\&quot;subtype\\&quot;: \\&quot;sdk\\&quot;\\n  },\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;lineItems\\&quot;: [\\n    {\\n      \\&quot;quantity\\&quot;: 1,\\n      \\&quot;description\\&quot;: \\&quot;Red Shoes\\&quot;,\\n      \\&quot;itemCategory\\&quot;: \\&quot;PHYSICAL_GOODS\\&quot;,\\n      \\&quot;sku\\&quot;: \\&quot;ABC123\\&quot;,\\n      \\&quot;amountExcludingTax\\&quot;: 590,\\n      \\&quot;taxAmount\\&quot;: 10\\n    },\\n    {\\n      \\&quot;quantity\\&quot;: 3,\\n      \\&quot;description\\&quot;: \\&quot;Polkadot Socks\\&quot;,\\n      \\&quot;itemCategory\\&quot;: \\&quot;PHYSICAL_GOODS\\&quot;,\\n      \\&quot;sku\\&quot;: \\&quot;DEF234\\&quot;,\\n      \\&quot;amountExcludingTax\\&quot;: 90,\\n      \\&quot;taxAmount\\&quot;: 10\\n    }\\n  ],\\n  \\&quot;additionalData\\&quot;: {\\n    \\&quot;paypalRisk\\&quot;: \\&quot;{\\\\\\&quot;additional_data\\\\\\&quot;:[{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_first_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Simon\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_last_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Hopper\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;receiver_account_id\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;AH00000000000000000000001\\\\\\&quot;}]}\\&quot;\\n  }\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v41.1.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.model.checkout.*;\\nimport java.time.OffsetDateTime;\\nimport java.util.*;\\nimport com.adyen.model.RequestOptions;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nLineItem lineItem1 = new LineItem()\\n  .quantity(1L)\\n  .itemCategory(\\&quot;PHYSICAL_GOODS\\&quot;)\\n  .amountExcludingTax(590L)\\n  .description(\\&quot;Red Shoes\\&quot;)\\n  .sku(\\&quot;ABC123\\&quot;)\\n  .taxAmount(10L);\\n\\nLineItem lineItem2 = new LineItem()\\n  .quantity(3L)\\n  .itemCategory(\\&quot;PHYSICAL_GOODS\\&quot;)\\n  .amountExcludingTax(90L)\\n  .description(\\&quot;Polkadot Socks\\&quot;)\\n  .sku(\\&quot;DEF234\\&quot;)\\n  .taxAmount(10L);\\n\\nAmount amount = new Amount()\\n  .currency(\\&quot;USD\\&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(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  .lineItems(Arrays.asList(lineItem1, lineItem2))\\n  .amount(amount)\\n  .merchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  .paymentMethod(new CheckoutPaymentMethod(payPalDetails))\\n  .additionalData(new HashMap&lt;String, String&gt;(Map.of(\\n      \\&quot;paypalRisk\\&quot;, \\&quot;{\\\\\\&quot;additional_data\\\\\\&quot;:[{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_first_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Simon\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_last_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Hopper\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;receiver_account_id\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;AH00000000000000000000001\\\\\\&quot;}]}\\&quot;\\n  )))\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  .shopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;&lt;?php\\n\\\/\\\/ Adyen PHP API Library v29.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-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$lineItem1 = new LineItem();\\n$lineItem1\\n  -&gt;setQuantity(1)\\n  -&gt;setItemCategory(\\&quot;PHYSICAL_GOODS\\&quot;)\\n  -&gt;setAmountExcludingTax(590)\\n  -&gt;setDescription(\\&quot;Red Shoes\\&quot;)\\n  -&gt;setSku(\\&quot;ABC123\\&quot;)\\n  -&gt;setTaxAmount(10);\\n\\n$lineItem2 = new LineItem();\\n$lineItem2\\n  -&gt;setQuantity(3)\\n  -&gt;setItemCategory(\\&quot;PHYSICAL_GOODS\\&quot;)\\n  -&gt;setAmountExcludingTax(90)\\n  -&gt;setDescription(\\&quot;Polkadot Socks\\&quot;)\\n  -&gt;setSku(\\&quot;DEF234\\&quot;)\\n  -&gt;setTaxAmount(10);\\n\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;USD\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\n$checkoutPaymentMethod\\n  -&gt;setSubtype(\\&quot;sdk\\&quot;)\\n  -&gt;setType(\\&quot;paypal\\&quot;);\\n\\n$paymentRequest = new PaymentRequest();\\n$paymentRequest\\n  -&gt;setReference(\\&quot;YOUR_ORDER_NUMBER\\&quot;)\\n  -&gt;setLineItems(array($lineItem1, $lineItem2))\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setPaymentMethod($checkoutPaymentMethod)\\n  -&gt;setAdditionalData(\\n    array(\\n      \\&quot;paypalRisk\\&quot; =&gt; \\&quot;{\\&quot;additional_data\\&quot;:[{\\&quot;key\\&quot;:\\&quot;sender_first_name\\&quot;,\\&quot;value\\&quot;:\\&quot;Simon\\&quot;},{\\&quot;key\\&quot;:\\&quot;sender_last_name\\&quot;,\\&quot;value\\&quot;:\\&quot;Hopper\\&quot;},{\\&quot;key\\&quot;:\\&quot;receiver_account_id\\&quot;,\\&quot;value\\&quot;:\\&quot;AH00000000000000000000001\\&quot;}]}\\&quot;\\n    )\\n  )\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  -&gt;setShopperReference(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;payments($paymentRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .NET API Library v34.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, also include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nLineItem lineItem1 = new LineItem\\n{\\n  Quantity = 1,\\n  ItemCategory = \\&quot;PHYSICAL_GOODS\\&quot;,\\n  AmountExcludingTax = 590,\\n  Description = \\&quot;Red Shoes\\&quot;,\\n  Sku = \\&quot;ABC123\\&quot;,\\n  TaxAmount = 10\\n};\\n\\nLineItem lineItem2 = new LineItem\\n{\\n  Quantity = 3,\\n  ItemCategory = \\&quot;PHYSICAL_GOODS\\&quot;,\\n  AmountExcludingTax = 90,\\n  Description = \\&quot;Polkadot Socks\\&quot;,\\n  Sku = \\&quot;DEF234\\&quot;,\\n  TaxAmount = 10\\n};\\n\\nAmount amount = new Amount\\n{\\n  Currency = \\&quot;USD\\&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 = \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  LineItems = new List&lt;LineItem&gt;{ lineItem1, lineItem2 },\\n  Amount = amount,\\n  MerchantAccount = \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod = new CheckoutPaymentMethod(payPalDetails),\\n  AdditionalData = new Dictionary&lt;string, string&gt;\\n  {\\n\\n    { \\&quot;paypalRisk\\&quot;, \\&quot;{\\\\\\&quot;additional_data\\\\\\&quot;:[{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_first_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Simon\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_last_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Hopper\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;receiver_account_id\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;AH00000000000000000000001\\\\\\&quot;}]}\\&quot; }\\n  },\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference = \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.1.0\\nconst { Client, CheckoutAPI, Config, EnvironmentEnum } = require('`@adyen\\\/api-library`');\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst paymentRequest = {\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  amount: {\\n    currency: \\&quot;USD\\&quot;,\\n    value: 1000\\n  },\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  paymentMethod: {\\n    type: \\&quot;paypal\\&quot;,\\n    subtype: \\&quot;sdk\\&quot;\\n  },\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  lineItems: [ {\\n    quantity: 1,\\n    description: \\&quot;Red Shoes\\&quot;,\\n    itemCategory: \\&quot;PHYSICAL_GOODS\\&quot;,\\n    sku: \\&quot;ABC123\\&quot;,\\n    amountExcludingTax: 590,\\n    taxAmount: 10\\n  }, {\\n    quantity: 3,\\n    description: \\&quot;Polkadot Socks\\&quot;,\\n    itemCategory: \\&quot;PHYSICAL_GOODS\\&quot;,\\n    sku: \\&quot;DEF234\\&quot;,\\n    amountExcludingTax: 90,\\n    taxAmount: 10\\n  } ],\\n  additionalData: {\\n    paypalRisk: \\&quot;{\\\\additional_data\\\\:[{\\\\key\\\\:\\\\\\&quot;sender_first_name\\\\\\&quot;,\\\\value\\\\:\\\\\\&quot;Simon\\\\\\&quot;},{\\\\key\\\\:\\\\\\&quot;sender_last_name\\\\\\&quot;,\\\\value\\\\:\\\\\\&quot;Hopper\\\\\\&quot;},{\\\\key\\\\:\\\\\\&quot;receiver_account_id\\\\\\&quot;,\\\\value\\\\:\\\\\\&quot;AH00000000000000000000001\\\\\\&quot;}]}\\&quot;\\n  }\\n}\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v21.2.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v21\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\nlineItem1 := checkout.LineItem{\\n  Quantity: common.PtrInt64(1),\\n  ItemCategory: common.PtrString(\\&quot;PHYSICAL_GOODS\\&quot;),\\n  AmountExcludingTax: common.PtrInt64(590),\\n  Description: common.PtrString(\\&quot;Red Shoes\\&quot;),\\n  Sku: common.PtrString(\\&quot;ABC123\\&quot;),\\n  TaxAmount: common.PtrInt64(10),\\n}\\n\\nlineItem2 := checkout.LineItem{\\n  Quantity: common.PtrInt64(3),\\n  ItemCategory: common.PtrString(\\&quot;PHYSICAL_GOODS\\&quot;),\\n  AmountExcludingTax: common.PtrInt64(90),\\n  Description: common.PtrString(\\&quot;Polkadot Socks\\&quot;),\\n  Sku: common.PtrString(\\&quot;DEF234\\&quot;),\\n  TaxAmount: common.PtrInt64(10),\\n}\\n\\namount := checkout.Amount{\\n  Currency: \\&quot;USD\\&quot;,\\n  Value: 1000,\\n}\\n\\npayPalDetails := checkout.PayPalDetails{\\n  Subtype: common.PtrString(\\&quot;sdk\\&quot;),\\n  Type: \\&quot;paypal\\&quot;,\\n}\\n\\npaymentRequest := checkout.PaymentRequest{\\n  Reference: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  LineItems: []checkout.LineItem{\\n      lineItem1, lineItem2,\\n  },\\n  Amount: amount,\\n  MerchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  PaymentMethod: checkout.PayPalDetailsAsCheckoutPaymentMethod(&amp;payPalDetails),\\n  AdditionalData: &amp;map[string]string{\\n    \\&quot;paypalRisk\\&quot;: \\&quot;{\\\\\\&quot;additional_data\\\\\\&quot;:[{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_first_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Simon\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_last_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Hopper\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;receiver_account_id\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;AH00000000000000000000001\\\\\\&quot;}]}\\&quot;,\\n  },\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  ShopperReference: common.PtrString(\\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\&quot;UUID\\&quot;).PaymentRequest(paymentRequest)\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v14.0.0\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;currency\\&quot;: \\&quot;USD\\&quot;,\\n    \\&quot;value\\&quot;: 1000\\n  },\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  \\&quot;paymentMethod\\&quot;: {\\n    \\&quot;type\\&quot;: \\&quot;paypal\\&quot;,\\n    \\&quot;subtype\\&quot;: \\&quot;sdk\\&quot;\\n  },\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;lineItems\\&quot;: [ {\\n    \\&quot;quantity\\&quot;: 1,\\n    \\&quot;description\\&quot;: \\&quot;Red Shoes\\&quot;,\\n    \\&quot;itemCategory\\&quot;: \\&quot;PHYSICAL_GOODS\\&quot;,\\n    \\&quot;sku\\&quot;: \\&quot;ABC123\\&quot;,\\n    \\&quot;amountExcludingTax\\&quot;: 590,\\n    \\&quot;taxAmount\\&quot;: 10\\n  }, {\\n    \\&quot;quantity\\&quot;: 3,\\n    \\&quot;description\\&quot;: \\&quot;Polkadot Socks\\&quot;,\\n    \\&quot;itemCategory\\&quot;: \\&quot;PHYSICAL_GOODS\\&quot;,\\n    \\&quot;sku\\&quot;: \\&quot;DEF234\\&quot;,\\n    \\&quot;amountExcludingTax\\&quot;: 90,\\n    \\&quot;taxAmount\\&quot;: 10\\n  } ],\\n  \\&quot;additionalData\\&quot;: {\\n    \\&quot;paypalRisk\\&quot;: \\&quot;{\\\\\\&quot;additional_data\\\\\\&quot;:[{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_first_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Simon\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;sender_last_name\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;Hopper\\\\\\&quot;},{\\\\\\&quot;key\\\\\\&quot;:\\\\\\&quot;receiver_account_id\\\\\\&quot;,\\\\\\&quot;value\\\\\\&quot;:\\\\\\&quot;AH00000000000000000000001\\\\\\&quot;}]}\\&quot;\\n  }\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v11.2.0\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'ADYEN_MERCHANT_ACCOUNT',\\n  :amount =&gt; {\\n    :currency =&gt; 'USD',\\n    :value =&gt; 1000\\n  },\\n  :shopperReference =&gt; 'YOUR_UNIQUE_SHOPPER_ID',\\n  :reference =&gt; 'YOUR_ORDER_NUMBER',\\n  :paymentMethod =&gt; {\\n    :type =&gt; 'paypal',\\n    :subtype =&gt; 'sdk'\\n  },\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..',\\n  :lineItems =&gt; [ {\\n    :quantity =&gt; 1,\\n    :description =&gt; 'Red Shoes',\\n    :itemCategory =&gt; 'PHYSICAL_GOODS',\\n    :sku =&gt; 'ABC123',\\n    :amountExcludingTax =&gt; 590,\\n    :taxAmount =&gt; 10\\n  }, {\\n    :quantity =&gt; 3,\\n    :description =&gt; 'Polkadot Socks',\\n    :itemCategory =&gt; 'PHYSICAL_GOODS',\\n    :sku =&gt; 'DEF234',\\n    :amountExcludingTax =&gt; 90,\\n    :taxAmount =&gt; 10\\n  } ],\\n  :additionalData =&gt; {\\n    :paypalRisk =&gt; '{\\\\:additional_data\\\\ =&gt; [{\\\\:key\\\\ =&gt; \\\\'sender_first_name\\\\',\\\\:value\\\\ =&gt; \\\\'Simon\\\\'},{\\\\:key\\\\ =&gt; \\\\'sender_last_name\\\\',\\\\:value\\\\ =&gt; \\\\'Hopper\\\\'},{\\\\:key\\\\ =&gt; \\\\'receiver_account_id\\\\',\\\\:value\\\\ =&gt; \\\\'AH00000000000000000000001\\\\'}]}'\\n  }\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v30.1.0\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\n\\\/\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\nconst config = new Config({\\n  apiKey: \\&quot;ADYEN_API_KEY\\&quot;,\\n  environment: EnvironmentEnum.TEST\\n});\\n\\nconst client = new Client(config);\\n\\n\\\/\\\/ Create the request object(s)\\nconst lineItem1: Types.checkout.LineItem = {\\n  quantity: 1,\\n  itemCategory: \\&quot;PHYSICAL_GOODS\\&quot;,\\n  amountExcludingTax: 590,\\n  description: \\&quot;Red Shoes\\&quot;,\\n  sku: \\&quot;ABC123\\&quot;,\\n  taxAmount: 10\\n};\\n\\nconst lineItem2: Types.checkout.LineItem = {\\n  quantity: 3,\\n  itemCategory: \\&quot;PHYSICAL_GOODS\\&quot;,\\n  amountExcludingTax: 90,\\n  description: \\&quot;Polkadot Socks\\&quot;,\\n  sku: \\&quot;DEF234\\&quot;,\\n  taxAmount: 10\\n};\\n\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;USD\\&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: \\&quot;YOUR_ORDER_NUMBER\\&quot;,\\n  lineItems: [lineItem1, lineItem2],\\n  amount: amount,\\n  merchantAccount: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  paymentMethod: payPalDetails,\\n  additionalData: {\\n    \\&quot;paypalRisk\\&quot;: \\&quot;{\\&quot;additional_data\\&quot;:[{\\&quot;key\\&quot;:\\&quot;sender_first_name\\&quot;,\\&quot;value\\&quot;:\\&quot;Simon\\&quot;},{\\&quot;key\\&quot;:\\&quot;sender_last_name\\&quot;,\\&quot;value\\&quot;:\\&quot;Hopper\\&quot;},{\\&quot;key\\&quot;:\\&quot;receiver_account_id\\&quot;,\\&quot;value\\&quot;:\\&quot;AH00000000000000000000001\\&quot;}]}\\&quot;\\n  },\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  shopperReference: \\&quot;YOUR_UNIQUE_SHOPPER_ID\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The response includes the <code>action.type<\/code>: <strong>redirect<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with an additional action'\" :id=\"'payments-response'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"resultCode\\\" : \\\"RedirectShopper\\\",\\n    \\\"action\\\" : {\\n        \\\"paymentMethodType\\\" : \\\"paypal\\\",\\n        \\\"url\\\":\\\"https:\\\/\\\/test.adyen.com\\\/hpp\\\/checkout.shtml?u=redirectPayPal&amp;p=eJxtkt..\\\",\\n        \\\"method\\\" : \\\"GET\\\",\\n        \\\"type\\\" : \\\"redirect\\\"\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<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<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<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>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=\"\/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=\"\/risk-management\/configure-standard-risk-rules\">standard risk rules<\/a> or <a href=\"\/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=\"\/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=\"\/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=\"\/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=\"refunds\">Refunds<\/h2>\n<p>If you have not captured a PayPal payment, you can <a href=\"\/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 refund it.<\/p>\n<h2 id=\"recurring\">Recurring payments<\/h2>\n<p>To prepare for making recurring payments:<\/p>\n<ol>\n<li>Enable recurring payments.<\/li>\n<li>Configure webhooks to ensure they include details about recurring payments.<\/li>\n<\/ol>\n<p>Then you can make recurring payments:<\/p>\n<ol>\n<li>In the initial payment request, include specific parameters to create a token.<br \/>\nThis token represents the shopper's stored payment details.<\/li>\n<li>In the later recurring payment requests, use the token. <\/li>\n<\/ol>\n<h3>Enable recurring payments<\/h3>\nTo enable recurring payments for PayPal, follow these steps:<ol>\n<li>Contact PayPal Support to enable <strong>Reference Transactions<\/strong> on your seller account.<\/li>\n<li>Enable the recurring permissions on your PayPal account. Follow the steps described in the section <a href=\"\/payment-methods\/paypal\/setup-paypal-direct-merchants\/\">Give Adyen access to your PayPal account<\/a>, and also grant the permissions <strong>Charge an existing customer based on a prior transaction<\/strong> and <strong>Create and manage Recurring Payments<\/strong>.<\/li>\n<\/ol>\n<h3>Configure webhooks<\/h3>\n<p>Enable the <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Recurring tokens life cycle events<\/a> webhook to receive a  <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 when you create a token.<\/p>\n<p>This webhook contains a <code>storedPaymentMethodId<\/code>, that you need to make a recurring payment later.<\/p>\n<h3 id=\"create-a-token\">Create a token<\/h3>\n<p>To create a token, include the following parameters 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:<\/p>\n<ul>\n<li><code>recurringProcessingModel<\/code>: <strong>Subscription<\/strong> or <strong>UnscheduledCardOnFile<\/strong><\/li>\n<li><code>shopperInteraction<\/code>: <strong>Ecommerce<\/strong><\/li>\n<li><code>shopperReference<\/code>: Your unique identifier for the shopper<\/li>\n<li><code>storePaymentMethod<\/code>: <strong>true<\/strong><\/li>\n<li><code>shopperEmail<\/code>: Required when making a zero-value authorization request with <code>amount.value<\/code>: <strong>0<\/strong>. Do not include this parameter if the request is not for a zero-value authorization.<\/li>\n<\/ul>\n<p>When the payment has been settled, you receive a  <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> <a href=\"\/development-resources\/webhooks\">webhook<\/a> containing:<\/p>\n<ul>\n<li><code>type<\/code>: <strong>recurring.token.created<\/strong><\/li>\n<li><code>shopperReference<\/code>: your unique identifier for the shopper.<\/li>\n<li><code>eventId<\/code>: the <code>pspReference<\/code> of the initial payment.<\/li>\n<li><code>storedPaymentMethodId<\/code>: the token that you need to make recurring payments for this shopper.<\/li>\n<\/ul>\n<div class=\"notices green\">\n<p>Make sure that your server is able to receive the <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Recurring tokens life cycle events<\/a> webhook. You can <a href=\"\/development-resources\/webhooks\/#set-up-webhooks-in-your-customer-area\">set up this webhook in your Customer Area<\/a>.<\/p>\n<\/div>\n<h3 id=\"make-payment-with-token\">Make a payment with a token<\/h3>\n<p>To make a later, recurring payment with the token, include in your  <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> request:<\/p>\n<ul>\n<li><code>paymentMethod.storedPaymentMethodId<\/code>: The <code>storedPaymentMethodId<\/code> 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.\n<div class=\"notices green\">\n<p>You can also get this value using the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Recurring\/latest\/post\/listRecurringDetails\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/listRecurringDetails<\/a> endpoint.<\/p>\n<\/div><\/li>\n<li><code>shopperReference<\/code>: The unique shopper identifier that you specified when creating the token.<\/li>\n<li><code>shopperInteraction<\/code>: <strong>ContAuth<\/strong>.<\/li>\n<li><code>recurringProcessingModel<\/code>: <strong>Subscription<\/strong> or <strong>UnscheduledCardOnFile<\/strong>.<\/li>\n<\/ul>\n<h2 id=\"test\">Test and go live<\/h2>\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=\"\/payment-methods\/paypal\/setup-paypal-direct-merchants#dev-sandbox-accounts\">Set up PayPal<\/a>.\n<\/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=\"\/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\/build-your-integration\/advanced-flow\/?platform=Web&amp;integration=API%20only\"\n                        target=\"_self\"\n                        >\n                    API-only integration guide\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/payment-methods\/paypal\/api-only","articleFields":{"description":"Add PayPal to your API-only integration.","never_cache_twig":true,"parameters":{"flow":"Advanced","integration_guide_url":"\/online-payments\/build-your-integration\/advanced-flow\/?platform=Web&integration=API%20only","payment_method":"PayPal","payment_method_type":"paypal","payment_method_type_capitalized":"Paypal","tx_variant":"paypal","tx_variant_capitalized":"Paypal","country_codes":"<strong>AU<\/strong>, <strong>AT<\/strong>, <strong>BE<\/strong>, <strong>BR<\/strong>, <strong>BG<\/strong>, <strong>CA<\/strong>, <strong>HR<\/strong>, <strong>CY<\/strong>, <strong>CZ<\/strong>, <strong>DK<\/strong>, <strong>EE<\/strong>, <strong>FI<\/strong>, <strong>FR<\/strong>, <strong>DE<\/strong>, <strong>GIB<\/strong>, <strong>HK<\/strong>, <strong>HU<\/strong>, <strong>IS<\/strong>, <strong>ID<\/strong>, <strong>IE<\/strong>, <strong>IT<\/strong>, <strong>JP<\/strong>, <strong>LV<\/strong>, <strong>LT<\/strong>, <strong>LU<\/strong>, <strong>MY<\/strong>, <strong>MT<\/strong>, <strong>NL<\/strong>, <strong>NZ<\/strong>, <strong>PH<\/strong>, <strong>PL<\/strong>, <strong>PT<\/strong>, <strong>RO<\/strong>, <strong>SK<\/strong>, <strong>SI<\/strong>, <strong>KR<\/strong>, <strong>ES<\/strong>, <strong>SE<\/strong>, <strong>CH<\/strong>, <strong>TH<\/strong>, <strong>UA<\/strong>, <strong>AE<\/strong>, <strong>GB<\/strong>, <strong>US<\/strong>","currency_codes":"<strong>AUD<\/strong>, <strong>BGN<\/strong>, <strong>CAD<\/strong>, <strong>CHF<\/strong>, <strong>CZK<\/strong>, <strong>DKK<\/strong>, <strong>EUR<\/strong>, <strong>GBP<\/strong>, <strong>HKD<\/strong>, <strong>NOK<\/strong>, <strong>PLN<\/strong>, <strong>SEK<\/strong>, <strong>USD<\/strong>","additional_api":"true","api_version":"none","action_type":"<strong>redirect<\/strong>","pm_directory":"paypal","contact":"false"}},"algolia":{"url":"https:\/\/docs.adyen.com\/payment-methods\/paypal\/api-only","title":"PayPal for API only","content":"You can add PayPal to your existing integration. The following instructions show only what you must add to your integration specifically for PayPal.\nIf an instruction on this page corresponds with a step in the main integration guide, it includes a link to corresponding step of the main integration guide.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nMake sure that you have an existing API-only integration.\n \n\n\nRedirect handling\nMake sure that your existing integration is set up to handle the redirect.   action.type: redirect.\n\n\n\nSetup steps\nBefore you begin:add PayPal in your Customer Area. complete the PayPal setup steps.\n\n\n\nHow it works\n\nThe shopper selects PayPal as the payment method.\nIf applicable,the shopper enters their details in the payment form that you build.\nWhen you make the payment request, you include additional information about the items that the shopper intends to purchase.\n\nBuild your payment form\nInclude PayPal in the list of available payment methods.\nYou don't have to include other fields in the payment form to collect information from your shopper .\n\nYou can download the logo for PayPal to use in your form.\n\nGet PayPal as an available payment method\nWhen you make the  \/paymentMethods to get available payment methods, specify the following so that PayPal is included in the response.\n\n\n\nParameter\nValues\n\n\n\n\n countryCode\nAU, AT, BE, BR, BG, CA, HR, CY, CZ, DK, EE, FI, FR, DE, GIB, HK, HU, IS, ID, IE, IT, JP, LV, LT, LU, MY, MT, NL, NZ, PH, PL, PT, RO, SK, SI, KR, ES, SE, CH, TH, UA, AE, GB, US\n\n\n amount.currency\nAUD, BGN, CAD, CHF, CZK, DKK, EUR, GBP, HKD, NOK, PLN, SEK, USD\n\n\n\n\n    \n\n\n    \n\nAdd additional parameters to your \/payments request\nWhen you make a payment, add the following parameters:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\n lineItems\n\nPrice and product information about the purchased items. For each item, you only need to send quantity, description, itemCategory, sku, amountExcludingTax, and taxAmount.  The allowed values for itemCategory are: DIGITAL_GOODS: goods that are stored, delivered, and used in electronic format. PHYSICAL_GOODS: tangible goods that can be shipped with proof of delivery. DONATION: a contribution or gift for which no goods or services are exchanged, usually to a not-for-profit organization.\n\n\nadditionalData.paypalPairingId\n\n Only for customer-initiated transactions where you use the Fraudnet SDK and pass the same pairing ID to Fraudnet and Adyen.  A unique ID determined by you, to link a transaction to a Fraudnet PayPal risk session.   PayPal refers to this ID as pairing ID, CMID, or tracking ID.\n\n\nadditionalData.paypalRisk\n\nOnly for marketplaces as well as merchants in specific verticals. The PayPal risk fields that PayPal told you to send. You must include these fields in an additional_data array and send this in stringified format.  Contact your PayPal account manager to learn which paypalRisk 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 common risk fields for marketplaces. \n\n\n\n\n    \n\nThe response includes the action.type: redirect.\n\n    \n\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\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.\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.\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\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.\nRecurring payments\nTo prepare for making recurring payments:\n\nEnable recurring payments.\nConfigure webhooks to ensure they include details about recurring payments.\n\nThen you can make recurring payments:\n\nIn the initial payment request, include specific parameters to create a token.\nThis token represents the shopper's stored payment details.\nIn the later recurring payment requests, use the token. \n\nEnable recurring payments\nTo enable recurring payments for PayPal, follow these steps:\nContact PayPal Support to enable Reference Transactions on your seller account.\nEnable the recurring permissions on your PayPal account. Follow the steps described in the section Give Adyen access to your PayPal account, and also grant the permissions Charge an existing customer based on a prior transaction and Create and manage Recurring Payments.\n\nConfigure webhooks\nEnable the Recurring tokens life cycle events webhook to receive a  recurring.token.created webhook when you create a token.\nThis webhook contains a storedPaymentMethodId, that you need to make a recurring payment later.\nCreate a token\nTo create a token, include the following parameters in your initial  \/sessions or  \/paymentspayment request:\n\nrecurringProcessingModel: Subscription or UnscheduledCardOnFile\nshopperInteraction: Ecommerce\nshopperReference: Your unique identifier for the shopper\nstorePaymentMethod: true\nshopperEmail: Required when making a zero-value authorization request with amount.value: 0. Do not include this parameter if the request is not for a zero-value authorization.\n\nWhen the payment has been settled, you receive a  recurring.token.created webhook containing:\n\ntype: recurring.token.created\nshopperReference: your unique identifier for the shopper.\neventId: the pspReference of the initial payment.\nstoredPaymentMethodId: the token that you need to make recurring payments for this shopper.\n\n\nMake sure that your server is able to receive the Recurring tokens life cycle events webhook. You can set up this webhook in your Customer Area.\n\nMake a payment with a token\nTo make a later, recurring payment with the token, include in your  \/sessions or  \/payments request:\n\npaymentMethod.storedPaymentMethodId: The storedPaymentMethodId from the  recurring.token.created webhook.\n\nYou can also get this value using the  \/listRecurringDetails endpoint.\n\nshopperReference: The unique shopper identifier that you specified when creating the token.\nshopperInteraction: ContAuth.\nrecurringProcessingModel: Subscription or UnscheduledCardOnFile.\n\nTest and go live\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.\n\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                    API-only integration guide\n                \n","type":"page","locale":"en","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"PayPal","lvl3":"PayPal for API only"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/payment-methods","lvl2":"https:\/\/docs.adyen.com\/payment-methods\/paypal","lvl3":"\/payment-methods\/paypal\/api-only"},"levels":4,"category":"Payment method","category_color":"green","tags":["PayPal"]},"articleFiles":{"payment-methods-response.json":"<p alt=\"\">payment-methods-response.json<\/p>","payments-request.js":"<p alt=\"\">payments-request.js<\/p>","payments-response.json":"<p alt=\"\">payments-response.json<\/p>"}}
