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

Use the "REDIRECTURL" from the successful transaction response for PPRO-hosted integration, or decode "TRANSIENTOUT.QRCODE" for 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:

  1. 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.
  2. 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

  1. 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.
  2. The consumer is displayed QR code on the desktop website.
  3. The consumer scans the QR code on Swish app, enters the desired details, authorise and complete the transaction.
  4. The merchant receives the payment confirmation
  5. The merchant ships the order/deliver the goods to the consumer.

Specific input parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
dynamicdescriptorOstringN/ADescription of the order

Specific output parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
qrpayloadOstringN/ATo generate the QR code image, use the QR payload and follow Swish guidelines.

Transient output parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
appintenturiOstringN/AThis is not to be considered in this flow.
qrcodeOstringN/ABase 64 encoded QR string

TRANSACTION call input

tag=swish
&txtype=TRANSACTION
&countrycode=SE
&preferredlanguage=en
&currency=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
&notificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&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

  1. 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.
  2. The consumer is displayed QR code on the desktop website.
  3. The consumer scans the QR code on Swish app, enters the desired details, authorise and complete the transaction.
  4. The merchant receives the payment confirmation
  5. The merchant ships the order/deliver the goods to the consumer.

Specific input parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
dynamicdescriptorOstringN/ADescription of the order

Specific output parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
qrpayloadMstringN/ATo generate the QR code image, use the QR payload and follow Swish guidelines.

Transient output parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
appintenturiOstringN/AThis is not to be considered in this flow.
qrcodeMstringN/ABase 64 encoded QR string

TRANSACTION call input

tag=swish
&txtype=TRANSACTION
&countrycode=SE
&preferredlanguage=en
&currency=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
&notificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&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

  1. The consumer goes to the merchant website on desktop and selects Swish as their preferred payment method and enters the phone number.
  2. Consumer is redirected to page hosted by PPRO, with instructions to complete the payment.
  3. Consumer opens the Swish app on mobile device, enters the desired details, authorise and complete the transaction.
  4. The merchant receives the payment confirmation
  5. The merchant ships the order/deliver the goods to the consumer.

Specific input parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
phonenumberMstringN/AThe consumer's phone number, which must be active on the Swish app, should be a Swedish number prefixed with '46'
dynamicdescriptorOstringN/ADescription of the order

TRANSACTION call input

tag=swish
&txtype=TRANSACTION
&countrycode=SE
&preferredlanguage=en
&currency=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
&notificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&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

  1. The consumer goes to the merchant website on desktop and selects Swish as their preferred payment method and enters the phone number.
  2. Consumer is redirected to page hosted by merchant, with instructions to complete the payment.
  3. Consumer opens the Swish app on mobile device, enters the desired details, authorise and complete the transaction.
  4. The merchant receives the payment confirmation
  5. The merchant ships the order/deliver the goods to the consumer.

Specific input parameters for the TRANSACTION call

Field NameM/O/CTypeRegexDescription
phoneNumberMstringN/AThe consumer's phone number, which must be active on the Swish app, should be a Swedish number prefixed with '46'
dynamicdescriptorOstringN/ADescription of the order

TRANSACTION call input

tag=swish
&txtype=TRANSACTION
&countrycode=SE
&preferredlanguage=en
&currency=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https://amazon.com
&notificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&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.