If you’re running a WooCommerce store, testing your payment gateway before going live is essential. PayPal provides a sandbox environment that allows you to simulate real transactions without using actual money.
This guide walks you through setting up and testing the PayPal payment gateway in WooCommerce step by step.
Step 1: Create a PayPal Developer Account
To begin testing, you need a PayPal Developer account.
- Go to PayPal Developer and sign up
- Once registered, you’ll get two sandbox accounts by default:
- Business Account – acts as the seller
- Personal Account – acts as the buyer
You will use:
- Business account → to connect with WooCommerce
- Personal account → to test transactions
Step 2: Enable Sandbox Mode
Log in to your PayPal Developer Dashboard and ensure sandbox mode is active.
- Access Sandbox Accounts to view test accounts
- Go to API Credentials to get connection details
- Make sure Sandbox Mode is enabled
Step 3: Enable PayPal in WooCommerce
Now configure PayPal inside your WordPress dashboard:
- Go to WooCommerce → Settings → Payments
- Click Manage under PayPal
- Enable Sandbox Mode
You will see fields for:
- Sandbox Email Address
- Sandbox Merchant ID
- Client ID
- Secret Key
Step 4: Get Sandbox Credentials
From your PayPal Developer dashboard:
- Go to API Credentials
- Select your Business Sandbox Account
- Copy the following:
- Sandbox Email Address
- Client ID
- Secret Key
To find your Merchant ID:
- Go to Sandbox Accounts
- Open your Business account
- Check Account Info → Account ID
Paste all these details into WooCommerce PayPal settings.
Step 5: Test the Checkout Process
Now simulate a real purchase:
- Add a product to your cart
- Proceed to checkout
- Enter dummy billing details
- Use your Sandbox Personal Account email as the buyer
- Complete the payment
If configured correctly:
- The order will appear in WooCommerce → Orders
- The transaction will be visible in your PayPal Developer Dashboard
Final Tips
- Always use Business account credentials in WooCommerce
- Use Personal account for testing purchases
- Switch to Live Mode before going public
- Double-check currency and return URLs
Conclusion
Testing PayPal in WooCommerce ensures your checkout process works smoothly before accepting real payments. The sandbox environment helps you simulate transactions safely and identify issues early.
A properly tested payment gateway leads to a better user experience and fewer issues after launch.