Troubleshooting

Before you start

↑ Back to top
  1.  Go to WooCommerce > Settings > Payments > PayPal > Settings tab > Expert Settings > Troubleshooting, turn on Logging, and reproduce the problem.
  2. Open WooCommerce > Status > Logs and select the woocommerce-paypal-payments source. Logs are kept for 30 days.
  3. Copy your System Status Report (WooCommerce > Status).
  4. Test with a default theme (Storefront) and only WooCommerce and PayPal Payments active. How to test for conflicts.
  5. reCAPTCHA rejections are logged separately under the source woocommerce-paypal-payments-recaptcha when Log rejected attempts is on in the reCAPTCHA settings.
  6. In WooCommerce > Status, the WooCommerce PayPal Payments section shows key checks, including Onboarded, WooCommerce currency supported, Webhook status, Webhook delivery host and Logging enabled. Check for any “No” before contacting support.

Common Errors

↑ Back to top

These errors have been reported over time and may have occurred for different users for various reasons. The error message may be the same for two different users, but the cause can be quite different. The cause often cannot be determined by the error alone.

Please get in touch with the support team when it is not clear how the error you experienced could be resolved.

Something went wrong. Please try again or choose another payment source.

↑ Back to top

This generic error can be caused by various factors, including but not limited to:

  • negative PayPal API responses (e.g. currency not supported or invalid characters)
  • potential plugin/theme conflicts
  • REST endpoint blocked
  • other web server configuration

These kinds of errors may be caused by a compatibility issue with a third-party plugin, an invalid plugin configuration, or temporary service disruptions at PayPal.

Usually, following advanced troubleshooting steps helps to isolate the cause of the problem.

The payee does not have a PayPal account.

↑ Back to top

This error can occur when the API credentials are invalid or the merchant’s PayPal account is not verified.

In some cases, disconnecting and reconnecting the account using the onboarding wizard may be sufficient to resolve the error. Other times, the merchant may need to reach out to the PayPal Merchant Support to clarify the account verification. In some cases this may require providing business identification.

DUPLICATE_INVOICE_ID

↑ Back to top

The error DUPLICATE_INVOICE_ID error is a security feature from PayPal to prevent accidental double payments.

PayPal Payments automatically sets an “invoice prefix” and then sends the WooCommerce order numbers in the pattern “invoice prefix + ordernumber” to PayPal. When the prefix is set to cfbdg- and the order number is 123, PayPal Payments sends the invoice ID cfbdg-123 to PayPal.

Under certain circumstances, PayPal Payments may send an invoice ID that already exists at PayPal and the transaction would fail. This can happen, for example, when an older backup from the website is restored, as the most recent WooCommerce orders may not exist anymore after the restore. As soon as WooCommerce attempts to create a new order with the number 123 and the same invoice prefix, PayPal would throw this error to prevent accidental double payments because there is already a payment at PayPal with the same invoice ID.

This feature can be disabled at PayPal, though the recommendation is to keep it enabled. Please ensure that every site using PayPal Payments with your account has a unique invoice prefix. To change it, go to WooCommerce > Settings > Payments > PayPal > Settings tab > Common settings > Invoice Prefix. A staging copy keeps the live site’s prefix, so change it there.

