Before placing orders the account needs funds. There are two ways to deposit money into an account.
The customer makes a standard bank transfer to Fondo's bankgiro number using the account's ref field as the OCR reference. The ref is returned when the account is created and is available on the account object.
ref is a unique account number, based on epoch, length and Luhn. OCR length digit compliant.
Swish lets the customer pay directly from the Swish app. There are two flows:
- Same device — the customer is on a mobile device; Swish opens directly via its app-switch token.
- QR code — the customer is on a desktop; you display a QR code they scan with the Swish app.
- Sandboxhttps://api.sandbox.fondo.se/v2/partner/client/{clientId}/account/{accountId}/deposit/swish
- NPChttps://api.npc.fondo.se/v2/partner/client/{clientId}/account/{accountId}/deposit/swish
- Productionhttps://api.fondo.se/v2/partner/client/{clientId}/account/{accountId}/deposit/swish
curl -i -X POST \
'https://api.sandbox.fondo.se/v2/partner/client/{clientId}/account/{accountId}/deposit/swish' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"type": "qr",
"clientRef": "string",
"thirdPartySsn": "string",
"message": "string",
"amount": 0,
"qrFormat": {
"format": "jpg",
"size": 0,
"border": 0,
"transparent": true
}
}'Type of swish signature
Client reference for tracking the payment
Social security number of a payer other than the account owner. Omit it when the owner pays. Requires the client permission allowThirdPartySwishDeposits, that third-party Swish deposits are enabled on the account (thirdPartySwishDepositsEnabled) and that Fondo has not blocked them (thirdPartySwishDepositsBlocked); otherwise the request fails with 400 and error_description third_party_swish_not_allowed. Only allowed for accounts owned by a natural person.
Message shown to the payer. Ignored in production, where a fixed message is used. In test environments the Swish simulator derives the payment outcome from this value.
Amount
qr format in accordance to to swish Mcom to Qcom qr v1 https://developer.swish.nu/api/qr-codes/v1
After creating the Swish session, poll for the result:
- Sandboxhttps://api.sandbox.fondo.se/v2/partner/deposit/swish/{swishId}
- NPChttps://api.npc.fondo.se/v2/partner/deposit/swish/{swishId}
- Productionhttps://api.fondo.se/v2/partner/deposit/swish/{swishId}
curl -i -X GET \
'https://api.sandbox.fondo.se/v2/partner/deposit/swish/{swishId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'status from Swish
error code from Swish
By default the account owner pays. Pass thirdPartySsn to let another person pay into the account, for example a parent depositing to a child's account.
Third-party deposits require all of the following, otherwise the request fails with 400 and error_description third_party_swish_not_allowed:
- The client permission
allowThirdPartySwishDeposits, set by Fondo and visible underpermissionson the client. - Third-party Swish deposits are enabled on the account. Set
thirdPartySwishDepositsEnabledwithPATCH /v2/partner/client/{clientId}/account/{accountId}once the customer agrees to receive Swish deposits from others. Accounts default to false. - Fondo has not blocked it on the account.
thirdPartySwishDepositsBlockedis read-only on the account.
- Sandboxhttps://api.sandbox.fondo.se/v2/partner/client/{clientId}/account/{accountId}
- NPChttps://api.npc.fondo.se/v2/partner/client/{clientId}/account/{accountId}
- Productionhttps://api.fondo.se/v2/partner/client/{clientId}/account/{accountId}
curl -i -X PATCH \
'https://api.sandbox.fondo.se/v2/partner/client/{clientId}/account/{accountId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"thirdPartySwishDepositsEnabled": true
}'Next: Autogiro deposits