Swish
Swish can be enabled in the Billwerk+ Administration under Configurations > Payment Methods by adding a Swish agreement. When using Swish in Billwerk+ Checkout there are a number of things you need to be aware of and handle in your implementation.
💻 Swish on desktop
If the customer is on a desktop browser and chooses to pay with Swish, the Billwerk+ Checkout will display a phone number field. After entering a Swish phone number and clicked continue, it sends a payment request to Swish app on the phone where the payment can be completed.
Once completed the page redirects back to Billwerk+ Checkout and either a return url
is activated in window mode or a JS callback is invoked in overlay or embedded mode.
📱 Swish on mobile device
When Swish is used on a mobile device, the Billwerk+ Checkout will hide phone number field and continue will trigger an app switch to the Swish app. When the app completes the payment, the app opens the accept url
in the standard browser for the device. If the customer is not using the standard browser, the customer will return in another browser.
To handle this, the accept page should not rely on cookies, but only rely on content on the accept url
to identify the payment session. To use Swish on a mobile device with overlay and embedded mode, it is required to use accept
and cancel urls
to be able to return. We recommend detecting device type and use window mode for mobile devices.
Swish desktop flow on mobile device
It is possible to display phone number field for Swish on mobile device. This can be done by adding a query parameter
?forceSwishDesktopFlow=true
💳 Swish as the only payment method
If Swish is the only payment method selected by using "payment_methods
": ["swish
"] some special handling is performed:
The Billwerk+ Checkout will trigger Swish payment request without showing the Billwerk+ Checkout window, if phone number is already pre-filled on from Customer information, or if there are no phone number field shown (for example on mobile device).
If the payment is cancelled by the customer, the cancel url/callback is invoked immediately without showing the Billwerk+ Checkout window as it would only show Swish in this case.
Updated 4 months ago