You’ve created your WooCommerce store, uploaded all your products and are ready to accept payments via PayPal. But how can you know for certain if PayPal will work as expected with your store?
Most people will make a small purchase with a friend’s PayPal account as a live test. But that costs real money and is annoying if you have to test multiple times. This post explains how to test the payment system using the PayPal Sandbox.
The PayPal Sandbox is a place where you can test your shopping cart and other PayPal integrations in a realistic way, except that no money changes hands. This means you can test your PayPal processes in the Sandbox and know they will behave the same on the when you go live.
The PayPal Sandbox environment comprises the following:
- The Sandbox test site (https://www.sandbox.paypal.com/)
- The Sandbox Accounts page (accessed through https://developer.paypal.com)
You should take some time to read the official documentation.
How it all fits together
Here are the steps that this post will show you:
- Login to the PayPal developer website with your existing PayPal account
- Create Sandbox test accounts for the shop owner, and another one for a buyer
- Set the WooCommerce PayPal settings to the shop owner’s API details WooCommerce
- Make test purchases – without spending any real money
Login to the PayPal developer website
The first thing you need to do is to login to the PayPal developer website: http://developer.paypal.com
Use your existing PayPal username and password to login. Once logged in you’ll arrive at the Dashboard. Navigate to Applications → Sandbox accounts (screenshot above).
Create Sandbox test accounts
Now we’ll need to create 2 test accounts – 1 for the merchant (representing your shop’s PayPal account) and 1 for a buyer (representing a customer).
Click the Create Account button to create an account.
You can make up an email address since no emails will ever be sent here. I like to use use
@whatever.com to remind me that it’s a merchant (business) account. It’s also useful to enter a name for the merchant account – this will appear on the make payment screen later.
PayPal’s documentation is pretty poor, so through trial and error and googling I found that passwords must contain symbols, numbers, upper-case characters. Also, I read that it’s best to have a starting balance of less than $1000.00.
Tip: I use
$andb0xPa$$w0rd as the password, and repeat it for all Sandbox test accounts so I don’t need to remember multiple passwords.
Configure WooCommerce PayPal settings
Now go back to your WooCommerce store. Go to your WordPress dashboard → WooCommerce → Settings → Payment Gateways → PayPal. Configure it like the following:
- Select checkbox: Enable PayPal standard
- Use the merchant test account email you created in Step 2 above for the PayPal & Receiver email
- Select checkbox: Enable PayPal sandbox
Save changes to save the settings.
Now the PayPal payment method is in test mode and will only accept test payments. Attempts to make payment with real PayPal accounts will result in payment failure. Keep in mind this only affects your PayPal payment method. If you have other payment gateways active (bank transfer, Authorize.net, etc) they will still accept real payments.
Make a test purchase
Now you can make a test purchase using the buyer test account. Using a different browser, visit your store and make a purchase. After you click the Place Order button, you will be sent to test store on the PayPal Sandbox to make your payment.
You’ll know that it’s the test store because “test store” is visible in the store name and the URL is
www.sandbox.paypal.com. PayPal may also add a Test Site label to the top or bottom of the page.
Login with the buyer test account and confirm the payment. Click the Return to merchant link to complete the order.
Congratulations! You’ve made a test payment with PayPal – without using any real money. Were there problems during the checkout process? Well you can make repeat test payments again and again till you solve the problem.
The Sandbox works almost exactly like the real PayPal site. One of the differences is that it doesn’t send any payment sent / received or error emails. To view those emails, you have to click on the notifications link for the appropriate account in the Sandbox Accounts page.
Remember that the payments are test payments. However, keep in mind that WooCommerce will still record them as orders in the system and will generate and send order confirmations, invoices, etc. Remember to delete these orders once you’re done testing.
And finally once you’re done testing, don’t forget to go to your WooCommerce settings to disable the sandbox and enter your real PayPal account details.
Documentation poor? I’ll say! I’ve wasted hours on it, and loads of other people have.
Nice article. You’re right about the documentation on Paypal – it’s diabolical.
Anyway, wonder if you could help. I followed everything you’ve done. My purchases go through ok, Sandbox Paypal notifications are there, the woocommerce order is fine, but no emails are sent to the test customer which is a real email address. Have tried multiple emails but they’re not sending.
The emails send for my other two payment methods – BACS and cheque. Is there something I should look for in woocommerce or Paypal sandbox to make sure sales emails are sent?
With Sandbox transactions, all transactions including emails are simulated including the emails sent from PayPal. If you’re looking for the PayPal transaction emails they’ll be on the notifications page within the PayPal developer portal
If you mean the WooCommerce order received / completed emails, those should be sent as usual. If they are not being sent, try a plugin like WP SMTP
Thanks for the reply David. I can’t see why the other payment methods would trigger emails to be sent to the customer but paypal in sandbox mode does not. The order is at processing mode which according to Woocommerce documentation is ‘Processing – Payment received and stock has been reduced- the order is awaiting fulfilment’
I get the IPN notification from paypal notification so there is nothing wrong with the woocommerce setup. I shouldn’t need to add a plugin to send emails as they send perfectly well for the other payment methods. I’ll give it a crack though and see what happens….
An update. Adding that wp-smtp plugin worked. Emails now sending out. Amazing. Thanks for the advice.
Great to hear. Not sure why that’s the case but I’ve heard that it works
Another plugin that’s useful is Email Log. That will report all the emails that are sent via WordPress
David, this is amazing doc thank you very mach really… However my problem is same with Dave despite I already use the wp-smtp plug-in. All payment methods are fine to send woo-commerce email but the paypal mmmm no way. I’ve made a real payment with a real credit card but, nope. Do you have any idea to figure out how to get rid of that 🙂
This works great on the regular paypal setting, but what about the Advanced extension? I enabled the sandbox option, but this plugin doesn’t use a simple email account. Do you know how I can get this working?
Here is the settings page…
Here is what I get when I use our normal credentials…
If you paid for the extension the best thing to do is contact WooThemes support directly – http://support.woothemes.com. Let us know if you solve the problem, thanks!
Probable it’s too late but may be useful for others whose experiencing the same. This is due to Currency Unit allowed with your WooCommerce and PayPal sandbox. Changing to USD both of them is a solution
Hi MG thanks for that! Am sure many will find that tip useful
Will do. The funny thing is that I asked them about how to test the checkout process and they sent me to this thread 🙂
Did they ever get back to you? What’s the solution?
is there anyway to get the back to web site name rather than the merchant paypal email address during checkout process?
Hi Dylan, yes there is a setting somewhere which I used to change the name of my test store to “Max Merchant’s Test Store” in the example above. The setting is buried somewhere in the Sandbox settings at developer.paypal.com – good hunting!
I had sandbox enabled for a while when testing everything. Unwittingly, I kept it enabled and a couple of orders actually came through. They seemingly were processed by paypal and everything (however the funds are not showing in my paypal account) and I have just realized that the sandbox option has been checked this whole time 🙁
Do you think the payments were ever really processed and they’re sitting out there somewhere in the ether or have I just stupidly lost money?
Yikes! Unfortunately you will not be receiving any payments for those transactions. You should contact your customers to say that there was a problem processing their payments and you need them to re-purchase / send their payment again..
Dammit. Well, good to know for sure. Thanks for the response – and great article!
No problem. Please feel free to contact us directly if you need further help with WooCommerce. Good luck with your store 🙂
I am still trying to get this resolved with Woo, but in the meantime maybe you have some advise. I have tried a few different combinations of username/password of the sandbox account in the Woo PayPal Advanced plugin but no luck. Take a look at these two screenshots and let me know what should go where…
Woo plugin settings…
Sandbox user settings…
Any help/advice would be appreciated 🙂
I’ve used your method also and notice your screenshots u only get
1) Paypal Login
2) Create Pay Pal Account.
Funny is you don’t get to pay directly with a credit card without a paypal account as per how it should work as a paypal standard.
I’m scratching my head. Hope you have something
Can’t believe just a few minutes after i posted here i found this website
Apparently u need to go make paypal account optional in order to accept cc.
Yup, PayPal wants you to help them gain customers by default. Thanks for sharing that link!
I want paypal login on custom image .Dont want to display paypal’s standard button. So is it possible to use custom image for paypal login ??
The best place to find an answer to your question is the PayPal documentation. Good luck
Thanks great staff
After following your instructions on setting up the sandbox test store I tried testing it as a customer. Everything on the WooCommerce side seemed to work perfectly, but each time it’s rejected my ACTUAL PayPal email and password. I’m probably missing something, but I can’t for the life of me figure out what. I’ve tried it using 4 different browsers on 2 computers with no luck. Any help will be greatly appreciated.
Hi Doug, I’m not sure that you can / should use live (actual) PayPal info in sandbox mode. The sandbox should be for testing only. If you want to test with a live account you should configure the site with live merchant account details.
I was pretty sure that was wrong, but I had been trying with the email and password set up in the PayPal Sandbox and have only ever gotten the prompt: “You are logging into the account of the seller for this purchase. Please change your login information and try again.” Change to what login information? All I’ve entered, as per your instructions, was the email I made up: [email protected] and the suggested password. And those won’t work as stated above. Thanks.
hey, i just worked with this system… i’m able to pay as a buyer but there is no payment in the merchant’s paypal account on sandbox.
“payment to” is there in the buyer’s account but the payment is unclaimed plus there is no “payment from” in the merchant’s account on sandbox.
David, thanks you help me a lot.
David, thank you so much for clearing up the messy fog of the paypal sandbox!!! I wouldn’t have wasted the time trying to figure it out without your guidance.
thanks a lot
David, THANK YOU! This was a life saver for me … made getting my store online so easy.
David, you sir are a gentleman and a scholar! Instead of burning through hours of trial and error setting up and testing, I can now focus on the things my clients will care about. I’m stoked I found your article. Thanks so much!
Thank you so much for this article!
My problem seems similar to Kiri’s but I didn’t get a clear answer out of those comments. I had a sandbox account set up and some customers made real credit card payments through it. The payments show up in the sandbox business account but I haven’t asked the customers if their real credit card accounts lost balance. Would they lose balance and also is there a way to refund or transfer that money if they lost credit card balance?
Thanks a lot in advance.
Hi Josh. Yes their payments would show up because the Sandbox simulates all transactions as accurately as possible. This means that your store will also think that the orders are “real” and cause it to reduce stock, send out confirmation emails, etc.
On the buyer side though, they shouldn’t have been charged. Can you please check and report back and I’ll update my article. Thanks
Thanks for the great info. I’m starting a digital download ecommerce site for a single product and I use the woocommerce plugin. Is there a way to avoid my customers having to enter any personal information on my site (e.g., name, address, etc) and complete the entire transaction on paypal? Thanks.
Hi Bob, this post isn’t the place to ask questions like this. You should post in the WordPress or WooCommerce support forums for advice. Good luck with your site.
Thank you David. Your article here is absolute gold! Really helped me out.
Kashif Muhammad Qasim
Thanks a Trillion! You made my day 🙂
Hi David. Thanks for putting together such a well written post. Screenshots very helpful and enough text to be clear but still read quickly. It’s been very helpful.
This is a great tutorial, simple to follow..I am having a problem however as I can get no further than the WooCommerce Paypal settings page: it won’t accept the sandbox merchant email account? I have tried with 4 different email accounts (fake) that i have associated with Sandbox accounts. It will only accept my real business email that is linked to my real Paypal account. ???
Nice, detailed article about testing with PayPal, which everybody needs to be doing prior to launching their website…especially developers of plugins, which unfortunately I find all too often doesn’t happen.
I wound up developing my own PayPal extension for Woo which integrates Express Checkout and Payments Pro and makes the integrate with PayPal a lot more seamless than what comes with Woo by default (and improves greatly upon what Woo sells for EC and Pro.)
Check it out, it’s free! http://wordpress.org/plugins/paypal-for-woocommerce/
Hi there – great post, wish I’d found earlier ! I actually stumbled through and figured it out, but now am stuck on one issue: negative testing. I’d like to force an error situation, and have seen this lengthy explanation on sandbox https://developer.paypal.com/docs/classic/lifecycle/sb_error-conditions/
but am at a loss as to how to implement it in woo commerce. Any ideas/tips?
Hi Jenny, sorry but this article is about the extent of my knowledge of the PayPal sandbox. I think the best people to ask are the WooThemes ninjas. If you do get an answer please let us know. Thanks!
Nicely explained, though first time I had some issues while creating Sandbox account, luckyly I found a very good tutorial on: Wpblog, they have listed very easy to follow instructions, so do check it out too.
Documentation could be a bit more clearer – after logging into Paypal Sandbox with my own credentials two accounts were (must be) automatically created so instructions to Create 2 accounts was confusing. Ended up creating 2 new accounts – using @gmail.com addresses worked (using the suggested email address resulted in message “must use valid email address”).
Remaining test was successful first time! Now moving on to moving test site to production! Wish me luck!
Things have moved around a little on Woo Commerce since this was written, but your procedure still works. And the PayPal documentation has not improved. THANK YOU!