Hello @fabioweb
The error DUPLICATE_INVOICE_ID error is a security feature from PayPal that aims 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.
So when your prefix is set to “cfbdg-” and your order number is “123”, PayPal Payments sends the invoice ID “cfbdg-123” to PayPal.
Under certain circumstances, for example, when you restore a backup from your website, it is possible that the most recent WooCommerce orders do not exist anymore after the restore.
So as soon as WooCommerce attempts to create a new order with the number 123 and the same invoice prefix, PayPal throws this error to prevent accidental double payments because there is already a payment at PayPal with the same invoice ID. You can change the invoice prefix in the “Connection Tab”.
Moreover, this feature can be disabled, though we usually recommend keeping it enabled. To disable it, follow these steps:
- Log in to your Business PayPal account (https://www.paypal.com/businessmanage/preferences/payments)
- Go to the Payments Preferences section
- Under the “Block accidental payments:” section, select the option “No, allow multiple payments per invoice ID“
With this feature disabled, PayPal would no longer complain when you submit an invoice number that already exists in the system.
Regards,
Femi.