The Sandbox environment does not replicate any bank transfer processes, so a pending transfer will not clear or fail automatically after a few business days as it would in production. The transfer will simply remain in the pending state indefinitely.
There are two options available for processing or failing bank transfers in the Sandbox environment.
Customers
you manage.POST https://api-sandbox.dwolla.com/sandbox-simulations
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer {Your access token}
...
{
"_links": {
"self": {
"href": "https://api-sandbox.dwolla.com/sandbox-simulations",
"type": "application/vnd.dwolla.v1.hal+json",
"resource-type": "sandbox-simulation"
}
},
"total": 8
}
The Dwolla Sandbox Dashboard provides a convenient way to simulate bank transfer processing. In the left-side navigation, locate and click the "Process bank transfers" button.
This button offers the same functionality as the "sandbox-simulations" endpoint (mentioned earlier) and allows you to simulate the processing of bank transfers within the Sandbox environment.
By clicking the button, Dwolla will process or fail the last 500 bank transfers associated with your Sandbox account or any API Customer accounts you manage.
To create a Real-time payment (RTP) transfer, you need to attach a funding-source that is RTP enabled to your Customer. The Clearing House maintains lists of all financial institutions in the RTP® Network and all RTP-enabled Routing/Transit Numbers. Use one of the routing numbers from the list to create an RTP-enabled funding-source in your Sandbox account. The account number can be any random number of 4-17 digits.
Transfers to or from a bank account can fail for a number of reasons (e.g. insufficient funds, invalid account number, etc.). When a bank transfer fails, the associated financial institution that rejected the transaction assigns an ACH return code and a transfer failure event is then triggered in Dwolla. Dwolla allows you to trigger various bank transfer failures by specifying an “R” code in the funding source name
parameter when creating or updating a funding source for a Dwolla Account or API Customer. When a transfer is initiated using a funding source that has an “R” code assigned to its name, a transfer failure event will trigger and the status will update to failed when you simulate bank transfer processing (as mentioned above).
Dwolla allows you to pass in a few different sentinel values that are used to test different bank transfer failure scenarios. The list of available sentinel values cover the most common uses cases where ACH return codes can be triggered in production.
Return code | Description |
---|---|
R01 | Insufficient Funds: This value is used to simulate funds failing from the source bank account (ACH debit). |
R03 | No Account/Unable to Locate Account: This value is primarily used to simulate funds failing to the destination bank account (ACH credit). The funding source will be automatically removed from Dwolla when this return code is triggered. |
R01-late | This value is used to simulate funds failing from the source bank account post-settlement. Note: You must click “Process bank transfers” twice in order to test this scenario. |
R03-late | This value is primarily used to simulate funds failing to the destination bank post-settlement. The funding source will be automatically removed from Dwolla when this return code is triggered. Note: You must click “Process bank transfers” twice in order to test this scenario. |
This example assumes that a funding source has already been attached to an account. Once the funding source name
has been updated to reflect the ACH failure scenario you want to test, then you can initiate a transfer to or from that funding source via the API.
POST https://api-sandbox.dwolla.com/funding-sources/692486f8-29f6-4516-a6a5-c69fd2ce854c
Accept: application/vnd.dwolla.v1.hal+json
Content-Type: application/vnd.dwolla.v1.hal+json
Authorization: Bearer pBA9fVDBEyYZCEsLf/wKehyh1RTpzjUj5KzIRfDi0wKTii7DqY
...
{
"name": "R03"
}
All funds transfers made using the Dwolla Platform are performed by a financial institution partner, and any funds held in a Dwolla Balance are held by a financial institution partner. Learn more about our financial institution partners.