I'm getting the error message, "The transaction was refused as a result of a duplicate invoice ID supplied. Attempt with a new invoice ID" when I try to process credit card payment through a PayPal Pro sandbox account.

How are invoice id generated in Exp-resso Store?

3 Answers 3


Store generates a new ID for each order (as Anna mentioned, this is based on the id column in the exp_store_orders table). Therefore it should not be possible for two orders to be created with the same ID, or payment to be submitted twice via Paypal.

What I assume happened is one of two things.

  • At some point in the past you have had different shopping cart software linked to this PayPal account. This means that Store is trying to re-use IDs which have already been used by different software linked to your PayPal account.
  • Alternatively, it's possible during testing you made a bunch of test orders, then deleted them and restarted Store's order numbering scheme, causing IDs to be reused. However, you didn't mention this in your question, so I'm going to assume this is not the case.

In any case, the easiest option is simply to disable PayPal's duplicate invoice ID check. Store already has its own checks to ensure orders are not paid twice, so the PayPal check is redundant. You can disable this check by logging into PayPal, under:

My Account > Profile > My Selling Tools > Credit Card Statement Name > "Allow multiple payments per invoice ID"


Thanks for the replies! I figured out the problem; I had two store installations during development, one local and one live. I'd test the site locally which would send a transaction to paypal. Then, I'd upload the changes to the live site where my client would test the latest updates. Naturally the live site didn't increment the orders I place from my local computer - hence the duplicate invoice IDs' when orders were sent from the live site!


I'm 99% sure the invoice number comes from the incremented "id" column in exp_store_orders. I wanted higher invoice numbers on a recent project so I manually changed the most recent test order "id" to 10000. That should work for you too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.