Swish E-Commerce
Enable consumers to either enter their mobile number or scan a QR code using the Swish app on their mobile device, subsequently authorising the payment by following the instructions in the Swish app.
Swish supports two types of e-commerce payment journeys:
QR code : Display a QR code for the consumer to scan using their Swish app.
Phone Number : The consumer enters their phone number to start the payment process.
To support these journeys, PPRO offers following integration options :
PPRO-hosted
Consumers are redirected to a PPRO managed payment page, where they can either scan the QR code or follow the provided instructions to complete the payment.
Merchant checkout
Consumers are redirected to a merchant managed payment page, where they can either scan the QR code or follow the provided instructions to complete the payment.
Note
As part of the onboarding process, you will be required to specify whether you prefer a PPRO hosted or merchant checkout integration.
More details on QR code and Phone number journeys are provided below.
QR Code
There are two main methods to generate the QR code, as outlined below:
- PPRO-rendered : PPRO's QR code generation simplifies the process by providing either a base64 encoded string for decoding or a ready to display QR image.
- Customer rendered through QR Payload : QR Payload to generate QR image , swish design specifications to be followed while generation.
Swish Design Specification for QR Payload Method
The QR code should be created in black and white. The Swish symbol is placed in the centre, on a white circular background. The symbol width should be 25% of the QR code width.
The Swish symbol can be downloaded from the Swish marketing toolbox and should follow the Swish trademark guidelines.
We strongly recommend using the PPRO rendered QR code generation, as it simplifies the process by removing the need to follow Swish design specifications on your end.
For reference, PPRO rendered QR code generation is demonstrated below, providing both a ready to display QR image and a Base64 encoded string.
Note
For PPRO hosted payment integration, only ready-to-display QR images and QR payloads are supported. However, for merchant checkout integration, all QR code generation methods are supported.
QR code on PPRO hosted integration
Consumer Journey
- The consumer goes to the merchant website on desktop and selects Swish as their preferred payment method on payment page, QR is displayed on page hosted by PPRO.
- The consumer is displayed QR code on the desktop website.
- The consumer scans the QR code on Swish app, enters the desired details, authorise and complete the transaction.
- The merchant receives the payment confirmation
- The merchant ships the order/deliver the goods to the consumer.
Specific input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
merchantredirecturi | O | string | N/A | Merchant Website URL where consumer will be redirected after authorising the payment |
dynamicdescriptor | O | string | N/A | Description of the order |
Specific output parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
qrpayload | O | string | N/A | To generate the QR code image, use the QR payload and follow Swish guidelines. |
Transient output parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
appintenturi | O | string | N/A | This is not to be considered in this flow. |
qrcode | O | string | N/A | Base 64 encoded QR string |
TRANSACTION call input
tag=swish
&txtype=TRANSACTION
&countrycode=SE
preferredlanguage=en
¤cy=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&specin.merchantredirecturi=https://amazon.com
&specin.dynamicdescriptor=checkoutof2cakes
&returnmode=urlencodeext
For For standard input parameters, check Input parameters for the TRANSACTION call
TRANSACTION call output
When Transaction request is successful
&STATUS=PENDING
&TXID=10
&ERRMSG=
&TRANSIENTOUT.APPINTENTURI=swish://paymentrequest?token=AWQ&callbackurl=amzn://apps/orderID=AS4f?p=PQRE//Merchant system needs to skip this//
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&REDIRECTSECRET=dcn94nd2oud8eedhg38dkhed
&REDIRECTURL=https://r3.public.k8s.qa.ppro.com/swish/T/I?tx=10&rs=3ZTw&cs=0b3cb24
&SPECOUT.QRPAYLOAD=DAAAAAAAAAAAAABQAEXmJcqFUw_x6Bh4N
&TRANSIENTOUT.QRCODE=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGl //base 64 encoded string//
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
Note
Use the "REDIRECTURL" provided in the successful transaction response to be redirected to the PPRO hosted payment page, where the QR code will be displayed
When Transaction request is not successful
&STATUS=FAILED
&TXID=600520459
&ERRMSG=Remote%20System%20Error
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&FAILREASON=REMOTE_ERROR
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
For standard output parameters, see Output parameters for the TRANSACTION call.
QR code on Merchant checkout integration
Consumer Journey
- The consumer goes to the merchant website on desktop and selects Swish as their preferred payment method on payment page, QR is displayed on page hosted by merchant.
- The consumer is displayed QR code on the desktop website.
- The consumer scans the QR code on Swish app, enters the desired details, authorise and complete the transaction.
- The merchant receives the payment confirmation
- The merchant ships the order/deliver the goods to the consumer.
Specific input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
merchantredirecturi | O | string | N/A | Merchant Website URL where consumer will be redirected after authorising the payment |
dynamicdescriptor | O | string | N/A | Description of the order |
Specific output parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
qrpayload | M | string | N/A | To generate the QR code image, use the QR payload and follow Swish guidelines. |
Transient output parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
appintenturi | O | string | N/A | This is not to be considered in this flow. |
qrcode | M | string | N/A | Base 64 encoded QR string |
TRANSACTION call input
tag=swish
&txtype=TRANSACTION
&countrycode=SE
preferredlanguage=en
¤cy=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&specin.merchantredirecturi=https://amazon.com/
&specin.dynamicdescriptor=checkoutof2cakes
&returnmode=urlencodeext
For standard input parameters, check Input parameters for the TRANSACTION call
TRANSACTION call output
When Transaction request is successful
&STATUS=PENDING
&TXID=10
&ERRMSG=
&TRANSIENTOUT.APPINTENTURI=swish://paymentrequest?token=AWQ&callbackurl=amzn://apps/orderID=AS4f?p=PQRE//Merchant system needs to skip this//
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&REDIRECTSECRET=dcn94nd2oud8eedhg38dkhed
&REDIRECTURL=https://r3.public.k8s.qa.ppro.com/swish/T/I?tx=10&rs=3ZTw&cs=0b3cb24//Merchant system needs to skip this//
&SPECOUT.QRPAYLOAD=DAAAAAAAAAAAAABQAEXmJcqFUw_x6Bh4N
&TRANSIENTOUT.QRCODE=PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGl //base 64 encoded string//
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
Note
Decode the "TRANSIENTOUT.QRCODE" from the successful transaction response to generate the QR code.
When Transaction request is not successful
&STATUS=FAILED
&TXID=600520459
&ERRMSG=Remote%20System%20Error
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&FAILREASON=REMOTE_ERROR
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
For standard output parameters, see Output parameters for the TRANSACTION call.
Phone Number
Phone number integration for both PPRO and merchant checkout is detailed below. There is a limitation with Swish that prevents supporting more than one payment request through same phone number at the same time
Phone Number on PPRO hosted integration
Consumer Journey
- The consumer goes to the merchant website on desktop and selects Swish as their preferred payment method and enters the phone number.
- Consumer is redirected to page hosted by PPRO, with instructions to complete the payment.
- Consumer opens the Swish app on mobile device, enters the desired details, authorise and complete the transaction.
- The merchant receives the payment confirmation
- The merchant ships the order/deliver the goods to the consumer.
Specific input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
merchantredirecturi | O | string | N/A | Merchant Website URL where consumer will be redirected after authorising the payment |
phonenumber | M | string | N/A | The consumer's phone number, which must be active on the Swish app, should be a Swedish number prefixed with '46' |
dynamicdescriptor | O | string | N/A | Description of the order |
TRANSACTION call input
tag=swish
&txtype=TRANSACTION
&countrycode=SE
preferredlanguage=en
¤cy=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&specin.merchantredirecturi=https://amazon.com
&specin.dynamicdescriptor=checkoutof2cakes
&specin.phonenumber=46**********
&returnmode=urlencodeext
For For standard input parameters, check Input parameters for the TRANSACTION call
TRANSACTION call output
When Transaction request is successful
&STATUS=PENDING
&TXID=10
&ERRMSG=
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&REDIRECTSECRET=dcn94nd2oud8eedhg38dkhed
&REDIRECTURL=https://r3.public.k8s.qa.ppro.com/swish/T/I?tx=10&rs=3ZTw&cs=0b3cb24
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
Note
Use the "REDIRECTURL" provided in the successful transaction response to redirect the consumer to PPRO Hosted Payment Page, where they will receive instructions to complete the payment.
When Transaction request is not successful
&STATUS=FAILED
&TXID=600520459
&ERRMSG=Remote%20System%20Error
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&FAILREASON=REMOTE_ERROR
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
For standard output parameters, see Output parameters for the TRANSACTION call.
Phone Number on Merchant checkout integration
Consumer Journey
- The consumer goes to the merchant website on desktop and selects Swish as their preferred payment method and enters the phone number.
- Consumer is redirected to page hosted by merchant, with instructions to complete the payment.
- Consumer opens the Swish app on mobile device, enters the desired details, authorise and complete the transaction.
- The merchant receives the payment confirmation
- The merchant ships the order/deliver the goods to the consumer.
Specific input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
merchantredirecturi | O | string | N/A | Merchant Website URL where consumer will be redirected after authorising the payment |
phoneNumber | M | string | N/A | The consumer's phone number, which must be active on the Swish app, should be a Swedish number prefixed with '46' |
dynamicdescriptor | O | string | N/A | Description of the order |
TRANSACTION call input
tag=swish
&txtype=TRANSACTION
&countrycode=SE
preferredlanguage=en
¤cy=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&specin.merchantredirecturi=https://amazon.com/
&specin.dynamicdescriptor=checkoutof2cakes
&specin.phonenumber=46**********
&returnmode=urlencodeext
For standard input parameters, check Input parameters for the TRANSACTION call
TRANSACTION call output
When Transaction request is successful
&STATUS=PENDING
&TXID=10
&ERRMSG=
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&REDIRECTSECRET=dcn94nd2oud8eedhg38dkhed
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
Note
As soon as the transaction request status shows "Pending",display the payment page to the consumer, including clear instructions on how to complete the payment.
When Transaction request is not successful
&STATUS=FAILED
&TXID=600520459
&ERRMSG=Remote%20System%20Error
&RAND3874536273=f8234430721f1a7ef4a4462de71dfd1d
&FAILREASON=REMOTE_ERROR
&CHANNEL=testchannel
&TAG=swish
&MERCHANTTXID=sale1002
&FUNDSSTATUS=NOT_EXPECTED
For standard output parameters, see Output parameters for the TRANSACTION call.
Updated 6 days ago