# ACH Transaction

The **ACH Transactions API** allows you to create and manage the ACH payment transactions.

Use this API to validate bank account details, process credit and debit transactions, handle reversals, and retrieve transaction information.

### Usage workflow

The following steps help you understand ACH transaction flow:

1. **Validate account (optional)**

Validate the customer’s bank account before processing the transaction. This validation confirms that the bank account exists but does not guarantee available funds.

2. **Submit ACH transaction**

Create an ACH transaction using the appropriate endpoint. The successful response returns the unique transaction ID and initial status of **Pending**.

{% hint style="info" %}
You can also include additional business details, such as invoice or purchase order number, customer’s billing and shipping information, to support your processes.
{% endhint %}

3. **Check transaction status**

You can retrieve the transaction details using the transaction ID for status updates.

4. **Returned transactions**

Returned transactions include:

* `trace-number`
* `returned-date`
* `returned-code`
* `returned-message`

{% hint style="info" %}
Example:

* "trace-number": "104000017630448",
* "returned-date": "2017-07-10",
* "returned-code": "R01",
* "returned-message": "Insufficient Funds"
  {% endhint %}

5. **Settled transactions**

Settled transactions include:

* `trace-number`
* `settled-date`

{% hint style="info" %}
Example:

* "trace-number": "104000017106643",
* "settled-date": "2017-07-27"
  {% endhint %}

### ACH transaction statuses

The following table shows the ACH transaction statuses:

<details>

<summary>Statuses</summary>

<table data-full-width="true"><thead><tr><th width="236.4000244140625">Status</th><th>Description</th></tr></thead><tbody><tr><td><code>PENDING</code></td><td>This status indicates that the transaction has been created and accepted by the system but has not yet begun processing.</td></tr><tr><td><code>SETTLED</code></td><td>This status indicates that the transaction has completed successfully.</td></tr><tr><td><code>SETTLING</code></td><td>This status indicates that the transaction is currently being processed by the ACH network.</td></tr><tr><td><code>RETURNED</code></td><td>This status indicates that the transaction was processed but later returned.</td></tr><tr><td><code>VOID</code></td><td>This status indicates that the transaction was intentionally canceled before settlement.</td></tr><tr><td><code>CHARGEBACK</code></td><td>This status indicates that the transaction was reversed after settlement due to a dispute initiated by the account holder or their bank.</td></tr><tr><td><code>MERCHANT_RETURNED</code></td><td>This status indicates that the merchant returned the transaction after settlement.</td></tr><tr><td><code>NO CREDIT</code></td><td>This status indicates that the transaction was processed, but the receiving account was not credited.</td></tr><tr><td><code>TO RESERVE</code></td><td>This status indicates that the transaction amount has been moved to a reserve balance.</td></tr><tr><td><code>UNPROCESSED</code></td><td>This status indicates that the transaction has not entered processing.</td></tr><tr><td><code>ERROR</code></td><td>This status indicates that the transaction failed due to a system or processing error.</td></tr><tr><td><code>REJECTED: AUTHORIZATION DECLINED</code></td><td>This status indicates that the transaction was rejected because the account holder did not authorize the debit or credit.</td></tr><tr><td><code>REJECTED: ACCOUNT IS INVALID</code></td><td>This status indicates that the transaction was rejected because the bank account information is invalid.</td></tr><tr><td><code>REJECTED: VOIDED</code></td><td>This status indicates that the transaction was rejected because it had already been voided.</td></tr><tr><td><code>REJECTED: VOIDING</code></td><td>This status indicates that the transaction was rejected because it was in the process of being voided.</td></tr><tr><td><code>UPDATED</code></td><td>This status indicates that the transaction details were changed after the transaction was created.</td></tr></tbody></table>

</details>

{% hint style="info" %}
The status of the ACH transaction initially appears as `PENDING`. The status changes from `SETTLING` to `SETTLED` when the ACH transaction is processed successfully.
{% endhint %}

