Swish
This page outlines the basics of using Swish via Netaxept and gives you instructions needed for a fluent implementation.
Swish is a mobile payment solution that enables merchants to receive payments in their webshops from private persons who make the payment through the Swish app in their mobile device. The payment is instantly transferred from the payer´s bank account to the payee´s bank account. Swish can be used as a payment method in two ways:
- Swish E-commerce: Swish payments that are initiated in a browser in an equipment other than the mobile device that hosts the Swish app.
- Swish M-Commerce: Swish payments that are initiated from the mobile device either through an app or a mobile browser on the same mobile device.
Business features and restrictions
When using Swish via Netaxept, please note the following features and restrictions.
- Available for merchants having Sweden as a merchant country.
- Supported payment currency is SEK.
- Additional paid payment method.
- Using Swish via Netaxept requires an agreement with your chosen bank for accepting online payments via Swish. At the moment we accept certificates from Danske Bank, Handelsbanken, Nordea, SEB and Swedbank.
- Only one-off payments are supported, not recurring payments.
Use for the end-customer
The prerequisite is that the customer has downloaded the Swish app in their mobile phone and registered their phone number into the app. Also, the customer should have downloaded the Mobile BankID app, as the transactions are signed with Mobile BankID.
When the customer decides to pay with Swish, they are directed from the merchant’s site to the page where they are asked to enter their phone number registered into the Swish app. Swedish phone numbers (+46) sent along the Register call will be prefilled. The customer opens the Swish app on their phone to approve the payment and sign it with Mobile BankID. Once the payment is completed, the customer is redirected to the redirectURL specified by the merchant in the Register call, with a proper response code. The payment is withdrawn from the customer’s bank account and settled to merchant's bank account.
Activation
To be able to use Swish in your webshop, you need to sign an agreement with your bank for Swish Handel. At the moment, we can accept certificates from Swedbank, SEB, Handelsbanken, Nordea and Danske Bank. After your bank has processed your agreement, they will provide you credentials which you need to enter to Netaxept Admin to activate the payment method in question. The merchant is responsible for activating these payment methods in Netaxept Admin and ensuring that all information entered is correct.
- Log in to Netaxept Admin (test: https://test.epayment.nets.eu/admin or production: https://epayment.nets.eu/admin)
- Go to "Options" => "Agreement" tab.
- Choose the correct payment method from the drop down list and click "Add" button.
- Choose the correct currency and enter credentials. Below you can find instructions how to generate the certificate:
- Generate a CSR that is used to create the certificate at Swish site by editing the agreement.
- The certificates can be generated here and Swish’s official certificate management guide can be found here.
- Copy the generated certificate and save it in a .PEM file. To avoid generating unnecessary meta data into the file, use for example Notepad.
- After saved, go back to Netaxept Admin, edit the Swish agreement and upload the certificate, and click Save.
- A new certificate is needed when moving from test environment to production.
- Save your changes by clicking "Add" button.
Performing API integration
Implement the technical API in accordance with the standard Netaxept API instructions. Read more about API
Transaction flow
Start the payment process by sending the information required for the payment to Netaxept by means of the Register call. If you already have a regular card integration implemented, and you have made an agreement with your bank about Swish, there is no need to send any additional parameters along the Register call to Netaxept to make Swish available for customers.
After the successful Register call, perform the Terminal call to send the customer either to the Netaxept payment window or directly to the page where they are asked to enter their phone number and open the Swish app. After the Terminal phase, Netaxept triggers AutoSale for the transaction, therefore, you don’t need to run AUTH, CAPTURE or SALE on Swish transactions. This eliminates a step in the standard payment process done via Netaxept. To make sure your setup doesn't try to run not allowed steps, we recommend you to implement the following:
- Use the "Payment method action list" parameter in the Register call to separate Swish from card and other payments in the checkout phase.
- Perform the Query call after the Terminal phase to see which payment method was used for the payment, and make the further action based on the payment status.
- Implement the supported financial operations as described in Payment methods. Both full and partial refunds are supported. The credit amount should be more than 0,50 SEK.
Both Netaxept production and test environments are using the production environment at Swish which means that all transactions you will run are live / production transactions.
Callback and Query
In order to verify that the transaction has the correct status and the payment has processed successfully and is fully paid, or if you are unsure which payment method the customer used for the payment, we recommend you to implement the Callback function and the Query call as part of the payment process. Through the Callback, you will receive a transaction ID whenever the transaction has a new status. Based on this, you can do the Query call to get the new status and detailed information about the transaction. Read more about Callback and Query
Payment flow for Swish M-Commerce (app switching)
This is applicable only for merchants with SDK app. If transaction is performed in app, the Register call should contain the following parameters for the app switch (from your app to Swish app).
- PaymentMethodActionlist = SwishM
- ServiceType = M
- Currency = SEK
- CustomerPhoneNumber = +[country code][phone number]
The Register response will contain the link for the app switch. Once the customer has completed the payment, the Swish app switches back to the merchant´s app.
Transaction reference number
Transaction reference number is a unique end-to-end reference number for each transaction and is is your own identifier of the transaction to be paid. You can specify a unique reference number for each payment by sending the "TransactionReconRef" parameter and its value along the Register call to Netaxept. The use of transaction-specific reference number is optional but if you want to use it, it needs to be formatted as follows. No validation of format is done at Netaxept side, as this is the responsibility of merchant. Read more about transaction reference number
- TransactionReconRef needs to support A-Ö, & and "-".
- The current max length of TransactionReconRef should be in place.