logo
Trustly Docs
BETA
Integration guide for Gaming

Let players deposit and withdraw money by using Trustly in your gaming cashier.

Common scenarios

Trustly's gaming integrations allow you to cover the following scenarios:

  • Open or Closed loop payouts.

  • Regular deposit checkout.

Common functions

API methods and notifications to implement in your gaming cashier and merchant system are shown in the following table:

Tip: Reach out to your Account Development Manager/Integration Support to better understand the API methods/notifications needed to solve your business goals.

API method/notificationFunctionPurpose
DepositPay-inPlayers deposit money using Trustly checkout
AccountPayoutPay-outPlayers request payouts without Trustly checkout interaction (closed loop payouts)
RefundRefundGaming operators refund deposits
RegisterAccount

SelectAccount
Bank account tokenisationUsed together with Account Payout to enable open loop payouts
GetWithdrawalsReportingReturns a detailed status of a payout
AccountLedger

Balance
ReportingCheck the balance of your Trustly account
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 the player’s gaming balance should be increased
Debit notificationNotificationYou’re notified when the player’s gaming balance should be decreased
Account notificationNotificationTrustly sends information about the account used in this order
Payout confirmationNotificationTrustly sends to the merchant’s system to confirm a payout has been sent

AccountPayout

Build an integration for you to pay out to players directly to their bank accounts

Before you start the integration

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

Payout flow

The AccountPayout method is used by merchants to transfer money to their customer's bank accounts. The merchant specifies the receiving bank account in the AccountPayout call by using the AccountID parameter, which is a unique identifier generated by Trustly. The merchant can get the AccountID from the account notification which is sent after a SelectAccount or a Deposit order has been completed.

Alternatively, the RegisterAccount method can be used to get the AccountID, if the merchant already has the bank account details and want to register them in Trustly's system.

A typical payout flow is:

  1. The player enters the amount and requests a payout from your gaming cashier.

  2. You should verify the payout request and send out the AccountPayout API call which should include the AccountID.

    1. If the player already deposited with Trustly before you should have the AccountID saved in your system.

    2. If the player never deposited with Trustly you should obtain the AccountID by calling SelectAccount or RegisterAccount APIs.

    3. If the payout will be denied, then you should not send any API calls to Trustly.

  3. Trustly returns a synchronous response to let you know that the AccountPayout request has been received and the payout is being processed.

  4. Trustly may send the following notifications:

  5. Your system must respond to the received notifications in a timely manner.

Step 1: Integrate your system with Trustly

Develop business logic according to the payout flow.

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

  2. When a player requests a payout, your system calls AccountPayout. See AccountPayout.

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

  4. You should implement the SelectAccount or RegisterAccount for open-loop payouts depending on the market and commercial agreement.

Step 2: Design service presentation

Since there is no Trustly checkout interaction, the merchant should create the UX for the players that include Trustly as the payout option.

Step 3: Inform Trustly to do acceptance testing

Prior to going live, the Trustly Integration Specialist will be performing a series of acceptance testing cases according to Trustly standards, including:

  • Check AccountPayout API call parameters and attributes

  • Run various test cases according to Trustly standard

  • Verify that all API notifications are sent with valid responses in a timely manner

  • Verify user experience of merchant's service presentation

Step 4: Verify and go live

Follow the instructions to go live.

SelectAccount

Initiates a new order where the end-user can select and verify one of their bank accounts.

A typical SelectAccount flow

  1. Since the player never deposited with Trustly in your gaming cashier, a new account must be added to your system to initiate any future payout requests.

  2. The player enters the amount to payout and chooses Trustly as a payout method.

  3. You send an API call to SelectAccount and redirect the end-user to the URL.

  4. The player selects their bank and completes the identification process.

  5. The end-user is redirected back to the merchant at the SuccessURL, note that the account might not be verified yet at this point.

  6. When the account is verified, Trustly sends an Account notification to the merchant's system with information about the selected account.

    • Trustly will send the Cancel notification if the player aborts the checkout process.

  7. Once the accountID is stored in your system, send the AccountPayout API call for Trustly to process.

Step 1: Integrating the API

Develop business logic according to the payout flow.

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

  2. Implement the SelectAccount API according to the Trustly specification. See SelectAccount.

  3. Implement the redirection to Trustly checkout URL, which will allow the player to select a bank account.

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

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

Step 2: Design service presentation

When the merchant presents a Trustly URL to players, the presentation must follow Trustly checkout guidelines.

Step 3: Inform Trustly to do acceptance testing

Prior to going live, the Trustly Integration Specialist will be performing a series of acceptance testing cases according to Trustly standards.

This will include:

  • Check SelectAccount API calls parameters and attributes

  • Run built-in test cases (G1-G3) which are available in the Trustly test checkout

  • Verify that all API notifications are sent with valid responses

  • Verify user experience of your service presentation

Step 4: Verify and go live

Follow the instructions to go live.

RegisterAccount

Registers and verifies the format of an account to be used in AccountPayout.

A typical RegisterAccount + AcountPayout flow

  1. Since the player never deposited with Trustly in your gaming cashier, a new account must be added to your system to initiate any future payout requests.

  2. The player enters the amount to payout and the bank account number (according to the market).

  3. You send an API call to RegisterAccount.

  4. Trustly will respond with a designated accountID for the bank account.

  5. Once the accountID is stored in your system, send the AccountPayout API call for Trustly to process.

  6. The player should have the saved bank account displayed in the cashier as an option for future payouts.

Step 1: Integrating the API

Develop business logic according to the payout flow.

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

  2. Implement the SelectAccount API according to the Trustly specification. See RegisterAccount

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

Step 2: Design service presentation

Since there is no Trustly checkout interaction, the merchant should create the Instant bank payout form that would include the Bank account fields according to the market and the integration is done.

Step 3: Inform Trustly to do acceptance testing

Prior to going live, the Trustly Integration Specialist will be performing a series of acceptance testing cases according to Trustly standards.

This will include:

  • Checking RegisterAccount API calls parameters and attributes

  • Run various user acceptance testing scenarios as per Trustly procedure

  • Verify user experience of merchant's service presentation

Step 4: Go live

Follow the instructions to go live.