logo
Trustly Docs
BETA
Integration guide for Financial services

Provide your financial services customers with Trustly as a payment method.

Trustly's financial services integrations cover the following scenarios:

  • Issue loans to borrowers.

  • Pay out insurance to customers.

  • Provide remittance services for customers to Transfer money.

  • Let your trading customers deposit and withdraw within your trading platform. See Trading service.

API methods and notifications to implement in your financial service system are shown in the following table:

API method/notificationFunctionPurpose
DepositPay-inBorrowers are able to pay back their loans
AccountPayoutPay-outIssues loans to borrowers
RegisterAccount

SelectAccount
Bank account tokenisationUsed together with AccountPayout to enable open-loop payouts
GetWithdrawalsStatus pollingReturns a detailed status of a payout
Pending notificationNotificationYou’re notified when the checkout flow is completed successfully
Cancel notificationNotificationYou’re notified when the checkout flow has been interrupted
Credit notificationNotificationYou’re notified when you can credit the customer’s balance (funds have settled to your Trustly account)
Debit notificationNotificationYou’re notified when you can debit the customer’s balance (funds have left your Trustly account)
Account notificationNotification (Optional)Trustly sends information about the account used in this order
Payout confirmationNotification (Optional)Trustly confirms that a payout has been sent
  • Make sure that you have completed Sign up and received a Trustly test account.

  • If you have a native app implementation, integrate Trustly SDKs.

Issue loans flow consists of payout and deposit flows.

A typical payout flow is:

  1. When your system approves a borrower's request for loan, make sure that your Trustly account has enough funds to make the payout. You can schedule a daily Balance API call to ensure that your Trustly account has enough funds for the day.

Note: Funds must be transferred from your company bank account to your Trustly account before the payout can be made. No credit is given.

  1. When your system makes payouts to the borrower according to the approved loan request, it checks whether it already has the borrower's bank account details.

  2. If you do not have the borrower's bank account details, your system needs to call SelectAccount so that the borrower can select account for Trustly to respond with an Account ID:

    1. It sends an API call to SelectAccount to get the borrower's account ID.

    2. Your system presents Trustly to the borrower where they can select a bank, enter bank account details and amount to receive the payout.

    3. Trustly sends an Account notification to your system with an AccountID for the selected account.

  3. If your system have borrower's bank account details, you need to call RegisterAccount so that Trustly will register the account and responds with an Account ID:

    1. It sends an API call to RegisterAccount with the borrower's bank account details.

    2. Trustly registers the account and responds with an Account ID.

  4. Your system includes the AccountID, Amount, and Currency for the payout in an API call to API method AccountPayout.

Note: An AccountID does not expire in Trustly system, so it can be used for multiple AccountPayout requests.

  1. Your system includes the AccountID, Amount, and Currency for the payout in an API call to API method AccountPayout.

  2. Trustly returns a synchronous response to let you know that the AccountPayout request has been received.

  3. Trustly sends the following notifications:

  4. Your system responds to the received notifications.

In a typical Deposit flow:

  1. Your customer enters the amount for transfer in your checkout.

  2. Your system sends an API call to Deposit .

  3. Trustly responds with a checkout URL and order ID.

  4. Your system redirects the customer to the Trustly checkout where they log in to their bank and authorise the payment.

  5. The customer will be redirected from the Trustly checkout to SuccessURL specified in the deposit API call.

  6. Depending on the outcome, Trustly may send these notifications:

  7. Your system responds to the received notifications.

Note: Account, Pending, Credit notifications can arrive in any order. The Account notification is not enabled by default. Contact Trustly Integration Support, if you need it.

The business logic for issuing loans consists of payout and deposit flows to respectively issue loans and let borrowers pay back.

  1. Make sure that your integration follows Security requirements.

  2. A borrower makes a loan request.

  3. When your system approves a borrower's request for loan, it sends an API call to Balance to make sure that your Trustly account has enough funds to make the payout.

  4. When your system makes payouts to the borrower according to the approved loan request, it checks whether it already has the borrower's bank account details.

  5. If you do not have the borrower's bank account details, your system needs to call SelectAccount so that the borrower can select account for Trustly to respond with an Account ID:

    1. It sends an API call to SelectAccount to get the borrower's account ID.

    2. Your system presents Trustly to the borrower where they can select a bank, enter bank account details and amount to receive the payout.

    3. Trustly sends an Account notification to your system with an AccountID for the selected account.

  6. If your system has borrower's bank account details, you need to call RegisterAccount so that Trustly will register the account and respond with an Account ID:

    1. It sends an API call to RegisterAccount with the borrower's bank account details.

    2. Trustly registers the account and responds with an Account ID.

  7. Your system includes the AccountID, Amount, and Currency for the payout in an API call to API method AccountPayout.

  1. When it is time for the borrower to pay back their loan, your system requests the borrower to pay back.

  2. When the borrower starts the payback process, your system calls Deposit. See Deposit.

  3. When Trustly responds with a URL, your system presents the URL to the borrower where they can select a bank, enter bank account details and the payout amount to receive.

  4. Depending on the outcome, Trustly may send any of the following notifications:

  5. Make sure that your system logs and handles error codes that are returned from API calls. See Error handling.

  6. Make sure that your integration responds correctly to notifications that Trustly may send out.

For issuing loans, there is no Trustly checkout interaction. You need to create an interaction for the borrowers to accept the loans with Trustly.

For receiving payments on loans, when your integration presents a Trustly URL to borrowers the presentation must follow Trustly checkout guidelines.

