• Payments and Transfers
  • Disputes and Limitations
  • My Account
  • My Wallet
  • Login & Security
  • Seller Tools

How do I avoid duplicate transactions?

Blocking duplicate invoice IDs

To avoid duplicate transactions, you need to pass an invoice number to the PayPal system. This feature is available for PayPal Payments Standard (also known as Website Payments Standard) and PayPal Payments Pro (SOAP and NVP). Once you configure your profile to block duplicate invoice numbers, PayPal will check whether each passed invoice number has already been paid in your account. For example, if invoice 1001 has been paid, 1001 will be denied if it is passed to the PayPal account a second time.

Here's how to block duplicate invoice IDs in your profile:
  1. Log in to your PayPal account.
  2. Select the gear next to Log out in the upper right corner of the page.
  3. Click Account Settings.
  4. Under Account & Security, click Payment Preferences.
  5. Click Update next to Block payments.
  6. Select Yes, block multiple payments per invoice ID under Block accidental payments.
  7. Click Save.
Passing invoice numbers to PayPal Payments Standard To pass an invoice number to PayPal Payments Standard, add a line of code to your existing button code, similar to the following example:
<input type="hidden" name="invoice" value="001">

Note: You can't add this code to a button originally created as encrypted.

Passing invoice IDs to PayPal Payments Pro
For PayPal Payments Pro, the parameter you pass depends on the type of API calls you're making.
  • For SOAP, use InvoiceID.
  • For NVP, use INVNUM.
Preventing duplicate transactions and retrying REST API transactions using PayPal-Request-Id To prevent duplicate REST API transactions, use the variable PayPal-Request-Id. When you add this variable to your integration, it prevents duplicate transactions with the same value. It also allows you to resubmit transactions if the system times out before you get an API response back to verify that a previous transaction completed. 

When a duplicate transaction uses the same PayPal-Request-Id, it will return the following example response:
    [message] => The value of PayPal-Request-Id header has already been used
    [information_link] => https://developer.paypal.com/webapps/developer/docs/api/#DUPLICATE_REQUEST_ID
    [debug_id] => b008929a73c5f

See REST API authentication and headers for more information on using PayPal-Request-Id.

PayPal Payments Pro returns API error code 10412 if it detects a duplicate invoice number. For a complete list of API error codes, and details regarding the 10412 error, see API error codes.
Was this article helpful?

More ways we can help

Resolution Center
Fix transaction and account related issues
Community Forum
Join the discussion with PayPal customers
Tax center
Get your 1099-K and other tax info here
Business Help
Get help with using any of our PayPal products
Technical Help
Find out how PayPal works for your business
Contact Us
Contact customer service
Message Center
Send, receive, and view your PayPal messages
How are we doing?
Take our survey