If you are using PayPal as the main payment gateway on your website, you may be wondering how you can complete a test transaction to ensure the payment process is running smoothly. In this tutorial, we will look at how you can use PayPal’s ‘test‘ mode known as Sandbox to complete test transactions with a PayPal sandbox account and a test card.
What is a PayPal Test Card?
PayPal, similar to Stripe offers a number of test cards so that website administrators can run through a variety of different transactions in a hassle-free manner. Each test card number relates to a certain type of credit or debit card. When you are running your website in PayPal sandbox, you can use a number of the test cards to complete transactions that follow the same process as live transactions, the only difference is no money is actually transacted.
If you are using a plugin such as the WP Express Checkout Plugin, a transaction where a test card was used will still display a transaction within the orders menu. This way admin can see the whole flow of events for a transaction. When testing your checkout, whether that be with the WP Express Checkout Plugin or another PayPal eCommerce solution, the best practice is to enable the debug log first so that you can resolve any issues that may occur.
What are the PayPal Test Card Numbers, Expiry and CVV?
If you wish to test out the checkout experience of a payment button you have set up using PayPal, you’ll need to ensure you have ‘test’ mode active. This can generally be found in the settings menu of the eCommerce plugin you are using. You will also need to have implemented your PayPal test API keys within the settings menu of the plugin to be able to run test or live transactions for that matter. If you are unsure where you can obtain your live and sandbox (test) keys for a PayPal eCommerce plugin, please have a read of the following documentation.
While there are testing cards for any scenario you can think up, generally, administrators wish to use a test card that will supply them with a successful transaction.
Below we have listed just a number of test card numbers, expiry’s and CVV’s that can be used to complete a successful (approved) PayPal sandbox transaction. If you wish to view all the PayPal test cards currently available, please take look at the following PayPal documentation.
PayPal ‘Successful Transaction’ Testing Cards
Type of Card | Card Number | Expiry | CVV |
Visa | 4111111111111111 | MM/YY in the Future | 123 |
Mastercard | 2221000000000009 | MM/YY in the Future | 123 |
JCB | 3530111333300000 | MM/YY in the Future | 123 |
Discover | 6011111111111117 | MM/YY in the Future | 123 |
Diners Club | 30569309025904 | MM/YY in the Future | 123 |
American Express | 378282246310005 | MM/YY in the Future | 1234 |
Video Tutorial: How Can I Use a PayPal Test Card?
Written Tutorial: How Can I Use a PayPal Test Card?
When you have an eCommerce plugin set up on your website (such as WP Express Checkout), you will have the option to enable ‘test’ or ‘sandbox’ transactions for PayPal. You will need to enable this to ensure it is allowing for test transactions as opposed to live transactions. Once you have enabled PayPal sandbox transactions, complete the following:
- Click on the ‘Buy Now‘ button of the product you wish to complete a test transaction for.
- The PayPal popup window should appear where you will need to choose to ‘Pay with Debit or Credit Card‘.
- Enter in a ‘Test Card Number‘ from the table above such as ‘4111111111111111‘ in the ‘Card Number‘ field.
- In the expiry field, enter any month and year in the future, followed by the CVV ‘123‘.
- Proceed with the transaction.
- If you have completed the plugin set up and entered in your sandbox details and testing card number correctly, you should be able to complete a successful transaction. It will appear like a normal transaction although please note there will be no exchange of any funds whatsoever.
What is a PayPal Sandbox Account?
As PayPal allows your customers to complete a transaction either with their PayPal account or their credit or debit card it makes sense for merchants of the website to be able to test out both transaction processes. While we mentioned how to test using a purpose-built credit card above, in this section we will look at how you can use a ‘test’ PayPal account to complete a transaction.
Complete the following to obtain the email and password of your PayPal sandbox (testing) account:
- Log into your PayPal developer account.
- Under the ‘Sandbox‘ menu click on ‘Accounts‘.
- Click the ‘Create Account‘ button.
- You will want to select to create a ‘Personal‘ account as this will allow you to process a transaction as if you were a customer.
- You have now created a sandbox personal account. Click on the ‘…‘ button for that account.
- You will be able to copy the email and password from this account directly into the payment area when you complete your next test transaction.
Video Tutorial: How Can I Use a Personal Sandbox Account to Test?
Written Tutorial: How Can I Use a Personal Sandbox Account to Test?
You will need to have your sandbox account email and password to complete a PayPal sandbox account transaction. You can find this information under the ‘Sandbox Accounts‘ menu of your PayPal developer account. Then you will be able to complete the following:
- Ensure you have enabled ‘Sandbox‘ testing on your website.
- Click on a ‘Buy Now‘ button for a product that you wish to complete a test transaction for.
- Paste your sandbox PayPal email address into the ‘Email Address‘ field and your sandbox PayPal password into the ‘Password‘ field.
- Click ‘Log in‘ and complete the rest of the transaction as you would with any ‘live‘ PayPal checkout.
Leave a Reply