Testing in Sandbox
The sandbox environment includes an ACH Simulations feature that allows an ACH object to be programmatically moved into the various states you will encounter in production funds movement. It also allows for customization of the settlement time for ACH debit transfers to allow for more rapid testing than could be done with production transfers.Simulating ACH Transfers
Simulating an ACH transfer involves two steps:- Create an ACH object to use for the simulation using the
/achendpoint - Update the ACH using the
/simulationsendpoint
ACH Simulation Types
How to Create an ACH Object for Simulation Testing
Before you can submit a new simulation request, you must first create a new ACH object. Simulation requests and ACH objects should have a 1:1 relationship. To create a new ACH object for use with simulations, use the standard/ach endpoint to create a new object that includes the following parameter(s) in the userdata field.
Sandbox Test Scenarios
The recommendations below represent common ACH scenarios you may want to test before launching your application in a production environment.- Originated ACH credit
- Originated ACH debit
- Incoming ACH credit
- Incoming ACH debit
- Returned ACH credit
- Returned ACH debit
- Originated ACH credit from an account with insufficient funds
Example ACH Simulation
In the following example, we will create an ACH debit for $100, then use theach.processing_sent simulation to process the ACH and move it to a sent status.
1. Create an ACH
The request below will create an ACH debit for $100. For help in understanding the body of ACH requests, see the guide on how to transfer funds using ACH. In theuserdata field, the manual flag tells the system to wait for a simulation request before processing this transaction, and the scheduled_settlement value of “0” determines that when that request is received, it will wait 0 minutes before settling.
2. Simulate sent Status
Now that you have created an ACH object to use for simulations, you can now coerce ACH we created in the previous step directly to a status of sent using the ach.processing.sent simulation type.
Next, ensure that you pass the in the id of the ACH you created in the previous step in the ach_id property of the simulation sub-object.