But to disable this feature at PayPal, follow these steps:

  1. Log in to your Business PayPal account (https://www.paypal.com/businessmanage/preferences/payments)
  2. Go to the Payments Preferences section
  3. Under the “Block accidental payments:” section, select the option “No, allow multiple payments per invoice ID”

With this feature disabled, PayPal no longer throws an error when an invoice number that already exists in the system is submitted.

Custom field not validated when clicking the PayPal button

↑ Back to top

Imagine you added custom code to your checkout page, which verifies if certain conditions are met when clicking “Place order”. The hook woocommerce_checkout_process is frequently used for validating that the condition is met. If the conditions are not met, it does not allow the order to be placed and displays an error message. Here is an example code snippet to add a checkbox to the checkout page and validate it:

/**
 * Add a checkbox field to the checkout
 **/
add_action( 'woocommerce_review_order_before_submit', function() {
    woocommerce_form_field( 'custom_checkbox', array(
        'type'          => 'checkbox',
        'required'      => true,
        'label'         => 'This checkbox must be checked to proceed with the payment.',
    )); 
}, 9 );

/**
 * Validate the checkbox on the checkout when clicking "Place order" button
 **/
add_action( 'woocommerce_checkout_process', function() {
    if ( ! isset( $_POST['custom_checkbox'] ) ) {
        wc_add_notice( __( 'Please acknowledge the required checkbox.' ), 'error' );
    }
});

Q: What happens? This code works with most payment methods, but the PayPal popup window opens despite the box not being checked. The validation step does not happen before the payment process starts.

A: The hook woocommerce_checkout_process is called only after creating the PayPal order (when closing the popup), so it would not be considered when clicking the PayPal button.

To solve this problem, you can use the hook woocommerce_after_checkout_validation because validate_checkout is called after clicking the smart button but before loading the popup window.

/**
 * Validate the checkbox field on the checkout when clicking "Place order" button & the PayPal smart buttons
 **/
add_action( 'woocommerce_after_checkout_validation', function() {
    if ( ! isset( $_POST['custom_checkbox'] ) ) {
        wc_add_notice( __( 'Please acknowledge the required checkbox.' ), 'error' );
    }
});

Alternatively, enabling the basic validation can help validate custom fields.

PayPal buttons are not displaying

↑ Back to top

While the buttons load, the regular Place order button is hidden. If they never appear:

  • Exclude cart, checkout, order-received and My Account pages from page and CDN caching.
  • Exclude the PayPal Payments scripts (/wp-content/plugins/woocommerce-paypal-payments/) and paypal.com scripts from minification, combining and delayed loading.

Why do PayPal scripts load on every page?

↑ Back to top

Scripts load only where buttons or Pay Later messaging are enabled. The Mini Cart location appears on almost every page, so enabling it loads the scripts site-wide. Disable Mini Cart buttons if page speed matters. To do so, go to the Styling tab, choose Mini Cart under Location, clear Enable payment methods in this location, and save.

Webhooks

↑ Back to top

Webhooks are messages PayPal sends to your site when a payment changes, for example when a pending payment completes or when you refund on paypal.com. If they do not arrive, orders can stay On hold, and refunds made on paypal.com are not added to the order.

To check them, go to WooCommerce > Settings > Payments > PayPal > Settings tab > Expert Settings > Troubleshooting > Webhooks. You see the Notification URL (ends in /wp-json/paypal/v1/incoming) and the Subscribed Events.

  1. Under Test webhooks, click Simulate webhooks. Wait for “The webhook was received successfully.”
  2. If you see “Looks like the webhook cannot be received. Check that your website is accessible from the internet.”, make sure the site is public: no maintenance or coming-soon mode, no password protection, and no firewall or security plugin blocking /wp-json/ requests from PayPal.
  3. If your domain or URL structure changed (for example after moving from staging or switching to HTTPS), click Resubscribe webhooks.
PayPal Payments Settings tab, Expert Settings, Troubleshooting section with the Logging toggle, webhook notification URL, subscribed events, and Resubscribe webhooks and Simulate webhooks buttons
Settings tab > Expert Settings > Troubleshooting: turn on Logging, check subscribed webhooks, and use Resubscribe webhooks or Simulate webhooks.

Failed, held or canceled payments

↑ Back to top
  • Order is On hold with the note “Payment initiation was successful, and is waiting for the buyer to complete the payment.” PayPal has not finished the payment yet. The order updates when PayPal sends the completion webhook. If it stays on hold, test webhooks (above) and check the payment in your PayPal account.
  • Order is On hold with payment status “Not captured”. Authorize Only is on. Capture the payment; see Managing Orders and Refunds.
  • Order is Failed with the note “Could not capture the payment.” Capturing an authorization failed, for example because it expired. Check the log for the reason. If the authorization is still valid, try Capture authorized PayPal payment again; otherwise ask the customer to pay again.
  • Order changed to Cancelled after payment. PayPal reported the capture as denied or reversed. Check the transaction in your PayPal account before shipping.
  • Admin notice “Your current WooCommerce store currency (…) is not supported by PayPal.” See Currencies.

Still stuck? Collect the PayPal Payments log and your System Status Report, then contact support.

Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.