Swish
About
Swish is a popular payment method in Sweden that allows users to scan a QR code to validate the payment in their Swish app.
How it works
The Swish pay-in flow provides the following checkout experience:
Payment initiation
You create the payment request by calling POST Create a Swish PayIn, specifying the ReturnURL.
If the ReturnURL redirects to your app, rather than a website, you need to also set the PaymentFlow to APP.
Redirection
On a website, you redirect the user via the RedirectURL response value to a hosted payment page containing the QR code. Alternatively, you can integrate a PNG of the QR code into your payment page using the QRCodeURL value (which is Base64-encoded).
In an app-to-app flow, you redirect the user to their Swish app via the DeepLinkURL response value.
After pressing the pay button, the user uses the Swedish Mobile BankID system to validate the payment.
Note – Timeout after 3 minutes
The payment session lasts for 3 minutes, at which point the pay-in fails automatically if no action has been taken by the user.
Hooks
You should also set up hook notifications for the relevant event types:
- PAYIN_NORMAL_SUCCEEDED
- PAYIN_NORMAL_FAILED