Test your integration
Before going live, you must simulate various payment scenarios in the Sandbox environment and complete a formal certification by contacting your assigned Trustly integration manager.
Need advanced test cases? This topic covers the essential testing workflows. For a comprehensive list of specific amounts and parameters to trigger errors (NSF, Risk, Frozen Account, and so on), see Testing.
The Demo Bank
The Sandbox environment features a simulated financial institution named Demo Bank. Use the Demo Bank to complete the entire payment flow without moving real money or using real banking credentials.
When the Trustly Lightbox opens:
- Select Demo Bank from the bank list.
- Enter any non-empty string for the Username and Password. For example,
user/password. - Select an account (Checking or Savings) to complete the authorization.
Successful payment (happy path)
Verify that your application correctly handles a completed transaction.
- Start an Instant Payment or Trustly Pay flow with a valid amount such as
100.00. - In the Lightbox, select Demo Bank, log in, and approve the transfer.
- Confirm the application redirects the customer to your
returnUrl. - Verify the following:
- The URL parameters contain
status=2(Authorized). - The server logs show the
Authorizewebhook notification.
- The URL parameters contain
Customer cancellation
Verify that your application correctly handles customers who abandon the flow.
- Start a payment flow.
- In the Lightbox, click the X (Close) icon or the Cancel button on the login screen.
- Confirm the application redirects the customer to your
cancelUrl. - Check that the URL parameters contain
status=7(Canceled).
Payouts
To test Payouts, you must use specific account data to ensure the backend accepts the transaction.
For standard Payouts using the Lightbox, follow the Happy Path instructions. When you reach the account selection screen in Demo Bank, select the Checking account.
Simulate errors
To ensure your error handling logic works, you can trigger specific decline states by using specific transaction amounts or account numbers.
For the complete list of Magic Amounts and triggers, see Testing.
Updated about 1 month ago