Documentation Index
Fetch the complete documentation index at: https://docs.treasuryprime.com/llms.txt
Use this file to discover all available pages before exploring further.
Return timeframes
The Receiving Depository Financial Institution (RDFI) has 2 business days to return most ACH payments. For unauthorized transactions on consumer accounts, the RDFI has up to 60 calendar days to initiate a return. When the Originating Depository Financial Institution (ODFI) receives a return, Treasury Prime updates the ACH object status toreturned and populates the error field with the appropriate return code.
ACH return flow
This example shows the flow when an ACH debit is returned due to insufficient funds:- You originate an ACH debit using the Treasury Prime API
- The RDFI receives the ACH but the account has insufficient funds
- The RDFI issues an ACH return with return code
R01(Insufficient Funds) - The ODFI (Treasury Prime partner bank) receives the return and notifies Treasury Prime
- Treasury Prime updates the ACH object:
- Changes
statustoreturned - Populates
errorfield with the return code
- Changes
- The
ach.updatewebhook fires to notify you of the status change
Identify ACH returns
When the RDFI returns an ACH payment, Treasury Prime updates the ACH object with:status: Set toreturnederror: Populated with the return code explaining why the payment was returned
Monitor webhooks
Theach.update webhook fires when an ACH object changes status. Use this webhook to notify your customers that their payment was not completed and may require follow-up action.
Query the API
Filter the /ach endpoint bystatus=returned to retrieve all returned ACH payments. This allows you to build internal dashboards or customer-facing views of returned payments.
Example Request to List Returned ACH Objects
Return an originated ACH
To return an ACH transfer you originated, use the Update an ACH endpoint. Note: This feature must be enabled for your organization. If not enabled, contact Treasury Prime support at support@treasuryprime.com with:- The transaction
idof the originated ACH - The reason for the return request
- Any other relevant information
Incoming ACH returns availability varies by bank partner and requires bank approval. Contact your relationship manager to discuss availability and any associated costs.
Example returned ACH object
This example shows an ACH debit returned by the RDFI with return codeR01 (insufficient funds):
Transactions for returned ACH payments
An ACH return reverses the funds movement from the original ACH:- ACH debits (which create a deposit): A withdrawal reverses the original deposit
- ACH credits (which create a withdrawal): A deposit reverses the original withdrawal
account.update webhook.
Scenario 1: Returned ACH debit
When you create a $20 ACH debit:- A $20
depositis applied to the originating account - A $20
holdis placed on those funds
hold_release balances the account
| Order | Transaction Type | Amount |
|---|---|---|
| 1 | deposit | 20 |
| 2 | hold | -20 |
| 3 | withdrawal | -20 |
| 4 | hold_release | 20 |
Scenario 2: Returned ACH credit
When you create a $20 ACH credit:- A $20
withdrawalis made from the originating account
deposit reverses the initial withdrawal
| Order | Transaction Type | Amount |
|---|---|---|
| 1 | withdrawal | 20 |
| 2 | deposit | -20 |
Return an incoming ACH
To return an incoming ACH transfer originated by a third party, use the Update an Incoming ACH endpoint with one of the supported return codes:R29, R10, or R20.
For detailed information including timing requirements and example requests, see the Returning Incoming ACH guide.
ACH return codes
Below is the list of the most commonly encountered ACH return codes.| Code | Reason | Description |
|---|---|---|
| R01 | Insufficient funds | Available balances is not sufficient to cover the dollar amount of the debit entry. |
| R02 | Account closed | A previously open account is now closed. |
| R03 | No account or unable to locate account | The account number does not correspond to the individual identified in the entry or a valid account. |
| R04 | Invalid account number structure | The account number fails the check digit validation or may contain an incorrect number of digits. |
| R05 | Unauthorized debit to consumer account using a corporate SEC code | A ccd or ctx business debit entry was transmitted to a consumer account, and was not authorized by the recipient. |
| R06 | Returned per ODFI’s request | The ODFI has requested that the RDFI return the entry. |
| R07 | Authorization revoked by customer | A receipient who previously authorized an entry has revoked authorization with the originator. |
| R08 | Payment stopped | The recipient has placed a stop payment order on this debit Entry. |
| R09 | Uncollected funds | A sufficient balance exists to satisfy the dollar value of the transaction, but the available balance is below the dollar value of the debit Entry. |
| R10 | Customer advises Originator is Not Known to Receiver and/or Originator is Not Authorized by Receiver to Debit Receiver’s Account | The RDFI has been notified by the recipient that the recipient does not know the identity of the originator, has no relationship with the originator, or has not authorized the originator to debit their account. |
| R11 | Customer Advises Entry Not in Accordance with the Terms of Authorization | The RDFI has been notified by the Receiver that the Originator and Receiver have a relationship and an authorization to debit exists, but there is an error or defect in the payment such that the entry does not conform to the terms of the authorization. |
| R12 | Branch sold to another DFI | A financial institution received an Entry to an account that was sold to another financial institution maintained at a branch sold to another financial institution. |
| R13 | Invalid ACH routing number | Entry contains an invalid ACH routing number. |
| R14 | Representment payee deceased or unable to continue in that capacity | Representative payee is deceased or unable to continue in that capacity. The beneficiary is not deceased. |
| R15 | Beneficiary of account holder deceased | Either the beneficiary or account holder is deceased. |
| R16 | Account Frozen/Entry Returned Per OFAC Instruction | (1) Access to the account is restricted due to specific action taken by the RDFI or by legal action; or (2) OFAC has instructed the RDFI or Gateway to return the Entry. |
| R17 | File record edit criteria/Entry with invalid account number initiated under questionable circumstances | (1) Field(s) cannot be processed by RDFI; or (2) the Entry contains an invalid DFI Account Number (account closed / no account / unable to locate account / invalid account number) and is believed by the RDFI to have been initiated under questionable circumstances. |
| R18 | Improper effective entry date | (1) The Effective Entry Date for a credit Entry is more than two Banking Days after the processing date; or (2) the Effective Entry Date for a debit Entry is more than one Banking Day after the processing date. |
| R19 | Amount field error | Improper formatting of the amount field, or the allowed amounts of the SEC code used does not match the dollar value of the entry. |
| R20 | Non-transaction account | Policies or regulations (such as Regulation D) prohibit or limit activity to the receiving account based on its type. |
| R21 | Invalid company identification | The company ID information is not valid. |
| R22 | Invalid individual ID number | The recipient has indicated to the RDFI that the number with which the Originator was identified is not correct. |
| R23 | Credit entry refused by receiver | Any credit entry that is refused by the recipient may be returned by the RDFI. |
| R24 | Duplicate entry | RDFI has received what appears to be a duplicate entry. |
| R25 | Addenda error | Improper formatting of the addenda record information. |
| R26 | Mandatory field error | Erroneous data or missing data in a mandatory field. |
| R27 | Trace number error | Original entry trace number is not valid for return entry; or addenda trace numbers do not correspond with entry detail record. |
| R28 | Routing number check digit error | The check digit for a routing number is not valid. |
| R29 | Corporate customer advises not authorized | RDFI has been notified by business account holder that a specific transaction is unauthorized. |
| R30 | RDFI not participant in check truncation program | Financial institution not participating in automated check safekeeping application. |
| R31 | Permissible return entry | The RDFI may return a CCD or CTX entry that the ODFI agrees to accept. |
| R32 | RDFI nonsettlement | RDFI is not able to settle the entry. |
Early ACH Posting Testing ACH