Configuring Swish
Swish mobile payments are popular option in Sweden. FinDock integrates with the Swish service to initiate and collect payments in Swedish Krona.
Multi-merchant | Multi-currency |
---|---|
Payment Method | One-time | Recurring | Refunds |
---|---|---|---|
Swish |
Prerequisites
- FinDock installed and configured.
- WebHub is connected.
- You have a Swish merchant account.
- FinDock is declared a technical supplier at your Swedish bank. Please note FinDock has two identifications. For test environments, use TS Number 9871479904. For production, use TS Number 9871800083.
Install the Swish extension
Follow the standard procedure for installing payment processors to add the Swish payment extension and activate the Swish payment method.
Check and assign the required permissions. If you are using custom permission set groups, ensure the package-specific permission sets are assigned.
Configure the Swish extension
To configure Swish for FinDock:
- Launch the FinDock app and click the FinDock Setup tab.
- Go to Payment Processors & Methods.
- On the Installed tab, click the Swish processor entry.
- On the Accounts tab, click Add account.
- For the merchant account you want to integrate, add the following details:
- Merchant Account Name: Enter a name for your Swish target (merchant account)
- Default Account: Enable on the account you want used when no account is specified in a payment intent call to the Payment API
- Test Account: Enable if you are setting up a test environment
- Payee Number: Enter your Swish alias (123 XXX YYYY)
- Click Save.
Swish data mapping
The table below summarizes the payment data FinDock captures to manage Swish transactions.
Swish data | Object | Field | Value/Description |
---|---|---|---|
N/A | Payment Profile | Record Type | Wallet |
N/A | Payment Profile | Wallet Type | Swish |
payer.alias | Payment Profile | Wallet Id | Payer's mobile phone number |
consentID | Mandate | Mandate Id | Recurring payment authorization Id |
Testing Swish
When testing Swish, make sure you use a target that is set up as a test target. In addition, you need to use a special test configuration of the BankID app as well as a Swish test app. For both, you need use the same civic identity number. You can use your own or Swish test data.
To set up a BankID app for testing:
- Download the BankID security app from your respective mobile app store.
- Configure the app to use the BankID testing environment as instructed here.
- Create a test account according to the test BankID instructions.
For the Swish app, you need to install a test version that is separate from the normal production app. Download and install the test app from one of the links below:
If you are using iOS, make sure to change the BankID server setting to point to the test environment as instructed.
In addition, you need to get a Swish test number to enable testing in sandboxes. Contact Swish technical support (tekniksupport@getswish.se) and request a test user and 123-number, using the FinDock Technical Supplier number for test environments (see prerequisites above) as your reference.
Payment API test messages
You can use the following example message with the Payment API to check if your Swish configuration.
For a one-time payment:
{
"SuccessURL": "https://www.example.com/success",
"FailureURL": "https://www.example.com/error",
"Payer": {
"Contact": {
"SalesforceFields": {
"FirstName": "Test",
"LastName": "Payer",
"Email": "test@findock.com"
}
}
},
"OneTime": {
"Amount": "36"
},
"PaymentMethod": {
"Name": "Swish",
"Processor": "Swish-for-FinDock"
}
}
For a recurring payment:
{
"SuccessURL": "https://www.example.com/success",
"FailureURL": "https://www.example.com/error",
"Payer": {
"Contact": {
"SalesforceFields": {
"FirstName": "Test",
"LastName": "Payer",
"Email": "test@findock.com"
}
}
},
"Recurring": {
"Amount": "10",
"Frequency": "Monthly",
"StartDate": "2025-03-01",
"Description": "Monthly subscription fee"
},
"PaymentMethod": {
"Name": "Swish",
"Processor": "Swish-for-FinDock"
}
}