No momento, esta página não está disponível em português
Payment-method icon

Troubleshooting PayPal errors

Troubleshoot common PayPal issues in a Web Drop-in or Components integration using the /payments endpoint.

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.

This troubleshooting information applies to Web Drop-in and Web Components integrations using the /payments endpoint.

PayPal overlay keeps loading

What it means

When 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.

How to troubleshoot

The 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.

Stuck on "Processing Payment"

What it means

After 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.

How to troubleshoot

This 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 request, passing the state.data from onAdditionalDetails.

Custom payment button doesn't work

What it means

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 showPayButton to false. However, using a custom button to submit PayPal transactions is not possible.

How to troubleshoot

The 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.

Console errors

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.

Expected currency from order api call to be USD, got EUR. Please ensure you are passing currency=EUR to the sdk url.

What it means

This 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:

{
   ...
   amount: {
            currency: "EUR",
            value: 1000
          }
   ...  
}

How to troubleshoot

Check if the paymentMethodsConfiguration object of the Web Drop-in or Component has the same amount.currency as the actual /payments request.

Error: Expected intent from order api call to be capture, got authorize. Please ensure you are passing intent=authorize to the sdk url.

What it means

This error indicates there is a mismatch between the intent set in the payment method configuration and the intent passed to PayPal's SDK.

How to troubleshoot

For Web Drop-in v3.13.0 or earlier, the intent must be passed dynamically from the payment method configuration. Ensure 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.

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.

What it means

This error occurs when the wrong PayPal Merchant ID is configured in the payment method settings.

How to troubleshoot

Look up your PayPal Merchant ID, and contact our Support Team to verify if the same PayPal Merchant ID is set up on your account.

See also