To support your onboarding and commissioning, Trustap provide the following tools for test transactions.
There are two environments for the Trustap API.
- A production environment for your completed production application.
- A sandbox test environment for developing your app and testing new features.
The test environment is separate from the production environment. Changes to the test environment do not affect the production environment. You do not incur charges in the test environment.
To use the test environment, make API calls using the test environment path.
https://api.test.trustap.com/v2/To use the production environment after you complete development, switch API calls to use the production environment path.
https://api.trustap.com/v2/The test and production environments use different API keys. Use the keys you received from Trustap. Use your test <API_KEY> with the test environment.
To test and simulate a payment flow, use test card numbers. These card number only work in the Trustap test environment. Using a test card means no actual payment is made but the transaction is paid as if it was a real card.
Use the following card example for successful payments.
- The expiration date can be any date in the future.
- The card holder name can be any name.
To test different scenarios including different card types or declined payments, a range of different test cards are available to use.
To test bank transfer flows in the Trustap sandbox, buyer accounts must have funds available to make the bank transfer.
Complete the following steps to simulate a bank transfer in your sandbox account.
- Create your guest buyer account.
- Send your guest user email to your Trustap integration specialist to pre-fund that user`s account.
- Create your transaction with your guest buyer ID.
To simulate a payment using the Trustap bank transfer test buyer ID, you must trigger a payment for the transaction by calling the show bank details endpoint or displaying the payment page. You do not make a payment but calling these resources triggers a simulated payment and moves the transaction to the next step.
When you use a pre-funded buyer ID, the system makes the payment instantly. In the production environment, the buyer must go to their bank and transfer the funds. Trustap then sends a webhook to let you know when funds have been lodged.