Swish

Intro
In pilotSwish is a Swedish app-based, real-time banking system.
With over 8.7 million active users and offered by a large share of retailers, it is by far the most popular mobile payment method in Sweden.
By linking their bank accounts to the Swish network, your customers can easily receive and transfer funds in real time.
You send a standard request to our platform to open the Swish app on your customers' mobile devices.
The integration is very straightforward, as you only need to send one additional parameter along with your request.
Onboarding
- Sign a contract with Swish and receive activation credentials in return.
- Send the activation credentials (SwishID) to us or enter the credentials in the Merchant Portal and activate Swish as described in our guide.
Integration
Redirect your customers to the Swish app via integration modes Hosted Checkout Page or Server-to-server. Find a high level overview in the "Process flows" chapter.
Add the following properties to a standard CreateHostedCheckout/CreatePayment request:
{
"redirectPaymentMethodSpecificInput": {
"paymentProductId": 350
},
"order": {
"amountOfMoney": {
"amount": 150,
"currencyCode": "SEK"
}
}
}
Properties | Description |
---|---|
order.amountOfMoney |
amount: The gross amount you want to charge for this order. |
redirectPaymentMethodSpecificInput.paymentProductId |
paymentProductId: The numeric identifier of the payment method on our platform. Find this id in the "Overview" chapter. For payments requested via CreateHostedCheckout, it instructs our platform to display the QR code for opening the Swish app on the Hosted Checkout Page. If omitted, our platform sends your customers to the Hosted Checkout Page instead, allowing them to choose this or any other payment method that is active in your account. |
If you are sending CreatePayment requests, our platform's response will contain the properties merchantAction.showFormData.paymentProduct350.paymentRequestToken and merchantAction.showFormData.paymentProduct350.appSwitchLink. Depending on the device(s) used by your customers, you will need to use either of them in the subsequent payment flow:
- With a desktop and a mobile device: Create a QR code on your checkout page using merchantAction.showFormData.paymentProduct350.paymentRequestToken. When doing so, make sure to follow the Swish documentation.
- With a mobile device: Open the Swish app on your customers' mobile devices by redirecting them to merchantAction.showFormData.paymentProduct350.appSwitchLink.
Refer to the "Process flows" chapter to learn more about these scenarios.
Process flows
Depending on your customers' device(s) used, differences apply:
With a desktop and a mobile device
- Your customers finalise an order on their desktop device in your shop and select Swish.
- You send this CreateHostedCheckout/CreatePayment request to our platform.
- You redirect your customers on the desktop device via the redirectUrl to the Hosted Checkout Page (For CreateHostedCheckout requests) or display a QR code on your checkout page using the merchantAction.showFormData.paymentProduct350.paymentRequestToken from our response (For CreatePayment requests).
- Your customers scan the displayed QR code with their mobile/tablet device.
- The mobile/tablet device opens the Swish app. Your customers confirm the payment in the app.
- We receive the transaction result.
- The mobile/tablet device displays the transaction result in the Swish app/the banking app supporting Swish.
- We redirect your customers to your returnUrl on their desktop device.
- You request the transaction result from our platform via GetPaymentDetails/GetHostedCheckout or receive the result via webhooks.
- If the transaction was successful, you can deliver the goods / service.
With a mobile device
- Your customers finalise an order on their mobile device in your shop and select Swish.
- You send this CreateHostedCheckout/CreatePayment request to our platform.
- You redirect your customers via the redirectUrl where they click on the "Switch to app" button (For CreateHostedCheckout requests) or merchantAction.showFormData.paymentProduct350.appSwitchLink (For CreatePayment requests).
- The mobile device opens the Swish app. Your customers confirm the payment in the app.
- We receive the transaction result.
- The mobile device displays the transaction result in the Swish app.
- The app redirects your customers to your returnUrl.
- You request the transaction result from our platform via GetPaymentDetails/GetHostedCheckout or receive the result via webhooks.
- If the transaction was successful, you can deliver the goods / service.
Testing
Refer to our Test cases for test data and detailed instructions.
- Make sure to use the right endpoint and switch back to the live URL as soon as you have finished your tests.
- The data in our Test cases ONLY work for payment requests in our test environment. Using this data in our production environment will lead to undesirable testing results.