This article explains how to simulate the following scenarios
Our sandbox environment offers you a simple and effective way to test your integrations before sending them live and Debiting your actual customers. Perhaps the largest and most important part of an integration will be the logic around Payment Requests and what happens when one succeeds or fails. Below here I’ll explain how you can easily test your Payment Requests and ensure your application is responding how it should be.
Before you can issue a Payment Request, you'll need to ensure you have a Contact to Debit and an Agreement in place between you and them. If you're not sure how to create either of these, this article will help you get setup.
How To Create a Payment Request That Will Fail?
When creating transactions in the Sandbox environment, there are multiple special
amounts that, when used as the Debit / Credit amount, will result in a failed transaction. There are multiple reasons that a Transaction can fail and so we have different amounts that correspond to different failure reasons.
Each of these failure reasons can be returned while Debiting people in the production environment and they each mean something different. Their meanings are explained here
Create a Debit for the following amount to have it fail with the corresponding reason.
$0.01 - Invalid BSB Number
$0.02 - Account Closed
$0.03 - Customer Deceased
$0.04 - Incorrect Account Number
$0.05 - Refer To Split - This generally means not a debitable Account type
$0.06 - User Voided
$0.07 - Admin Voided
$0.10 - Refer To Customer - This generally mean insufficient funds
$0.11 - Insufficient Funds
$0.12 - Payment Stopped
Create a Credit for the following amount to have it fail with the corresponding reason.
$0.51 - Invalid BSB Number
$0.52 - Account Closed
$0.53 - Customer Deceased
$0.54 - Incorrect Account Number
$0.55 - Refer To Split - This generally means not a debitable Account type
$0.56 - User Voided
$0.57 - Admin Voided
How To Create a Payment Request That Will Succeed?
While using our Sandbox environment, all Payment Requests and Payments will succeed unless they are for one of the amounts listed above here. So Debit away!
Can I Create a Payment Request That Will Pre-Fail?
If you are using our more advanced features, checking balances and pre-failing transactions, you may find that you need to simulate a pre-failed transaction to complete your testing.
The Split Sandbox environment makes use of the Proviso testing environment, and is consistent in the balance values that it returns, which we can use to our advantage.
In the case of a Contact with the following Bank Account:
- BSB - 123456
- Account - 456789
the balance returned is always $123.45. Therefore, if you request less than this amount the Payment Request will succeed, and if you request more, then it will pre-fail due to insufficient funds.