Aide - Compte Particulier
  • Accueil
  • Paiements et transferts
  • Litiges et restrictions
  • Mon compte
  • Mon portefeuille
  • Connexion et sécurité
  • Outils pour les vendeurs

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] =>
    [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.

Autres manières d'obtenir de l'aide

Si vous acceptez les cookies, nous les utiliserons pour améliorer votre expérience et permettre à nos partenaires de vous présenter des publicités PayPal personnalisées lorsque vous visitez d'autres sites. En savoir plus et gérer les cookies