The Danger of Multiple WooCommerce stores and one PayPal Account

As many of you know I’ve been working on my own products at Never5 for some time now. I currently have 4 webshops where I sell various WordPress plugins, 3 of them run on WooCommerce. Today I found out about an issue that might be a shop-owners worst nightmare, customers that try to place an order but can’t pay.

Someone sent me this email today:

I wanted to purchase a developer license. Unfortunately the PayPal-Gateway doesn’t seem to work.
We received a confirmation email, that an account was created. I can see the purchase in my account (/my-account/) and that the payment is still pending. If I try to pay from there, I still get the following message from PayPal:

“This invoice has already been paid. For more information, please contact the merchant

Your purchase couldn’t be completed
There’s a problem with the merchant’s PayPal account. Please try again later”.

Apparently WooCommerce was creating the order, leaving it at pending and PayPal would not allow the user to pay for the order because according to them it was already paid for. After doing some research I found out that PayPal keeps track of the Invoice ID you pass to them and actually checks upon payment if an order with that Invoice ID has already been paid.

WooCommerce allows you to prefix the invoice ID, having a default prefix of WC-. The problem I was running into is that I never changed this default prefix, for all 3 of my WooCommerce shops. So when someone purchased a Related Posts for WordPress Premium license, WooCommerce would generate a PayPal invoice ID of WC– + ORDER_ID. As an example this would result in: WC-100.

Normally this would be unique, because you can’t have 2 orders with the same ID in WooCommerce. But I have 3 WooCommerce shops, so there’s a chance that an order with the same ID was done at PayPal by one of my other shops. When this was the case PayPal would prevent the user from paying the order because a payment for the same invoice ID was already recorded.

Luckily the solution is very simple. You go to your PayPal settings in WooCommerce and make sure every store has an unique invoice prefix, in my case like this:

WooCommerce prefix PayPal invoice ID

This was quite an annoying and hard to track down issue because it doesn’t happen all the time. WooCommerce uses WordPress’s default post ID’s so this value increments at a different rate per shop and even if multiple shops get an order with an overlapping ID they have to be paid for with the same payment provider (PayPal in this case). On top of that I was very lucky that the person running into this issue today contacted me (!!). Most people would close the tab and move on, making you lose a sale because of a misconfiguration.

Looking at my shop history there were multiple pending and failed orders that could be caused by this misconfiguration. I’m not saying they are, there are also a lot of people who just close their browser at the payment screen for various reasons.

I hope this helps you in solving (or even better, preventing) this specific issue. Losing sales because of silly things like this makes you sad panda shop-owner.

Related Posts

Powered By Related Posts for WordPress
Click Here to Learn More About Related Posts for WordPress

2 thoughts on “The Danger of Multiple WooCommerce stores and one PayPal Account

  1. HI Barry, I’m looking at implementing 2 woocommerce sites to one paypal account. I have both sites using different prefixes, however my question relates to how you set up the return address in paypal? Surely it can only be set to one site. Any advice would be great! thanks.

  2. Thank so a lot for posting this Barry! I am new to WooCommerce and trying to learn everything I can. I’m considering making my 3 sites all WooCommerce accessible and so I’m happy to see that it is a possibility.

Leave a Reply

Your email address will not be published. Required fields are marked *