PayPal is probably one of the most popular and best-known payment gateways out there.
One of the many advantages of using the WooCommerce plugin to power your e-commerce store is that it is compatible with PayPal Stanard and you don’t need to install any add-ons to start accepting payments via PayPal.
PayPal Standard takes customers from your checkout page to the PayPal website so that they can pay using their PayPal account, and once the transaction is complete the customer will be returned to your website. And unlike PayPal Pro, PayPal Standard doesn’t have a monthly fee.
In this post, I’ll show you how to set up a PayPal business account and connect it to your WooCommerce store.
Click the links below to jump to the relevant section:
- Before we begin…
- 1 | Set up a PayPal business account
- 2 | Confirm your email address
- 3 | Set up PayPal Instant Payment Notifications (IPN)
- 4 | Enable PayPal Standard in WooCommerce
- 5 | Connect your PayPal business account to WordPress
- 6 | Enable PayPal sandbox and set up a test PayPal account
- 7 | Make a test purchase
- 8 | Check the test payment was a success in WooCommerce
- 9 | Switch to live mode
Before we begin…
Before you connect PayPal to WooCommerce, you first need to make sure you have the WooCommerce plugin installed on your WordPress website. You won’t get very far without it!
Here are some blog posts I have written about getting started with WooCommerce that you might find helpful:
- How to install and set up WooCommerce on your WordPress website
- How to add new products to your WooCommerce shop on WordPress
- Everything you need to know about pages and permalinks in WooCommerce
- How to customise the appearance of your WooCommerce shop
As well as having WooCommerce installed, your website must also have a valid SSL certificate and your website must be running on HTTPS.
All good? Great! Let’s get started…
1 | Set up a PayPal business account
First things first you need to set up a business account with PayPal. It must be a business account as you cannot connect a personal PayPal account to WooCommerce.
To set up a business account with PayPal, head over to the PayPal website and under the heading Business click on Get Started.
Then enter the email address that you want to use for your business account.
Next, you will be asked to create a password and to provide some details about you and your business.
You will then be asked for a few more details about your business. Start by selecting the type of business you run and then the other questions about your business like what you sell and what your website URL is.
Finally, you will be asked to confirm your address and provide your date of birth.
And that’s it; you’ve successfully set up a PayPal business account.
2 | Confirm your email address
In order to accept payments via PayPal, you will need to confirm your email address.
After signing up to PayPal you will receive a number of emails including one asking to confirm your email address that looks like this:
Simply click on Confirm Your Email, log into your PayPal account and you’re done!
3 | Set up PayPal Instant Payment Notifications (IPN)
The next thing we are going to do while you are still logged into your PayPal business account is set up something called Instant Payment Notifications (or IPN for short). IPN allows PayPal to communicate with your WooCommerce shop and tells your shop if a payment has been successful or not.
It is important to set up PayPal IPN to ensure that WooCommerce works correctly. You can carry out this step at any point, but I recommend doing it while you are logged into to your PayPal business account to stop you from jumping around too much!
To set up PayPal IPN, click on the cog icon that looks like this:
This will take you to the My Profile page. On the left-hand side, click on My selling preferences, then click on Update next to the Instant payment notifications option.
On the next page, click on Choose IPN Settings.
Next you will be asked to enter your notification URL.
Your notificaiton URL if simply your website URL followed by /?wc-api=WC_Gateway_Paypal. So it should look something like this:
Once you’d added this in, make sure you select Receive IPN messages and then click Save.
You should then see a confirmation message that looks like this:
4 | Enable PayPal Standard in WooCommerce
Once you have set up your PayPal account correctly, head over to your WordPress admin area.
To access the payment settings, hover over WooCommerce in the left-hand menu and select Settings.
On the Settings page, you will see a number of tabs at the top of the screen. You need to click on the Payments tab.
This will take you to the Payments settings page where you will see a list of all the payment methods that are available to you. One of these options is PayPal.
To enable PayPal payments, simply click on the enabled switch next to the PayPal option. If it’s enabled, the toggle button will be purple.
5 | Connect your PayPal business account to WordPress
Once PayPal has been enabled, click the Set up button next to this option to access the PayPal settings page.
You will notice lots of options here on the PayPal settings page but we’re only going to go through the important ones in this tutorial.
The most important option here is the PayPal email. This is what connects your PayPal business account to your WooCommerce account so that you can actually accept payments.
So go ahead and paste in the email address that you used to set up your PayPal business account.
Click Save changes at the bottom of the page when you’re done. You’re now ready to start taking payments via PayPal!
6 | Enable PayPal sandbox and set up a test PayPal account
Now, you could stop here and your WooCommerce shop would be ready to start accepting payments.
However, I always recommend that you test your WooCommerce store with PayPal before enabling live payments. This is just to make sure everything is working on, and that when you do start taking actual payments, everything is working for your customers.
On the PayPal settings page, you will see the Enable PayPal sandbox. Tick the box next to this to enable testing mode.
As you can see, under this option there is a tick and a link to PayPal developer account. If you click on this you will be taken to the PayPal developer website.
If you aren’t already logged in, click on Log into Dashboard and enter your login details. You can use the same details that you use for your PayPal business acount.
Once you have logged in (or if you are logged in already), click on your name in the top right-hand corner of the page and then click on My Account.
Once you are into your account, select Accounts from the left-hand side of the screen.
By default, you should see two sandbox PayPal accounts (i.e. for testing purposes only); one is a business account and one is a personal account.
However, we are going to ignore these accounts and create our own. To do this, click on Create Account at the top of the Sandbox Accounts page.
Start by selecting your country, and then select Personal (Buyer Account) for the account type.
Next, enter a fake email address for your test account and a password. Don’t forget these details as you will need them later on when you make a test purchase.
Now let’s move on to payment methods. You need to specify an amount of money that will be in the fake PayPal account. This can be anything you like, but of course, make sure it’s enough to cover the cost of the test purchase!
When you’re done, click Create Account to finish.
You’ll now see your new test account in your list of sandbox accounts.
7 | Make a test purchase
Now you have sandbox PayPal account, it’s time to make a test purchase.
To do this, go through the process of adding an item from your WooCommerce shop to your cart and proceed to the checkout.
Fill in all of your details on the checkout page just as you would if you were an actual customer, and when you are ready to make your test payment, click on Proceed to PayPal.
This will take you to the PayPal website and specifically the PayPal login page. It is important that log in using the email and password you used when creating your test account on PayPal!
Once you have logged into the account you will see the payment options page. You can either pay using your PayPal balance or if you added a card to your test account, you can select a card to pay with.
And at this point, just double check that you are definitely logged in using your test account!
When you’re ready, click Pay Now.
If the test payment has worked you should get a confirmation message like this:
If you click Return to Merchant, this should take you to the confirmation page on your WordPress website.
8 | Check the test payment was a success in WooCommerce
As a customer, you have seen that your payment has been made. But it’s always good practice to make sure that payment has successfully gone through to your WooCommerce site.
To do this, log into the WordPress admin area, hover over WooCommerce in the left-hand menu of WordPress and click Orders.
If the transaction went through successfully, you should see it here:
9 | Switch to live mode
If you’ve tested PayPal and you are happy with everything, the final step is to turn off sandbox mode.
To do this, return to the PayPal settings page in WooCommerce (see step 4 if you need a reminder), and untick the box next to the PayPal sandbox option.
And when you’re done, click Save changes at the bottom of the page.
Looking for more helpful advice?
Sign up to receive my free monthly newsletter!
On the last Friday of each month, I send out my monthly newsletter jam-packed with tips, tricks and resources to help you create and maintain the WordPress website of your dreams. And it’s completely free!
Simply enter your name and email below to sign up…