You encounter an error when duplicate invoice IDs are sent to PayPal. This article shows you how to fix the issue by updating your PayPal Payment Receiving Preferences to allow multiple payments per invoice ID.
Description
Environments
Issue
When submitting payment, customers see the error message:
… main.CRITICAL: Exception message: PayPal gateway has rejected request. Payment has already been made for this InvoiceID (#10412: Duplicate invoice).
PayPal cannot process the payment and complete the order.
Cause
The error message is displayed when invoices with the same ID are submitted to PayPal multiple times.
This may happen when using the same credentials across several Adobe Commerce sites (even across the Local and the Staging environments). Particular scenarios might be the following:
By default, PayPal does not allow processing for the same invoice twice.
Resolution
Change your PayPal profile to allow for multiple payments per invoice ID. You need to make these changes through PayPal.