How to get started with Recurring payments for Financial services
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.
API methods and notifications to implement in your financial service system are shown in the following table:
API method/notification | Function | Purpose |
---|---|---|
Deposit | Pay-in | Borrowers are able to pay back their loans |
AccountPayout | Pay-out | Issues loans to borrowers |
RegisterAccount SelectAccount | Bank account tokenisation | Used together with AccountPayout to enable open-loop payouts |
GetWithdrawals | Status polling | Returns a detailed status of a payout |
Pending notification | Notification | You’re notified when the checkout flow is completed successfully |
Cancel notification | Notification | You’re notified when the checkout flow has been interrupted |
Credit notification | Notification | You’re notified when you can credit the customer’s balance (funds have settled to your Trustly account) |
Debit notification | Notification | You’re notified when you can debit the customer’s balance (funds have left your Trustly account) |
Account notification | Notification (Optional) | Trustly sends information about the account used in this order |
Payout confirmation | Notification (Optional) | Trustly confirms that a payout has been sent |
Recurring payments
Make sure that you have completed Sign up and received a Trustly test account.
If you have a native app implementation, integrate Trustly SDKs.
Accepting recurring payments require you to first make mandate registration. Once the mandate has been approved, you can start accepting recurring payments through Charge API call.
A mandate means that a customer authorises you to access their bank account.
To provide Trustly as a payment method for recurring payment, you need to register a mandate and get customers' approval before accepting payments.
You can register a mandate with Trustly in these ways:
If you want to let customers approve a mandate for future payments
Register mandate using SelectAccount
. Send a SelectAccount call with attribute "RequestDirectDebitMandate" : "1"
.
If you want to let customers make a one-time payment and approve the mandate for future payments at the same time
Send a Deposit
call with attribute "RequestDirectDebitMandate" : "1"
.
In a typical Charge flow:
Your system sends an API call to Charge.
Trustly starts to process the payment with the customer's bank account that they have authorised access.
If the payment is processed successfully, Trustly will send a Credit notification to your system on the following bank day. Note that cut-off time is 18.48 CET on bank days.
If the payment is not processed successfully but you have requested Trustly to configure retries, Trustly will retry up to three times. Trustly will send a Credit notification for processing the payment successfully. Otherwise, Trustly will send a Cancel notification, once all retries have been attempted.
If the payment is not processed successfully and retries are not configured, Trustly will send a Cancel notification to your system.
Your system responds to the received notifications.
Develop business logic according to the charge flow.
Make sure that your integration follows security requirements. See Security.
Register the mandate for a customer.
If you only want to register the mandate without accepting payments, send a call to SelectAccount with attribute
"RequestDirectDebitMandate" : "1"
.If you want to register the mandate when accepting a one-time payment, send a call to Deposit with attribute
"RequestDirectDebitMandate" : "1"
.
If the mandate registration is successful, Trustly will send an Account notification with attribute
"directdebitmandate": "1"
to your system.If the mandate registration fails, Trustly will send an Account notification with attribute
"directdebitmandate": "0"
to your system.
Note: The payment transaction made by aDeposit
call will not be affected.
When it is the scheduled time to charge the customer as per their agreement with you, your system calls Charge.
If you send a
Charge
call with a future pay date, you can cancel this scheduled charge with a call to CancelCharge, up to the day before the scheduled pay date.Mandate management:
You can remove access to the mandate in Trustly Back Office.
When a mandate is revoked, Trustly will send an Account notification with attribute
"directdebitmandate": "0"
to your system.
Note: Your customers can revoke the mandate manually through their internet bank.
Make sure that your integration logs and handles error codes that are returned from API calls. See Error handling.
Make sure that your integration responds correctly to Trustly notifications.
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:
Mandate registration
Charge API calls
CancelCharge API calls, if you are sending future pay date
Mandate cancellation via Trustly Back Office
Built-in test cases of acceptance testing: D1 to D5, DD1 to DD3, and G1 to G3
Verify that your app has correct responses to notifications. See Notification tool.
Follow the instructions to go live.