Prior to going live, the Trustly Integration Specialist will perform Acceptance testing. Make sure your integration has passed all test cases, including:

  • AccountPayout API calls

  • SelectAccount API calls

  • RegisterAccount API calls

  • Deposit API calls

  • Built-in test cases of acceptance testing: D1 to D5, and G1 to G3

  • Verify that your integration has the correct responses to notifications. See Notification tool.

Follow the instructions to go live.

  • Make sure that you have completed Sign up and received a Trustly test account.

  • If you have a native app implementation, integrate Trustly SDKs.

A typical payout flow is:

  1. Make sure that your Trustly account has enough funds to make the payout. You can schedule a daily Balance API call to ensure that your Trustly account has enough funds for the day.

  2. When your system makes payouts to the customer according to the approved insurance claim, it checks whether it already has the customer's bank account details.

  3. If you do not have the customer's bank account details, your system needs to call SelectAccount so that the customer can select account for Trustly to respond with an AccountID

  4. It sends an API call to SelectAccount to get the customer AccountID.

  5. Your system presents Trustly to the customer where they can select a bank, enter bank account details and amount to receive the payout.

  6. Trustly sends an Account notification to your system with an AccountID for the selected account.

  7. If your system have the customer's bank account details, you need to call RegisterAccount so that Trustly will register the account and responds with an AccountID:

  8. Your system sends an API call to RegisterAccount with the customer's bank account details.

  9. Trustly registers the account and responds with an AccountID.

  10. Your system includes the AccountID, Amount, and Currency for the payout in an API call to API method AccountPayout.

  11. Your system includes the AccountID, Amount, and Currency for the payout in an API call to API method AccountPayout.

  12. Trustly returns a synchronous response to let you know that the AccountPayout request has been received.

  13. Trustly sends the following notifications:

    • Cancel notification when the payout is cancelled.

    • Credit notification when the payout fails.

    • Account notification to tell you more information about the selected bank account when the the customer has selected one.

    • Payout confirmation when the money is successfully transferred from the the customer account in your system to their bank account.

  14. Your system responds to the received notifications.

Note: An AccountID does not expire in Trustly system, so it can be used for multiple AccountPayout requests.

Note: Funds must be transferred from your company bank account to your Trustly account before the payout can be made. No credit is given.

Develop the business logic according to the payout flow.

  1. Make sure that your integration follows security requirements. See Security.

  2. A customer makes an insurance claim.

  3. When your system makes payouts to the customer according to the approved insurance claim, it checks whether it already has the customer's bank account details.

  4. If you do not have the customer's bank account details, your system needs to call SelectAccount so that the customer can select account for Trustly to respond with an AccountID.

    1. Your system sends an API call to SelectAccount to get the customer's AccountID.

    2. Your system presents Trustly to the customer where they can select a bank, enter bank account details and amount to receive the payout.

    3. Trustly sends an Account notification to your system with an AccountID for the selected account.

  5. If your system have the customer's bank account details, you need to call RegisterAccount so that Trustly will register the account and responds with an AccountID.

    1. It sends an API call to RegisterAccount with the customer's bank account details.

    2. Trustly registers the account and responds with an AccountID.

  6. Your system includes the AccountID, Amount, and Currency for the payout in an API call to API method AccountPayout.

  7. Make sure that your system logs and handles error codes that are returned from API calls. See Error handling.

  8. Make sure that your integration responds correctly to notifications that Trustly may send out.

There is no Trustly checkout interaction. You need to create an interaction for the customers to accept the loans with Trustly.

Prior to going live, the Trustly Integration Specialist will perform Acceptance testing. Make sure your integration has passed all test cases, including:

  • AccountPayout API calls

  • SelectAccount API calls

  • RegisterAccount API calls

  • Verify that your integration has correct responses to notifications. See Notification tool.

Follow the instructions to go live.

  • Make sure that you have completed Sign up and received a Trustly test account.

  • If you have a native app implementation, integrate Trustly SDKs.

In a typical Deposit flow:

  1. Your customer enters the amount for payment in your checkout.

  2. Your system sends an API call to Deposit .

  3. Trustly responds with a checkout URL and OrderID.

  4. Your system redirects the customer to the Trustly checkout where they log in to their bank and authorise the payment.

  5. The customer will be redirected from the Trustly checkout to SuccessURL specified in the deposit API call.

  6. Depending on the outcome, Trustly may send these notifications:

  7. Your system responds to the received notifications.

Note: Account, Pending, Credit notifications can arrive in any order. The Account notification is not enabled by default. Contact Trustly Integration Support, if you need it.

Develop business logic according to the deposit flow.

  1. Make sure that your integration follows security requirements. See Security.

  2. When a customer chooses Trustly in your checkout, your system calls Deposit. See Deposit.

  3. Integrate Trustly Express. See Trustly Express API.

  4. When Trustly responds with a Trustly URL, your system presents the URL to the customer for making the deposit.

  5. Make sure that your integration logs and handles error codes that are returned from API calls. See Error handling.

  6. Make sure that your integration responds correctly to notifications that Trustly may send out.

When your integration presents a Trustly URL to customers, the presentation must follow Trustly checkout guidelines.

Prior to going live, the Trustly Integration Specialist will perform Acceptance testing. Make sure your integration has passed all test cases, including:

  • Deposit API calls

  • Built-in test cases of acceptance testing: D1 to D5, and G1 to G3

  • Verify that your integration has correct responses to notifications. See Notification tool.

Follow the instructions to go live.