> ## 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.

# Overview

> ACH transfers originated outside of the Treasury Prime platform are referred to as “incoming” or “externally originated” ACH transfers as they are originated by a third party.

We support the acceptance of both ACH credits and debits to accounts on the Treasury Prime platform and can manage both standard and sameday levels of service.

## Managing Incoming ACH Transfers

For incoming ACH transfers originated by third parties, an associated [ACH object](/reference/ach) is not created. Instead, an [Incoming ACH object](/reference/incoming-ach) is created for ledger accounts, and the resulting funds movement posts to the recipient's account as a [Transaction](/reference/get_transaction).

For information on returning incoming ACH transfers, see the [Returning Incoming ACH](/docs/returning-incoming-ach) guide.

## Example: Incoming ACH Credit

In this example, a third party sends an ACH credit for \$100 from their account at Capital One to an account on the Treasury Prime platform. The basic flow is as follows:

1. The ACH originates at Capital One, the Originating Depository Financial Institution (ODFI)
2. The ACH is processed through the ACH network
3. The ACH is then received by the Treasury Prime partner bank, the Receiving Depository Financial Institution (RDFI)
4. Lastly, the ACH posts to the recipient's account as a `deposit` transaction

Below you can see the transaction created from that incoming ACH credit. Note that the `type` field of the transaction object has a value of `deposit` as this is a credit to the account. For ACH debits, this would have a value of `withdrawal`.

##### Example Transaction Object Corresponding to the Incoming ACH Credit

<CodeGroup>
  ```bash bash theme={null}
  {
    "ach_id": null,
    "amount": "100.00",
    "balance": "150.00",
    "billpay_payment_id": null,
    "book_id": null,
    "check_id": null,
    "check_number": null,
    "date": "2021-11-21",
    "desc": "INCOMING ACH CREDIT CAPITAL ONE [091000011234567][PPD]",
    "extended_timestamp": "2021-11-21T11:45:16Z",
    "extended_timestamp_precise": "2021-11-21T11:45:16.321Z",
    "fingerprint": "ttx_11gyn76cj1234b",
    "id": "ttx_11gyn76cj1234b",
    "incoming_wire": null,
    "issued_check_id": null,
    "summary": null,
    "trace_id": null,
    "type": "deposit",
    "type_source": null,
    "wire": null,
    "wire_id": null
  }
  ```
</CodeGroup>

## Example: Incoming ACH Debit

In this example, a third party sends an ACH debit requesting \$100 from an account on the Treasury Prime platform to their account at Capital One.

1. The ACH originates at the ODFI (Capital One)
2. The ACH is then processed through the ACH network
3. The ACH is received by the RDFI
4. Lastly, the ACH posts to the recipient's account as a `withdrawal` [transaction](/reference/get_transaction) (shown below)

##### Example Transaction Object Corresponding to the Incoming ACH Debit

<CodeGroup>
  ```bash bash theme={null}
  {
    "ach_id": null,
    "amount": "-100.00",
    "balance": "200.00",
    "billpay_payment_id": null,
    "book_id": null,
    "check_id": null,
    "check_number": null,
    "date": "2021-07-20",
    "desc": "INCOMING ACH DEBIT CAPITAL ONE [09100001122233][POS]",
    "extended_timestamp": "2021-07-20T11:45:13Z",
    "extended_timestamp_precise": "2021-07-20T11:45:13.794Z",
    "fingerprint": "ttx_11gyjjt9j1234a",
    "id": "ttx_11gyjjt9j1234a",
    "incoming_wire": null,
    "issued_check_id": null,
    "summary": null,
    "trace_id": null,
    "type": "withdrawal",
    "type_source": null,
    "wire": null,
    "wire_id": null
  }
  ```
</CodeGroup>

## Webhooks for Incoming ACH Transfers

### Webhooks for Incoming ACHs with Ledger Account Recipient

Incoming ACHs landing at ledger accounts will trigger the `incoming_ach.create` [webhook](/reference/webhook) which fires when new incoming ACH objects are created.

##### Example `incoming_ach.create` Webhook Notification

<CodeGroup>
  ```bash bash theme={null}
  {
    "event": "incoming_ach.create",
    "op": "create",
    "url": "https://api.treasuryprime.com/incoming_ach/inach_1234567890abcde",
    "id": "inach_1234567890abcde"
  }
  ```
</CodeGroup>

Please note that this webhook will only work with ledger accounts. For webhooks on inbound ACHs against core accounts, see below.

### Webhooks for Incoming ACHs with Core Account Recipient

A successful incoming ACH transfer results in a new transaction on the recipient's account. Knowing this, you can monitor incoming ACH transfers by subscribing to the `account.update` [webhook](/reference/webhook), which fires any time a new transaction is created on an account.

##### Example `account.update` Webhook Notification

<CodeGroup>
  ```bash bash theme={null}
  {
    "event": "account.update",
    "op": "update",
    "url": "https://api.treasuryprime.com/account/acct_11her5nvc012ab",
    "id": "acct_11her5nvc012ab"
  }
  ```
</CodeGroup>

A second webhook `transaction.create` may also be used to receive updates when new transactions are created; however, this webhook (and the associated [Transaction object](/reference/get_transaction)) do not contain any information to identify the account that the transaction belongs to. So this will likely be most useful in circumstances where you are interested in identifying all new transactions as they are created, but do not need to know the account to which that transaction belongs.

##### Example `transaction.create` Webhook Notification

<CodeGroup>
  ```bash bash theme={null}
  {
    "event": "transaction.create",
    "op": "create",
    "url": "https://api.treasuryprime.com/transaction/ttx_11hqfx7xejabcd",
    "id": "ttx_11hqfx7xejabcd"
  }
  ```
</CodeGroup>

## Identifying Incoming ACH Transfers

As outlined above, a successful incoming ACH transfer will result in a transaction being on the recipient's account. However, other funds movements (such as book transfers, and wires) also result in the same outcome. To identify which transactions occurred as a result of an incoming ACH we can look at the `desc` field of the Transaction object. As shown below, this field will usually contain a value starting with “INCOMING ACH” followed by the direction of the ACH (credit or debit) and the original description included with the ACH if available.

##### Example `desc` Value for an Inbound ACH Credit

<CodeGroup>
  ```bash bash theme={null}
  "desc": "INCOMING ACH CREDIT PAYPAL [091000015555123][PPD]"
  ```
</CodeGroup>

##### Example `desc` Value for an Inbound ACH Debit

<CodeGroup>
  ```bash bash theme={null}
  "desc": "INCOMING ACH DEBIT TARGET DEBIT CRD [09100001122233][POS]"
  ```
</CodeGroup>
