1. Home
  2. Knowledge Base
  3. Swish
  4. Using local certificate with Swish

Using local certificate with Swish

This article describes how to set up the Swish plugin using a local certificate

The process below requires some technical skills. If you are not sure on how to do this use the technical supplier service instead.

We do answer questions on the settings but are not able to help trouble shooting your installation.

Locate and add the plugin in WordPress by searching for “Swish”.

Activate the plugin through the “Plugins” menu in WordPress.

Order the “Swish handel” service from your local Swedish bank.

Generate private key and CSR, at https://comcert.getswish.net/ (see https://developer.getswish.se/content/uploads/2019/03/Swish-Certificate-Management-Guide.pdf)

Using cpanel:

Select “SSL/TLS” at the “Security” section
Select “Private Keys (KEY)”
Scroll down to “Generate a New Private Key” and select the key size of 4096. Type “Swish” in the “Description”-field Click “Generate”
Select “Return to SSL Manager”
Select “Certificate Signing Requests (CSR)”
In the “Key” field select the keyname that you entered creating the keys (in our example it was “Swish”)

Enter the following:

Domains: yourwebsite.name
State: State/Province
Country : Sweden
Company: Your company name
Company Division: Department or leave blank
Email: your@email.se
Passphrase: Select password if you want (remember if and enter it in the Payment-Swish admin screen)
Description: A description or leave blank

Select “Generate”

copy the data in the “Encoded Certificate Signing Request”-field and use it at in step 5 below.

Using MacOs terminal or Linux via SSH:

$ openssl genrsa -out ./swish.key 4096
$ openssl req -new -sha256 -key ./swish.key -out ./swish.csr
Enter the following:

Country Name (2 letter code) – SE
State or Province Name (full name) – State/Province
Locality Name (eg, city – City
Organization Name (eg, company) – Your company name
Organizational Unit Name (eg, section) – Department or leave blank
Common Name (eg, fully qualified host name) – yourwebsite.name
Email Address – your@email.se
A challenge password – Select password if you want (remember if and enter it in the Payment-Swish admin screen)

Use the data that you copied from cpanel or the file “swish.csr” created in command line to create a swish-certificate at https://comcert.getswish.net/cert-mgmt-web/authentication.html (must be done by a certified person from step 3)
Login using your (swedish) personal id, your organisation number and your Swish-number (starting with 123)
Click on the tab “new certificate”
Paste the contents from cpanel or your “swish.csr”-file from step 4 into the field “Paste CSR” and make shure that the format “PEM” is selected.
Click “Generate” to create the certificate.
Copy and paste the certificate data to a file with the ending .pem (in our example swish.pem)

Open your swish.pem file and paste the content from your swish.key file in the top of the file.
Copy everything (including the header and footer) between:
and put it before
Place the certificate file somewhere in your server filesystem.
Use FTP or filemanager in cpanel if avaliable.
Make a note on the full file-path and name of your certificate.
Configure and activate plugin.
Select “Use local Swish certificate” as your connection preference
Input the location of the certificate from step 7.
If you did create the certificate in step 4 using a password, you need to input this on the configuration screen
Input your Swish-number (starting with 123)
Change the rest of the configuration parameters as you wish.
Save the settings.
Make a test payment to ensure that everything is working as it should.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Select your currency