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

Developer Resources

Access documentation, APIs and more

Braintree Support

Find technical information on processing with Braintree

Site Status

Get status on scheduled maintenance and more

Personal Help

Get help with using any of our PayPal products

Business Help

Get help with using any of our PayPal products

Message Center

Send, receive, and view your PayPal messages