Home > WooCommerce > Docs > Setup PayPal Sandbox on WooCommerce to Test Transactions

How to Setup PayPal Sandbox on WooCommerce to Test Transactions

Last updated: August 01, 2024
Written and researched by experts at AvadaLearn more about our methodology

By Sam Nguyen

CEO Avada Commerce

With the development of eCommerce today, PayPal has become one of the most popular payment options that many people around the world prefer. Therefore, integrating with online stores is also the top priority with any merchant.

However, PayPal is a third-party payment, so it sometimes causes problems during the checkout process. This, in many cases, makes customers confused and can lead to cart abandonment.

So, how can we fix it? How can people test the integration between PayPal and eCommerce stores before offering it to customers?

The solution for it is PayPal sandbox. Understanding the difficulty of entrepreneurs, PayPal introduced the sandbox mode to its users, which creates a mock transaction for them to test. This mock test is entirely the same as in the live environment, so merchants can check it without affecting other customers.

In this post, we will guide you on how to set up PayPal sandbox on WooCommerce as well as use it to test transactions.

Benefits of PayPal sandbox

Via PayPal sandbox, merchants will have opportunities to test their checkout process before actually launching it. By doing that, they can make sure that their customers will be served with the best services and complete the purchase with no problems, especially in terms of money, which are usually regarded as sensitive.

More than that, the sandbox mode in PayPal is a helpful tool for store owners to figure out problems or limitations in the checkout process. Only when putting themselves in their customers’ shoes, do merchants understand their demand and feelings to improve their store? Hence, their customers will be able to experience a fantastic shopping journey in your store.

How to set up PayPal sandbox on WooCommerce?

Note: To use PayPal sandbox, make sure that you have already integrated PayPal with your WooCommerce store and have at least one product in your store.

Step 1: Manage PayPal

Open your Wordpress dashboard and go to WooCommerce. There, click on Settings

Open settings

In the *Settings, open the **Payments tabs. You will see the list of payment options available in your store. Then, click on the Manage button in the row of PayPal.

Manage Paypal

Step 2: Enable PayPal sandbox

Scroll down and you will see the Advanced options. There, tick on the box of Enable PayPal sandbox.

Enable PayPal sandbox

Scroll down and you will see the block on PayPal API Credentials where you are required to enter Sandbox API username, Sandbox API password, *Sandbox API signature.

Step 3: Open Account

Go to PayPal dashboard and select Account. Open a new tab and log in to your PayPal account. There are two accounts available for users there, which are personal and business accounts.

Click on the symbol in the business account and select View/ edit account

View/ edit account

Step 4: Get API credentials in PayPal

A page of account details will be displayed on the screen and you need to open the API Credentials tab.

Then, copy the username, password, and signature.

Copy API credentials

Step 5: Paste API credentials into WooCommerce

Come back to the WooCommerce tab and paste the information to your API Credentials in WooCommerce.

Paste the api credentials

After that, click on Save changes and you complete setting up PayPal sandbox mode in WooCommerce.

How to test transactions in WooCommerce by PayPal sandbox?

Step 1: Make a purchase in your WooCommerce store

Login PayPal and create a personal account to prepare for the test transaction. Then, access your WooCommerce store, select a product, and add them to the cart.

You will be redirected to the checkout page. Enter the necessary information to complete the purchase as normal.

Billing details

Step 2: Foot the bill with PayPal sandbox account

Select PayPal in the payment options and move to the next page to foot the bill. There, use the account that you have just created to complete the checkout.

When it is done, you will see the notification of successful payment.

Successful payment

Step 3: Check order details on WooCommerce

Now, you can check the order details on WooCommerce to ensure that everything works well.

Open your WordPress dashboard, go to WooCommerce and open Orders.

Open orders

You will see a list of orders there; click on the one that you have just completed and the detailed information of the order will be shown on the screen. You can check it to guarantee that the data is true.

Order details

Final thoughts

In conclusion, it can be seen that the sandbox mode of PayPal is a powerful tool that enables developers to test the platform before actually introducing it to their customers. WooCommerce store owners can minimize the technical problems in the checkout process and support their customers well. Moreover, according to the guide above, set up PayPal sandbox on WooCommerce to test transactions is easy as pie so that anyone can do it in their WooCommerce store.


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.