Integrate WooCommerce and Sagepay
Trexle connects WooCommerce to Sagepay and 100+ other payment gateways using a single plugin for one time annual fee
Sagepay and WooCommerce Integration Guide
Getting your SagePay API credentials
You will need to retrieve your Integration Key (username) and Integration Password. You can do this by following the steps below:
Step 1: Log in to MySagePay
Go to MySagePay in either the TEST or LIVE environment and log in using the Administration log in details that were provided to you during the setup of the account.
Once you are logged in as the Administrator, in the Password details section of the Administrator tab you will see an option to ‘Create API credentials’.
Step 2: Create API credentials
To create your credentials you just have to select the tick-box labelled “I understand that this will create new credentials and may break any existing Sage Pay API implementations.” and click on the ‘Create API credentials’ button.
When you choose to create new credentials, any previously generated credentials are immediately rendered invalid. Therefore, if you have already integrated with our REST API, you will not be able to authenticate your calls until you replace your expired credentials with the ones you just generated.
Once you have opted to create your new credentials we will present you with the following information:
► Environment: This specifies the environment for which the credentials apply (test or live)
► Vendor Name: The vendorname for the account
► Integration Key: The value for the Integration key (username)
► Integration Password: The value for the Integration password
Step 3: Save credentials
It is important that you store these credentials safely and securely. If you lose them, you will need to generate a new set of credentials using the same process. Please note that these credentials are only valid for PI and not for any legacy Sage Pay integration methods
Take the credentials you just obtained from Sagepay and navigate to Trexle dashboard, click Payments Gateways and select Sagepay from the drop down menu as shown below.
Fill into your Sagepay credential and click Add Gateway. Click the Activate button next to Sagepay, and it will give you a success message and the button will turn into green. You should see something like below.
Install WooTrexle WordPress plugin by navigating in your dashboard to Plugins/Add new, search for Trexle, install and activate. You can also download WooTrexle from WordPress or from Trexle Github Repository, unzip the plugin into your WordPress plugins directory and activate it.
In WooCommerce/Settings/Checkout, click on “Trexle” and configure the plugin and fill in your Trexle API keys. Click “Save”.
Create a test product, and test the normal customer checkout.
Each card number will provide you with a different result when processing a transaction to ensure your website can handle all possible responses from our system.
Along with the different 3D Secure results each card type will return you are also able to test cards issued from multiple countries.
Card |
Card Number |
CardType Response from Sage Pay |
3D Secure Response from Sage Pay |
CV2 Value |
---|---|---|---|---|
VISA |
4929 0000 0000 6 |
VISA |
Y |
123 |
VISA |
4929 0000 0555 9 |
VISA |
N |
123 |
VISA |
4929 0000 0001 4 |
VISA |
U |
123 |
VISA |
4929 0000 0002 2 |
VISA |
E |
123 |
VISA Corporate |
4484 0000 0000 2 |
VISA |
N |
123 |
VISA Debit |
4462 0000 0000 0003 |
DELTA |
Y |
123 |
VISA Electron |
4917 3000 0000 0008 |
UKE |
Y |
123 |
MasterCard |
5404 0000 0000 0001 |
MC |
Y |
123 |
MasterCard |
5404 0000 0000 0043 |
MC |
N |
123 |
MasterCard |
5404 0000 0000 0084 |
MC |
U |
123 |
MasterCard |
5404 0000 0000 0068 |
MC |
E |
123 |
Debit MasterCard |
5573 4700 0000 0001 |
MCDEBIT |
Y |
123 |
Maestro (UK Issued) |
6759 0000 0000 5 |
MAESTRO |
Y |
123 |
Maestro (German Issued) |
6705 0000 0000 8 |
MAESTRO |
Y |
123 |
Maestro (Irish Issued) |
6777 0000 0000 7 |
MAESTRO |
Y |
123 |
Maestro (Spanish Issued) |
6766 0000 0000 0 |
MAESTRO |
Y |
123 |
American Express |
3742 0000 0000 004 |
AMEX |
N/A |
1234 |
Diners Club/Discover |
3600 0000 0000 08 |
DC |
N/A |
123 |
JCB |
3569 9900 0000 0009 |
JCB |
N/A |
123 |
PayPal |
Use your own PayPal Sandbox details |
PAYPAL |
N/A |
N/A |
The 3D Secure responses are –
- Y – Enrolled, and will progress to the password page to complete verification.
- N – NOT Enrolled and will return a 3DSecureStatus=NOTAVAILABLE back to your system.
- U – Unable to verify enrollment and will return a 3DSecureStatus=NOTAVAILABLE back to your system.
- E – Error occurred during the 3D Secure verification. This will return a 3DSecureStatus=ERROR back to your system.
Each response is to ensure your website can handle the multiple responses that are sent from Sage Pay back to your site.
When using any of the cards above for testing you will also need to enter an expiry date. Any expiry date can be accepted as long as it is in the future from the date you are processing the test transaction.
Address Details
When using the test card details and processing a transaction you will be required to enter an address for the shopper.
We have assigned address details to each of the above cards that will be accepted on our test system.
When using the address details with the card details above the transactions will be able to processed successfully, along with passing both the simulated address and postcode fraud prevention checks.
Address : 88
Postcode : 412
3D Secure
If you have 3D Secure active on your account you will also be required to enter a password to complete the process.
We have a range of passwords that can be used to test the different responses that will be sent back by 3D Secure upon completion of the verification (PaRes).
To successfully complete 3D Secure you will need to enter – password (case sensitive) on the 3D Secure page.
If you would like to test the other 3D Secure responses that can be sent you will simply need to enter :
- A:D:06 – The Cardholder is not enrolled in the 3D Secure scheme and will return the 3DSecureStatus=ATTEMPTONLY
- U:N:06 – The 3D Secure authentication is not available and will return the 3DSecureStatus=INCOMPLETE
- E:N:06 – An error occurred during the 3D Secure authentication and will return the 3DSecureStatus=ERROR
By using these passwords you will be able to complete and test all other responses 3D Secure can return to you.
Other integrations between Sagepay and Woocommerce
The Official WooCommerce Extension for Sagepay and Sagepay direct
Take payments via SagePay Form AND SagePay Direct.
SagePay Direct now supports tokens and will allow your customers to save their card information for faster checkout.
WooCommerce SagePay Gateway extension is now two gateways in one, allowing you to take payments via SagePay Form or SagePay Direct. You can enable one or both gateways.
The extension is provided by Andrew Benbow and is between $79 and $199 USD
Customweb WooCommerce extension for Sagepay
The WordPress WooCommerce Sage Pay Payment Plugin is fully compatible with subscriptions for WordPress WooCommerce . If activated, the payments for the subscription will be debited automatically from the customer's credit card.
The extension is provided by Customweb AKA SellXed and is $220 USD
WooCommerce SagePay Revolution from CodeCanyon
WooCommerce SagePay Revolution is an exclusive payment gateway plugin which seamlessly integrates SagePay in your store. It lets you charge your customer credit and debit cards directly from your e-store, provides instant payment as well as automatic capture and void. The plugin lets you easily process refunds.
The extension is provided by CodeCanyon and is $29 + handling fees
Free WordPress SagePay Form Gateway for WooCommerce Plugin
This Plugin allows you to accept SagePay Payments removing the need for you to maintain highly secure encrypted databases, obtain digital certificates and invest in high-level PCI DSS compliance. The plugin seems to have serious problems in development and support.
The extension is provided by PatSaTECH and is Free
Sagepay Supported Countries
Sagepay Supported Payment Processing Actions
✔ Authorize
✔ Capture
✔ Void
✔ Credit
✖ Recurring
✔ Card Store
Key Features
About Trexle
Trexle is a powerful online recurring subscription billing platform that integrate Sagepay and other +100 payment gateways with WooCommerce and other dozen of e-commerce platforms.
About Sagepay
SagePay is a British multinational enterprise software company headquartered in Newcastle upon Tyne, United Kingdom. It is the world's third-largest supplier of enterprise resource planning software (behind Oracle and SAP), the largest supplier to small businesses, and has 6.1 million customers worldwide. It has offices in 24 countries. The company is the patron of The Sage Gateshead music venue in Gateshead.
About WooCommerce
WooCommerce is an open source e-commerce plugin for WordPress. It is designed for small to large-sized online merchants using WordPress. Launched on September 27, 2011, the plugin quickly became popular for its simplicity to install and customize and free base product.