Why did I get API error code 10412?

To avoid API error code 10412 and duplicate transactions, you need to pass an invoice ID in your API payment request. This feature is available for PayPal Payments Standard, and PayPal Payments Pro (SOAP and NVP). Configure your profile to block duplicate invoice numbers. We will check whether the passed invoice ID has already been paid to your account. For example, if invoice ID 1001 has been paid, 1001 will be denied if it is passed in a subsequent API payment request.

To pass an invoice number to PayPal Payments Standard, add a line of HTML code to your existing button code, like the following example: 

<inpute type="hidden" name="invoice" value="001">

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

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


PayPal Payments Pro returns API error code 10412 if it detects a duplicate invoice number. 

See the Developer Portal for a complete list of NVP/SOAP API error codes.

More ways we can help

Resolution Center

Fix transaction and account related issues

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

Message Center

Send, receive, and view your PayPal messages

If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more