{% hint style="success" %}
Use webhooks to retrieve ACH transaction statuses. For more information, see [ACH Transaction Status Webhooks](https://docs.xplorpay.com/api-reference/webhooks/working-with-webhooks/ach-transaction-status-webhooks).
{% endhint %}

### ACH transaction return codes

The following table shows the codes returned by the receiving bank for ACH transactions:

<details>

<summary>Return codes</summary>

<table><thead><tr><th width="99">Code</th><th width="231.33331298828125" valign="top">Message</th><th valign="top">Description</th></tr></thead><tbody><tr><td><code>R02</code></td><td valign="top">Account closed. </td><td valign="top">A previously open account is now closed.</td></tr><tr><td><code>R03</code></td><td valign="top">No account or unable to locate account.</td><td valign="top">The account number does not correspond to the individual identified in the entry or a valid account.</td></tr><tr><td><code>R04</code></td><td valign="top">Invalid account number.</td><td valign="top">The account number fails the check digit validation or may contain an incorrect number of digits.</td></tr><tr><td><code>R05</code></td><td valign="top">Unauthorized debit to consumer account.</td><td valign="top">A business debit entry was transmitted to a members consumer account, and the member had not authorized the entry.</td></tr><tr><td><code>R06</code></td><td valign="top">Returned per ODFI’s request.</td><td valign="top">The ODFI has requested that the RDFI return the entry.</td></tr><tr><td><code>R07</code></td><td valign="top">Authorization revoked by customer.</td><td valign="top">The member who previously authorized an entry has revoked authorization with the Originator.</td></tr><tr><td><code>R08</code></td><td valign="top">Payment stopped or stop payment on item.</td><td valign="top">The member had previously requested a stop payment of a single or recurring entry.</td></tr><tr><td><code>R09</code></td><td valign="top">Uncollected funds.</td><td valign="top">Available balance is sufficient, but collected balance is not sufficient to cover the entry.</td></tr><tr><td><code>R10</code></td><td valign="top">Customer advises not authorized.</td><td valign="top">The member advises not authorized, notice not provided, improper source document, or amount of entry not accurately obtained from source document.</td></tr><tr><td><code>R11</code></td><td valign="top">Check truncation entry return.</td><td valign="top">To be used when returning a check truncation entry.</td></tr><tr><td><code>R12</code></td><td valign="top">Branch sold to another DFI.</td><td valign="top">RDFI unable to post entry destined for a bank account maintained at a branch sold to another financial institution.</td></tr><tr><td><code>R13</code></td><td valign="top">Invalid ACH routing number. </td><td valign="top">The financial institution does not receive commercial ACH entries.</td></tr><tr><td><code>R14</code></td><td valign="top">Representment payee deceased or unable to continue in that capacity.</td><td valign="top">The representative payee is deceased or unable to continue in that capacity, beneficiary is not deceased.</td></tr><tr><td><code>R15</code></td><td valign="top">Beneficiary of account holder deceased.</td><td valign="top">The beneficiary or account Holder Deceased.</td></tr><tr><td><code>R16</code></td><td valign="top">Account frozen.</td><td valign="top">Access to account is restricted due to specific action taken by the RDFI or by legal action.</td></tr><tr><td><code>R17</code></td><td valign="top">File record edit criteria.</td><td valign="top">Fields rejected by RDFI processing (identified in return addenda).</td></tr><tr><td><code>R18</code></td><td valign="top">Improper effective entry date.</td><td valign="top">Entries have been presented prior to the first available processing window for the effective date.</td></tr><tr><td><code>R19</code></td><td valign="top">Amount field error. </td><td valign="top">Improper formatting of the amount field.</td></tr><tr><td><code>R20</code></td><td valign="top">Non transaction account.</td><td valign="top">Policies or regulations (such as Regulation D) prohibit or limit activity to the account indicated.</td></tr><tr><td><code>R21</code></td><td valign="top">Invalid company identification.</td><td valign="top">The company ID information not valid (normally CIE entries).</td></tr><tr><td><code>R22</code></td><td valign="top">Invalid individual ID number.</td><td valign="top">The individual id used by receiver is incorrect (CIE entries).</td></tr><tr><td><code>R23</code></td><td valign="top">Credit entry refused by receiver.</td><td valign="top">Receiver returned entry because minimum or exact amount not remitted, bank account is subject to litigation, or payment represents an overpayment, originator is not known to receiver or receiver has not authorized this credit entry to this bank account.</td></tr><tr><td><code>R24</code></td><td valign="top">Duplicate entry.</td><td valign="top">RDFI has received a duplicate entry.</td></tr><tr><td><code>R25</code></td><td valign="top">Addenda error.</td><td valign="top">Improper formatting of the addenda records information.</td></tr><tr><td><code>R26</code></td><td valign="top">Mandatory field error.</td><td valign="top">Improper information in one of the mandatory fields.</td></tr><tr><td><code>R27</code></td><td valign="top">Trace number error.</td><td valign="top">Original entry trace number is not valid for return entry; or addenda trace numbers do not correspond with entry detail record.</td></tr><tr><td><code>R28</code></td><td valign="top">Routing number or check digit error.</td><td valign="top">Check digit for the transit routing number is incorrect.</td></tr><tr><td><code>R29</code></td><td valign="top">Corporate customer advises not authorized.</td><td valign="top">RDFI has been notified by business account holder that a specific transaction is unauthorized.</td></tr><tr><td><code>R30</code></td><td valign="top">RDFI not participant in check truncation program.</td><td valign="top">The financial institution not participating in automated check safekeeping application.</td></tr><tr><td><code>R31</code></td><td valign="top">Permissible return entry.</td><td valign="top">RDFI has been notified by business account holder that a specific transaction is unauthorized.</td></tr><tr><td><code>R32</code></td><td valign="top">RDFI non settlement.</td><td valign="top">RDFI is not able to settle the entry.</td></tr><tr><td><code>R33</code></td><td valign="top">Return of XCK entry.</td><td valign="top">RDFI determines at its sole discretion to return an XCK entry; an XCK return entry may be initiated by midnight of the sixtieth day following the settlement date if the XCK entry.</td></tr><tr><td><code>R34</code></td><td valign="top">Limited participation DFI.</td><td valign="top">RDFI participation has been limited by a federal or state supervisor.</td></tr><tr><td><code>R35</code></td><td valign="top">Return of improper debit entry.</td><td valign="top">ACH debit not permitted for use with the CIE standard entry class code (except for reversals).</td></tr><tr><td><code>R36</code></td><td valign="top">Return of improper credit entry.</td><td valign="top">None</td></tr><tr><td><code>R37</code></td><td valign="top">Source Document Presented for Payment Check used for an ARC, BOC or POP entry has also been presented for payment.</td><td valign="top">None</td></tr><tr><td><code>R38</code></td><td valign="top">Stop payment on source document.</td><td valign="top">Stop payment has been placed on a check used for an ARC entry.</td></tr><tr><td><code>R40</code></td><td valign="top">Return of ENR entry by federal government agency (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R41</code></td><td valign="top">Invalid transaction code (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R42</code></td><td valign="top">Routing number or check digit error (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R43</code></td><td valign="top">Invalid DFI account number (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R44</code></td><td valign="top">Invalid individual ID number (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R45</code></td><td valign="top">Invalid individual name/company name (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R46</code></td><td valign="top">Invalid representative payee indicator (ENR only).</td><td valign="top">None</td></tr><tr><td><code>R47</code></td><td valign="top">Duplicate enrollment.</td><td valign="top">None</td></tr><tr><td><code>R50</code></td><td valign="top">State law affecting RCK acceptance.</td><td valign="top">None</td></tr><tr><td><code>R51</code></td><td valign="top">Item is ineligible, notice not provided, signature not genuine.</td><td valign="top">None</td></tr><tr><td><code>R52</code></td><td valign="top">Stop payment on item.</td><td valign="top">None</td></tr><tr><td><code>R61</code></td><td valign="top">Misrouted return.</td><td valign="top">Return entry was sent by RDFI to an incorrect ODFI routing/transit number.</td></tr><tr><td><code>R62</code></td><td valign="top">Incorrect trace number.</td><td valign="top">None</td></tr><tr><td><code>R63</code></td><td valign="top">Incorrect dollar amount.</td><td valign="top">None</td></tr><tr><td><code>R64</code></td><td valign="top">Incorrect individual identification.</td><td valign="top">None</td></tr><tr><td><code>R65</code></td><td valign="top">Incorrect transaction code.</td><td valign="top">None</td></tr><tr><td><code>R66</code></td><td valign="top">Incorrect company identification.</td><td valign="top">None</td></tr><tr><td><code>R67</code></td><td valign="top">Duplicate return.</td><td valign="top">ODFI has received more than one return entry for the same original entry.</td></tr><tr><td><code>R68</code></td><td valign="top">Untimely return.</td><td valign="top">Return entry did not meet the return deadline.</td></tr><tr><td><code>R69</code></td><td valign="top">Multiple errors.</td><td valign="top">None</td></tr><tr><td><code>R70</code></td><td valign="top">Permissible return entry not accepted.</td><td valign="top">None</td></tr><tr><td><code>R71</code></td><td valign="top">Misrouted dishonored return.</td><td valign="top">None</td></tr><tr><td><code>R72</code></td><td valign="top">Untimely dishonored return.</td><td valign="top">None</td></tr><tr><td><code>R73</code></td><td valign="top">Timely original return.</td><td valign="top">None</td></tr><tr><td><code>R74</code></td><td valign="top">Corrected return.</td><td valign="top">None</td></tr><tr><td><code>R80</code></td><td valign="top">Cross-border payment coding error.</td><td valign="top">None</td></tr><tr><td><code>R81</code></td><td valign="top">Nonparticipant in cross-border program.</td><td valign="top">None</td></tr><tr><td><code>R82</code></td><td valign="top">Invalid foreign receiving DFI identification.</td><td valign="top">None</td></tr></tbody></table>

</details>

* [ACH Vault (Token)](/api-reference/api/payments/ach/ach-vault-token.md)
* [Webhooks](/api-reference/webhooks.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xplorpay.com/api-reference/api/payments/ach/ach-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
