Payout funds
Let customers withdraw funds from their trading accounts with Trustly
Before you start
- Make sure that you have completed Sign up and received a Trustly test account.
- If you have a native app implementation, integrate Trustly SDKs.
Payout methods
You may request payouts with AccountPayout.
Select the type that best suits your needs.
- AccountPayout: You send the payout call to Trustly with the
AccountID
generated from a previous Deposit, SelectAccount or RegisterAccount. There is no need for customer interaction in this flow
AccountPayout 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 AccountPayout flow is:
- The customer enters the amount to withdraw from their wallet.
- You should verify the payout request and send out the
AccountPayout
API call which should include theAccountID
.- If the customer already deposited with Trustly before you should have the
AccountID
saved in your system. - If the customer never deposited with Trustly you should obtain the
AccountID
by callingSelectAccount
orRegisterAccount
APIs. - If the payout will be denied, then you should not send any API calls to Trustly.
- If the customer already deposited with Trustly before you should have the
- Trustly returns a synchronous response to let you know that the
AccountPayout
request has been received and the payout is being processed. - Trustly may send the following notifications:
- Cancel notification if the payout is canceled.
- Payout confirmation when the funds are successfully sent from Trustly.
- Credit notification if the payout fails.
- Your system must respond to the received notifications.
Step 1: Integrate your system with Trustly
The business logic for withdrawing funds consists of a payout flow to transfer money from our Trustly account to your customers.
- 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.
- Make sure that your integration follows security requirements. See Security.
- A customer makes a request to withdraw funds.
- Your system sends an API call to either AccountPayout.
- Make sure that your system logs and handles error codes that are returned from API calls. See Error handling.
- Make sure that your integration responds correctly to notifications that Trustly may send out.
Step 2: Design service presentation
When your integration presents a Trustly URL to customers, the presentation must follow Trustly checkout guidelines.
Step 3: Do acceptance testing
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 the correct responses to notifications. See Notification tool.
Step 4: Verify and go live
Follow the instructions to go live.
Updated 8 months ago