# Testing transfer failures

**URL:** <https://discuss.dwolla.com/t/testing-transfer-failures/7832>\
**Category:** General\
**Created:** [February 16, 2022, 9:45pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832 "2022-02-16T21:45:20Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrew-willow](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andrew-willow](https://discuss.dwolla.com/u/andrew-willow)\
**Post date:** [February 16, 2022, 9:45pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/1 "2022-02-16T21:45:20Z")

</div>

I named my destination funding source as `R03` and initiated a transfer. But when I process transfers, this transaction becomes Processed instead of Failed. I see that my webhook has 2 `customer_transfer_created` and 2 `customer_transfer_completed` events. Then I tried to process transfers again and I see that my webhook has a `customer_bank_transfer_created` and a `customer_bank_transfer_failed` events. But the transfer is still in Processed status.

Can you explain why my transactions are not becoming Failed status even though I name my destination bank as an error return code? Am I missing a step to simulate transfer failures?

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [February 17, 2022, 3:21pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/2 "2022-02-17T15:21:01Z")

</div>

Hi @andrew-willow!

It appears that this is a transfer to a Verified Customer type. In that case, this is expected behavior – the second leg of the transaction fails due to an R03 return from the bank, however, the funds were still successfully transferred to the recipient’s Dwolla Balance funding-source, which is why it is `processed`. If you retrieve the `funded-transfer` link from the links in the resource, it will take you to the final leg of the transfer which is `failed`.

You can check out this gist to find out all possible scenarios that a transfer may encounter and the webhooks triggered in each scenario - [Outlines the sequence of events that are triggered for a subset of Dwolla payment flows that are bank-to-bank via ACH · GitHub](https://gist.github.com/spencerhunter/2ab064e8e76a049eb22e17ed8e92f350#transfer-scenario-1)

---

<div class="post-metadata">

**Author:** ![andrew-willow](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andrew-willow](https://discuss.dwolla.com/u/andrew-willow)\
**Post date:** [February 17, 2022, 3:32pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/3 "2022-02-17T15:32:13Z")

</div>

Thanks @shreya!  
I have been referencing that gist resource, and I think my transfer falls under scenario 3. But I’m still unclear on which of the failure cases for scenario 3 will result in a transfer failure status?  
I also tried R01 return error but it seems to have a similar behavior. For both, I get a `Failed Transaction Dwolla` email but when I click the link to `View Failed Transactions` none of these transfers show up in the table.

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [February 23, 2022, 6:24pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/4 "2022-02-23T18:24:54Z")

</div>

Hi @andrew-willow – sorry for the late follow-up. Are you able to share some transaction IDs of the ones that are exhibiting this behavior?

---

<div class="post-metadata">

**Author:** ![andrew-willow](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andrew-willow](https://discuss.dwolla.com/u/andrew-willow)\
**Post date:** [February 23, 2022, 6:33pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/5 "2022-02-23T18:33:49Z")

</div>

hi @shreya. i think the transactions that are most confusing me are:  
f2eed5aa-a069-ec11-813c-f6ddd36b41b8 which failed for R01  
147635f8-4a8f-ec11-813d-ca84ae5ee1fb which processed but has a failed related transfer for R01  
im not clear what the difference is between these 2? and also what flow can i use to test a failed transfer?

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [February 23, 2022, 7:03pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/6 "2022-02-23T19:03:43Z")

</div>

`f2eed5aa-a069-ec11-813c-f6ddd36b41b8` – This one looks like a regular ACH return from the source. It’s the [`Fail - ACH return on source bank`](https://gist.github.com/spencerhunter/2ab064e8e76a049eb22e17ed8e92f350#fail---ach-return-on-source-bank-1) scenario from the Gist.

`147635f8-4a8f-ec11-813d-ca84ae5ee1fb` – This one looks like a regular return on the destination bank. It’s the [`Fail - ACH return on destination bank`](https://gist.github.com/spencerhunter/2ab064e8e76a049eb22e17ed8e92f350#fail---ach-return-on-destination-bank-1) scenario from the gist.

Why it failed with a `R01` is because the destination bank name was update to `R01` while the transfer was still “in flight”. It was then updated to `R03` later that day after the transfer was already processed.

Hope that helps clarify things.

---

<div class="post-metadata">

**Author:** ![andrew-willow](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andrew-willow](https://discuss.dwolla.com/u/andrew-willow)\
**Post date:** [February 23, 2022, 7:42pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/7 "2022-02-23T19:42:27Z")

</div>

thanks @shreya. i see how the 2 transactions match the different scenarios. but i am still confused why both did not fail for R01 (ACH return on source bank). i tried to reproduce the same steps but the transactions have different results. can you explain why they did not both fail with R01 on source bank?  
just to clarify, i changed the destination bank name to R03 afterwards because the transfer was not failing how i expected and i wanted to try a different case.

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [February 23, 2022, 8:32pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/8 "2022-02-23T20:32:30Z")

</div>

Ah, that’s because using the `R01` bank on the destination side works the same as an `R03` return in Sandbox.

In order to test a true `R01 Insufficient funds` return, you will need to name the **source** bank as `"R01"` for regular returns, and `"R01-late"` for late returns (post-settlement).

Similarly, to test returns on from the destination bank (bank not found / invalid account number), you will to name the **destination** bank as `"R03"` for regular returns, and `"R03-late"` for late returns (post-settlement).

---

<div class="post-metadata">

**Author:** ![andrew-willow](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andrew-willow](https://discuss.dwolla.com/u/andrew-willow)\
**Post date:** [February 23, 2022, 9:01pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/9 "2022-02-23T21:01:47Z")

</div>

thank you! i did not realize that it mattered which bank had the return code name, and thanks for explaining R01 vs R03.

---

<div class="post-metadata">

**Author:** ![andrew-willow](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@andrew-willow](https://discuss.dwolla.com/u/andrew-willow)\
**Post date:** [February 24, 2022, 3:42pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/10 "2022-02-24T15:42:48Z")

</div>

Hi @shreya. I was testing transfer failures after your explanation, since now I understand this note: `There are a subset of ACH return codes that trigger systematic actions within the Dwolla system.` and what it refers to.  
Basically, R03 will fail the customer bank transfer and then remove the funding source. Is there a return code that I can use to simulate `Fail - ACH return on destination bank` without removing the destination funding source? I tried to add a funding source named R09 or R20 but seems like these are not allowed.

---

<div class="post-metadata">

**Author:** ![shreya](https://sea2.discourse-cdn.com/dwolla/user_avatar/discuss.dwolla.com/shreya/32/2154_2.png) [@shreya](https://discuss.dwolla.com/u/shreya)\
**Post date:** [March 1, 2022, 11:24pm UTC](https://discuss.dwolla.com/t/testing-transfer-failures/7832/11 "2022-03-01T23:24:35Z")

</div>

Hi @andrew-willow – of course! I’m glad it helped clarify things 🙂

I’m afraid R03 and R03-late are the only supported simulations in Sandbox for destination bank account failures since they are the most common return codes we encounter from a destination bank account. In production, there _might_ be certain return codes that won’t automatically remove the funding-source. You can check it out here - [ACH Transfer Failures | Dwolla API Documentation](https://developers.dwolla.com/concepts/transfer-failures#list-of-possible-return-codes-descriptions-and-actions)
