WooCommerce Swedbank Gateway allows customers to securely check out using their Swedbank account.
- Euro must be set as the store currency
- A Swedbank account
- Download the .zip file from your WooCommerce account.
- Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.
- Install Now and Activate the extension.
More information at: Install and Activate Plugins/Extensions.
Once you have signed a contract with Swedbank, you need to generate and exchange certificates with them. If you already did this, skip to the next section. If not, here’s how you do it.
First, generate a private key, which will be used to sign all the requests to the bank. Then generate a certificate signing request (CSR) from your private key – this is sent to the bank.
If you are using Windows, ensure that you have OpenSSL installed. On Linux/Mac, OpenSSL should already be present. Open Terminal/Shell/Command Line and run the following commands:
openssl genrsa -out private_key.pem 2048 openssl req -sha1 -new -key private_key.pem -out csr.pem
You are asked for a series of data for the certificate:
- Country [AU]: 2-letter country code. One of EE, LV, LT. Example: EE
- State or Province Name (full name) [Some-State]: your company state/province. Example: Harju maakond
- Locality Name (eg, city) : your company city/town/village. Example: Tallinn
- Organization Name (eg, company) [Internet Widgits Pty Ltd]: Example: Nööbid & Kindad AS
- Organizational Unit Name (eg, section) : Can be left empty, but you can also enter “banklink” (without the quotes)
- Common Name (e.g. server FQDN or YOUR name) : the domain name of your store. Example: www.mysuperawesomestore.com
- Email Address : merchant’s (your) email address. Example: firstname.lastname@example.org
- A challenge password : leave blank (press Enter)
- An optional company name : leave blank (press Enter)
As a result, you have two files in the directory you ran the commands from: private_key.pem, which contains your private key and csr.pem, which contains the certificate signing request (public key). You need to send the csr.pem file to Swedbank now and wait for their response. Swedbank will send you their public key and your Merchant ID – but it could take some time.
To configure the plugin on your site:
Go to: WooCommerce > Settings > Checkout > Swedbank.
- Enable / Disable – Enable the gateway when ready to go live.
- Title – Shown to customers during checkout and on the Order Received page.
- Description – Shown under the title during checkout. Limited HTML is allowed.
- Environment – Switch between “Test” and “Production” credentials. Enable “Test” to send transactions to the bank link test service.
- Merchant ID – Merchant ID sent to you by Swedbank. For Test mode, this is the Merchant ID for your bank link test service. Follow the steps below to get this.
- Private Key – Private key you generated for Swedbank. For Test mode, this is the private key generated by your bank link test service. Follow the steps below to get this.
- Private Key Password – Private key password if you used one (Production or Test).
- Public Key – Public key / certificate for Swedbank in your country. Swedbank will provide it to you after signing the contract. For Test mode, this is the public key for your bank link test service. Follow the steps below to get this.
- Debug Mode – Enable this is you are having issues correctly processing transactions. You can either log API requests / responses directly to the checkout / thank you page, save them to the WooCommerce Error Log (found under WooCommerce > System Status > Logs) or both. All debugging messages are cleaned of sensitive information before display, but as a best practice do not enable this unless you have issues with the plugin.
Test the Swedbank gateway using the third-party Banklinks service. Banklinks allows you to create mock/test payments without having a contract with the bank.
To set up testing, you need test credentials for your bank and the appropriate country from the Banklinks page.
- Select the appropriate banklink for your country and bank from the list. Example: Swedbank Estonia Test
- Click Certificates
- Copy the following to the gateway settings and save:
- Copy Merchant ID to Test Merchant ID field.
- Copy Merchant’s private key to Test Private Key field.
- Copy Bank’s certificate to Test Public Key field.
To checkout using Swedbank, a customer must select this option on the checkout page:
When Swedbank is selected, the customer is directed offsite to Swedbank, where they can log in and complete payment.
Having trouble? Ensure everything is set up correctly before posting a support request:
- Verify that your Merchant ID, Private Key and Public Key are correct.
- Double-check that your Merchant ID, Private Key and Public Key are correct.
- Enable only WooCommerce and Swedbank using a WordPress default theme to see if the issue persists.
- Submit a support ticket and tell us what happened when you took these steps.
Unfortunately automatic refunds are not possible with Swedbank. We are following the developer documentation for updates and will add this to the roadmap if it becomes possible in the future.
Where can I find official Swedbank banklink documentation?
Each country has different documentation:
- Estonia: https://www.swedbank.ee/business/cash/ecommerce/banklink
- Latvia: https://www.swedbank.lv/en/pakalpojumi_uznemumiem/bank_link/
- Lithuania: https://www.swedbank.lt/en/pages/corporate/bank_link