Swish M-Commerce
Enable shoppers to pay via Swish by following a mobile redirect from a merchant website or mobile app to the Swish app, authorise the payment, subsequently return to the merchant website or mobile app.
Customer Journey
The redirection to the swish payment app from the merchant app can be done in two way (the holistic flow is merchant app → swish app → merchant app)
- Merchant redirection through browser
- Direct merchant redirection
Both are depicted below:
Merchant redirection through browser
- The consumer selects Swish as their preferred payment method
- The consumer is routed to Swish app where they are required to enter the desired details, authorise and complete the transaction.
- The consumer is routed back to merchant app/website via browser on mobile device after completing 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
There are no specific input parameters required for merchant redirection through browser.
Transient input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
orderDetailsMessage | M | string | N/A | Description of the order |
Transient output parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
appUrl | M | string | N/A | Swish AppIntent URL that has callback parameter , that helps to navigate to merchant app once payment is successful routing through browser. |
qrCode | M | string | N/A | This is not to be considered in this flow. |
Note : qrCode is not to be consumed for this flow
TRANSACTION call input
tag=swish
&txtype=TRANSACTION
&countrycode=SE
¤cy=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Flanding.php
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&transientin.orderDetailsMessage=checkoutof2cakes
&returnmode=urlencodeext
For For standard input parameters, check Input parameters for the TRANSACTION call
TRANSACTION call output
REQUESTSTATUS=SUCCEEDED
&STATUS=PENDING
&TXID=600520459
&ERRMSG=
&CHANNEL=testchannel
&TAG=swish
&transientout.appUrl=swish://paymentrequest?token=AAAAAAAAAAAAAAAicwAheL3Ymp6iUoSv&callbackurl=https%3A%2F%2Fr2.girogate.de%2Fswish%2FH709%2FB%3Ftx%3D2273002178%26rs%3DSLGTgALTyJ2j106Rn6oecHFxBjAlgtED%26cs%3D5c82d5e096090f49d35dc60af669eec5ae7b6cb1233cfa21260e803530e6400d
&transientout.qrCode=base64-encoded-qrstring
For standard output parameters, see Output parameters for the TRANSACTION call.
Direct Merchant redirection
- The consumer selects Swish as their preferred payment method
- The consumer is routed to Swish app where they are required to enter the desired details, authorise and complete the transaction.
- The consumer is routed back to merchant app/website on mobile device directly after completing 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 |
---|---|---|---|---|
merchantRedirectUrl | M | string | N/A | Merchant App/ website URL where consumer will be redirected after authorising the payment. |
Transient input parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
orderDetailsMessage | M | string | N/A | Description of the order |
Transient output parameters for the TRANSACTION call
Field Name | M/O/C | Type | Regex | Description |
---|---|---|---|---|
appUrl | M | string | N/A | Swish AppIntent URL that has callback parameter , that helps to navigate to merchant app once payment is successful routing through browser. |
qrCode | M | string | N/A | This is not to be considered in this flow. |
TRANSACTION call input
tag=swish
&txtype=TRANSACTION
&countrycode=SE
¤cy=SEK
&amount=250
&merchanttxid=84564142227
&login=johndoe
&password=wXBrpVporFVjGO4R
&contractid=JOHNDOETESTCONTRACT
&channel=testchannel
&merchantredirecturl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Flanding.php
¬ificationurl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Fnotification.php
&accountholdername=Tester+Doe
&specin.merchantRedirectUrl=https%3A%2F%2Fmerchant.com%2Fwork%2Fppro2%2Flanding.php
&transientin.orderDetailsMessage=checkoutof2cakes
&returnmode=urlencodeext
For For standard input parameters, check Input parameters for the TRANSACTION call
TRANSACTION call output
REQUESTSTATUS=SUCCEEDED
&STATUS=PENDING
&TXID=600520459
&ERRMSG=
&CHANNEL=testchannel
&TAG=swish
&transientout.appUrl=swish://paymentrequest?token=AAAAAAAAAAAAAAAicwAheL3Ymp6iUoSv&callbackurl={merchantRediectUrl}
&transientout.qrCode=base64-encoded-qrstring
For standard output parameters, see Output parameters for the TRANSACTION call.
Updated 2 days ago