Skip to main content

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:
  1. Create an ACH object to use for the simulation using the /ach endpoint
  2. Update the ACH using the /simulations endpoint

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.
  1. Originated ACH credit
  2. Originated ACH debit
  3. Incoming ACH credit
  4. Incoming ACH debit
  5. Returned ACH credit
  6. Returned ACH debit
  7. 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 the ach.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 the userdata 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.

Testing in Production

Best practice for testing in production involves creating low-value ACH transfers that mimic the actions you expect your users to take within your application. The recommendations below may or may not apply based on your use cases, and are meant to serve as general guidelines. They may not represent complete test coverage for your specific implementation.