{"title":"Troubleshooting PayPal errors","category":"default","creationDate":1776961628,"content":"<p>If an error occurs with integrating PayPal in your website or when you submit a PayPal payment, try troubleshooting the problem using the information provided here. For some common errors, we explain what they mean and how to fix them.<\/p>\n<div class=\"sc-notice info\"><div>\n<p>This troubleshooting information applies to Web Drop-in and Web Components integrations using the  <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> endpoint.<\/p>\n<\/div><\/div>\n<h2>PayPal overlay keeps loading<\/h2>\n<h4>What it means<\/h4>\n<p>When the shopper selects the <span translate=\"no\"><strong>PayPal<\/strong><\/span> button, the PayPal window loads with a spinning wheel but nothing updates. When this happens, the browser console doesn't always show a warning or error that indicates the PayPal SDK is not properly initialized.<\/p>\n<h4>How to troubleshoot<\/h4>\n<p>The PayPal window is initialized as soon as the shopper selects the <span translate=\"no\"><strong>PayPal<\/strong><\/span> button, in the <code>onSubmit<\/code> event handler. However, the window is not updated until the <code>action<\/code> object from the  <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> response is passed to the Drop-in or Component. If the PayPal overlay is stuck loading, check that you pass the full <code>response.action<\/code> object from your server to the Drop-in or Component.<\/p>\n<h2>Stuck on \"Processing Payment\"<\/h2>\n<h4>What it means<\/h4>\n<p>After the customer has completed the necessary steps in the PayPal window and selects the <span translate=\"no\"><strong>Pay<\/strong><\/span> button, the window closes. A message appears indicating that the payment is being processed, but the payment is not actually completed.<\/p>\n<h4>How to troubleshoot<\/h4>\n<p>This behavior indicates that you haven't made the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request. Because the PayPal <code>action.type<\/code> is <span translate=\"no\"><strong>sdk<\/strong><\/span>, you need to configure <code>onAdditionalDetails<\/code> for the PayPal Drop-in or Component. The <code>onAdditionalDetails<\/code> event handler must trigger a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> request, passing the <code>state.data<\/code> from <code>onAdditionalDetails<\/code>.<\/p>\n<h2>Custom payment button doesn't work<\/h2>\n<h4>What it means<\/h4>\n<p>This issue occurs when you try implement a single payment button for all payment methods including PayPal. You are trying to hide the PayPal button by setting <code>showPayButton<\/code> to <span translate=\"no\"><strong>false<\/strong><\/span>. However, using a custom button to submit PayPal transactions is not possible.<\/p>\n<h4>How to troubleshoot<\/h4>\n<p>The <span translate=\"no\"><strong>Pay<\/strong><\/span> button for PayPal is the \"PayPal smart button\". This makes a direct call to the PayPal library, to retrieve information about your PayPal account before processing the payment. This means that PayPal requires their button to be somewhere on the page to handle the payment, because there is no alternative method for you to retrieve your shopper's PayPal account information.<\/p>\n<h2>Console errors<\/h2>\n<p>We recommend testing PayPal transactions with the browser console open, and check for any errors reported in the console. The next sections discuss some of those errors. Note that if an error appears in the console, the transaction remains an open offer.<\/p>\n<h3>Expected currency from order api call to be USD, got EUR. Please ensure you are passing currency=EUR to the sdk url.<\/h3>\n<h4>What it means<\/h4>\n<p>This error occurs when you are using the  <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> endpoint and are not passing the currency code in the initialization of the Web Drop-in or Component. The <code>amount<\/code> object must include a <code>currency<\/code>. For example:<\/p>\n<pre><code class=\"language-json\">{\n   ...\n   amount: {\n            currency: \"EUR\",\n            value: 1000\n          }\n   ...\n}<\/code><\/pre>\n<h4>How to troubleshoot<\/h4>\n<p>Check if the <code>paymentMethodsConfiguration<\/code> object of the Web Drop-in or Component has the same <code>amount.currency<\/code> as the actual <code>\/payments<\/code> request.<\/p>\n<h3>Error: Expected intent from order api call to be capture, got authorize. Please ensure you are passing intent=authorize to the sdk url.<\/h3>\n<h4>What it means<\/h4>\n<p>This error indicates there is a mismatch between the <code>intent<\/code> set in the payment method configuration and the <code>intent<\/code> passed to PayPal's SDK.<\/p>\n<h4>How to troubleshoot<\/h4>\n<p>For <a href=\"\/pt\/payment-methods\/paypal\/web-drop-in\/?tab=config-payments_2#drop-in-v3-13-0-or-earlier\">Web Drop-in v3.13.0 or earlier<\/a>, the <code>intent<\/code> must be passed dynamically from the payment method configuration. Make sure that you are not overwriting this setting by passing the wrong <code>intent<\/code> value in the <code>paypalConfiguration<\/code> object. Also ensure that the <code>paymentMethodsResponse<\/code> contains the <code>paypalConfiguration<\/code> with the <code>intent<\/code> that corresponds with the authorisation type that is configured for your merchant account.<\/p>\n<h3>Payee(s) passed in transaction does not match expected merchant id. Please ensure you are passing merchant-id=XXXXXXXXXXXXX or merchant-id=XXXXXXXXXXXX@XXXX.com to the sdk url.<\/h3>\n<h4>What it means<\/h4>\n<p>This error occurs when the wrong PayPal Merchant ID is configured in the payment method settings.<\/p>\n<h4>How to troubleshoot<\/h4>\n<p>Check your PayPal Merchant ID as configured in the payment method settings and contact our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to verify if the same PayPal Merchant ID is set up on your account.<\/p>\n<h2 id=\"see-also\">See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/development-resources\/raw-acquirer-responses#paypal-raw-responses\"\n                        target=\"_self\"\n                        >\n                    PayPal raw responses\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/paypal\/paypal-troubleshooting","articleFields":{"description":"Troubleshoot common PayPal issues in a Web Drop-in or Components integration using the \/payments endpoint.","feedback_component":true,"type":"page"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/payment-methods\/paypal\/paypal-troubleshooting","title":"Troubleshooting PayPal errors","content":"If an error occurs with integrating PayPal in your website or when you submit a PayPal payment, try troubleshooting the problem using the information provided here. For some common errors, we explain what they mean and how to fix them.\n\nThis troubleshooting information applies to Web Drop-in and Web Components integrations using the  \/payments endpoint.\n\nPayPal overlay keeps loading\nWhat it means\nWhen the shopper selects the PayPal button, the PayPal window loads with a spinning wheel but nothing updates. When this happens, the browser console doesn't always show a warning or error that indicates the PayPal SDK is not properly initialized.\nHow to troubleshoot\nThe PayPal window is initialized as soon as the shopper selects the PayPal button, in the onSubmit event handler. However, the window is not updated until the action object from the  \/payments response is passed to the Drop-in or Component. If the PayPal overlay is stuck loading, check that you pass the full response.action object from your server to the Drop-in or Component.\nStuck on \"Processing Payment\"\nWhat it means\nAfter the customer has completed the necessary steps in the PayPal window and selects the Pay button, the window closes. A message appears indicating that the payment is being processed, but the payment is not actually completed.\nHow to troubleshoot\nThis behavior indicates that you haven't made the  \/payments\/details request. Because the PayPal action.type is sdk, you need to configure onAdditionalDetails for the PayPal Drop-in or Component. The onAdditionalDetails event handler must trigger a  \/payments\/details request, passing the state.data from onAdditionalDetails.\nCustom payment button doesn't work\nWhat it means\nThis issue occurs when you try implement a single payment button for all payment methods including PayPal. You are trying to hide the PayPal button by setting showPayButton to false. However, using a custom button to submit PayPal transactions is not possible.\nHow to troubleshoot\nThe Pay button for PayPal is the \"PayPal smart button\". This makes a direct call to the PayPal library, to retrieve information about your PayPal account before processing the payment. This means that PayPal requires their button to be somewhere on the page to handle the payment, because there is no alternative method for you to retrieve your shopper's PayPal account information.\nConsole errors\nWe recommend testing PayPal transactions with the browser console open, and check for any errors reported in the console. The next sections discuss some of those errors. Note that if an error appears in the console, the transaction remains an open offer.\nExpected currency from order api call to be USD, got EUR. Please ensure you are passing currency=EUR to the sdk url.\nWhat it means\nThis error occurs when you are using the  \/payments endpoint and are not passing the currency code in the initialization of the Web Drop-in or Component. The amount object must include a currency. For example:\n{\n   ...\n   amount: {\n            currency: \"EUR\",\n            value: 1000\n          }\n   ...\n}\nHow to troubleshoot\nCheck if the paymentMethodsConfiguration object of the Web Drop-in or Component has the same amount.currency as the actual \/payments request.\nError: Expected intent from order api call to be capture, got authorize. Please ensure you are passing intent=authorize to the sdk url.\nWhat it means\nThis error indicates there is a mismatch between the intent set in the payment method configuration and the intent passed to PayPal's SDK.\nHow to troubleshoot\nFor Web Drop-in v3.13.0 or earlier, the intent must be passed dynamically from the payment method configuration. Make sure that you are not overwriting this setting by passing the wrong intent value in the paypalConfiguration object. Also ensure that the paymentMethodsResponse contains the paypalConfiguration with the intent that corresponds with the authorisation type that is configured for your merchant account.\nPayee(s) passed in transaction does not match expected merchant id. Please ensure you are passing merchant-id=XXXXXXXXXXXXX or merchant-id=XXXXXXXXXXXX@XXXX.com to the sdk url.\nWhat it means\nThis error occurs when the wrong PayPal Merchant ID is configured in the payment method settings.\nHow to troubleshoot\nCheck your PayPal Merchant ID as configured in the payment method settings and contact our Support Team to verify if the same PayPal Merchant ID is set up on your account.\nSee also\n\n\n                    PayPal raw responses\n                \n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Payment methods","lvl2":"PayPal","lvl3":"Troubleshooting PayPal errors"},"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\/paypal-troubleshooting"},"levels":4,"category":"Payment method","category_color":"green","tags":["Troubleshooting","PayPal","errors"]}}
