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.

Autres façons dont nous pouvons vous aider

Nous utiliserons des fichiers de témoins pour améliorer et personnaliser votre expérience si vous continuez à naviguer. Pouvons-nous utiliser des fichiers de témoins pour vous présenter des publicités personnalisées ? Obtenir plus d'informations et gérer vos fichiers de témoins