-
Notifications
You must be signed in to change notification settings - Fork 47
Testing Setup
Before being able to test purchases with the PayPal Payments gateway, you’ll need a sandbox business and customer/buyer account as well as a sandbox REST API app.
If you have signed up for a PayPal Developer account, it should already include a sandbox business account and a default REST API app which you can use for testing purposes as long as the REST API app is correctly configured. If you want to use those for testing WooCommerce PayPal Payments, skip to How to obtain my Sandbox API Credentials?.
Here’s how to create a Sandbox Business Account for PayPal Payments
- Create or log into a https://developer.paypal.com account
- After you have logged in to the developer dashboard, go to Sandbox > Accounts: (screenshot)
- You’ll see a list of sandbox accounts. Click on the “Create Account” button
- A new “Create Sandbox Account” modal should appear. Select the “Business (Merchant Account)” option and choose United States as the Country/Region
- To have more options when you create an account (like choosing the name, email, password, balance amount etc), you can click the Create Custom Account link at the bottom of the form: (screenshot)
- Click “Create” to finish creating your Sandbox Business Account
- You can find your new Sandbox Business Account in your list of sandbox accounts
Here’s how to create Sandbox Customer/Buyer Account for PayPal Payments:
- Log into https://developer.paypal.com
- After you have logged in to the developer dashboard, go to Sandbox > Accounts: (screenshot)
- You’ll see a list of sandbox accounts. Click on the “Create Account” button
- A new “Create Sandbox Account” modal should appear. Select the “Personal (Buyer Account)” option and choose United States as the Country/Region: (screenshot)
- Click “Create” to finish creating your Sandbox Customer Account
- You can find your new Sandbox Customer Account in your list of sandbox accounts
Here’s how to create a REST API app:
- Log into https://developer.paypal.com
- After you have logged in to the developer dashboard, go to "My Apps & Credentials" (screenshot)
- You'll see a list of REST API apps, including a default one named "Default Application" which can't be removed
- Click "Create App"
- Enter the details and make sure "App Type" is "Merchant" and the sandbox business account you created above is the one selected inside the "Sandbox Business Account" dropdown. (screenshot)
- Click "Create App" to finish creating your REST API app
- You'll be taken to a page with details on your new REST API app
- Scroll down to "App feature options" and make sure "Accept payments" is checked off
- Click "Advanced options" and make sure both "Vault" and "Billing agreements" are checked off (screenshot)
In order to process the checkout and test purchases, you will need a valid set of PayPal Sandbox API Credentials. Specifically, you will need:
- A sandbox business e-mail address and merchant ID (from your sandbox business account)
- A Client ID and Secret Key (from your REST API app)
To fetch these you will need a PayPal sandbox business account and a REST API app, which you should've created following the steps above. Assuming you already have a Sandbox Business Account and a REST API app (associated to that same sandbox business account) on your PayPal Developer account, here’s how to find the required credentials:
- Log into your PayPal account at https://developer.paypal.com and navigate to Sandbox > Accounts:
- You’ll see a list of sandbox accounts. Find the business account you want the API credentials for and click “...” (more options) button under the Manage Accounts column
- Once the modal loads, click View/Edit Account, and make sure you're on the Profile tab
- Take note of the "Email ID" and "Account ID". Those will be your "Sandbox E-mail address" and "Merchant ID" as required by the extension
- Click "My Apps & Credentials" on the left menu
- Choose the REST API app you created before
- Double check that the "Sandbox account" on this app is the same e-mail address from step 3
- Click "Show" under "Secret" to see the secret key
- Take note of "Client ID" and "Secret" as those will be required by the extension
- If necessary, fill in these details into the WooCommerce settings screen for the PayPal Payments extension