> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# achReturns

> An itemized list of ach returns.

`Query`

## Arguments

<ParamField path="input" type="AchReturnsInput!" required>
  <Expandable title="child attributes">
    <ParamField path="paging" type="PagingInput!" required>
      See [PagingInput](/acquiring/reference/graphql/types/paging-input)
    </ParamField>

    <ParamField path="where" type="AchReturnFilterInput!" required>
      <Expandable title="child attributes">
        <ParamField path="acceptorId" type="GuidFilterInput">
          See [GuidFilterInput](/acquiring/reference/graphql/types/guid-filter-input)
        </ParamField>

        <ParamField path="activityDate" type="DateRangeFilterInput">
          See [DateRangeFilterInput](/acquiring/reference/graphql/types/date-range-filter-input)
        </ParamField>

        <ParamField path="id" type="GuidFilterInput">
          See [GuidFilterInput](/acquiring/reference/graphql/types/guid-filter-input)
        </ParamField>

        <ParamField path="paymentId" type="GuidFilterInput">
          See [GuidFilterInput](/acquiring/reference/graphql/types/guid-filter-input)
        </ParamField>

        <ParamField path="reasonCode" type="EnumFilterInputOfAchReturnCodeInput">
          <Expandable title="child attributes">
            <ParamField path="eq" type="AchReturnCode">
              See [AchReturnCode](/acquiring/reference/graphql/types/ach-return-code)
            </ParamField>

            <ParamField path="in" type="[AchReturnCode!]">
              See [AchReturnCode](/acquiring/reference/graphql/types/ach-return-code)
            </ParamField>

            <ParamField path="nin" type="[AchReturnCode!]">
              See [AchReturnCode](/acquiring/reference/graphql/types/ach-return-code)
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="transactionActivityDate" type="DateRangeFilterInput">
          See [DateRangeFilterInput](/acquiring/reference/graphql/types/date-range-filter-input)
        </ParamField>

        <ParamField path="transactionId" type="GuidFilterInput">
          See [GuidFilterInput](/acquiring/reference/graphql/types/guid-filter-input)
        </ParamField>

        <ParamField path="transactionReference" type="StringFilterInput">
          See [StringFilterInput](/acquiring/reference/graphql/types/string-filter-input)
        </ParamField>

        <ParamField path="transactionType" type="EnumFilterInputOfPaymentTransactionTypeInput">
          See [EnumFilterInputOfPaymentTransactionTypeInput](/acquiring/reference/graphql/types/enum-filter-input-of-payment-transaction-type-input)
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Return type

`AchReturnCollection`

<ResponseField name="items" type="[AchReturn!]!" required>
  <Expandable title="child attributes">
    <ResponseField name="acceptor" type="Acceptor!" required>
      See [Acceptor](/acquiring/reference/graphql/types/acceptor)
    </ResponseField>

    <ResponseField name="accountNumberEndingIn" type="String">
      The last few numbers of the bank account used as a visual reference to the full account numer.
    </ResponseField>

    <ResponseField name="accountOwnerName" type="String">
      The name of the bank account owner, as provided by the NACHA report.
    </ResponseField>

    <ResponseField name="accountOwnerType" type="AccountOwnerType">
      The type of the bank account owner, as provided by the NACHA report.

      See [AccountOwnerType](/acquiring/reference/graphql/types/account-owner-type)
    </ResponseField>

    <ResponseField name="accountType" type="BankAccountType">
      The type of the bank account, e.g., Checking or Savings.

      See [BankAccountType](/acquiring/reference/graphql/types/bank-account-type)
    </ResponseField>

    <ResponseField name="activityDate" type="Date!" required>
      The date Tesouro received the ach return.
    </ResponseField>

    <ResponseField name="amount" type="Decimal!" required>
      The amount of the ach return.
    </ResponseField>

    <ResponseField name="currency" type="String!" required>
      The currency specified on the ach return.
    </ResponseField>

    <ResponseField name="id" type="UUID!" required>
      A unique, 36 character identifier created by Tesouro and assigned to the ACH return.
    </ResponseField>

    <ResponseField name="organization" type="Organization!" required>
      See [Organization](/acquiring/reference/graphql/types/organization)
    </ResponseField>

    <ResponseField name="paymentId" type="UUID">
      A unique 36 character identifier created by Tesouro and assigned to a group of transactions in the same payment request cohort. e.g., An authorization request, incremental authorization request, and the final capture would have the same paymentID.
    </ResponseField>

    <ResponseField name="reason" type="String!" required>
      Description of return reason.
    </ResponseField>

    <ResponseField name="reasonCode" type="AchReturnCode!" required>
      Nacha Return Codes and associated ISO Status Reason Codes for returns and reversals from the External Code List.

      See [AchReturnCode](/acquiring/reference/graphql/types/ach-return-code)
    </ResponseField>

    <ResponseField name="routingNumber" type="String!" required>
      A unique nine-digit number that identifies a bank and is used for electronic transactions. It's also known as an ABA routing number, or routing transit number (RTN).
    </ResponseField>

    <ResponseField name="traceNumber" type="String!" required>
      A unique 15 digit reference number created by the bank and used to investigate and research ACH transfers and returns.
    </ResponseField>

    <ResponseField name="transactionActivityDate" type="Date">
      The date Tesouro recognized the original ACH payment request, based upon the acceptor cutoff. Formatted as YYYY-MM-DD
    </ResponseField>

    <ResponseField name="transactionAmount" type="Decimal!" required>
      The transaction amount submitted with the original ach request.
    </ResponseField>

    <ResponseField name="transactionDateTime" type="DateTime!" required>
      The date and time that Tesouro received the original ach transaction, in UTC. Formatted as 2024-03-27T02:40:00Z
    </ResponseField>

    <ResponseField name="transactionId" type="UUID!" required>
      A unique identifier assigned by Tesouro to the original ach transaction.
    </ResponseField>

    <ResponseField name="transactionReference" type="String">
      A unique identifier from original ach transaction created by the entity holding the direct relationship with the Acceptor. Tesouro uses this identifier to manage idempotency.
    </ResponseField>

    <ResponseField name="transactionTraceNumber" type="String!" required>
      A number that a bank can you to investigate and research an ach transaction.
    </ResponseField>

    <ResponseField name="transactionType" type="TransactionType!" required>
      The type of original ach transaction, e.g., Sale or Refund.

      See [TransactionType](/acquiring/reference/graphql/types/transaction-type)
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="pageInfo" type="PageInfo!" required>
  <Expandable title="child attributes">
    <ResponseField name="hasNextPage" type="Boolean!" required />

    <ResponseField name="hasPreviousPage" type="Boolean!" required />
  </Expandable>
</ResponseField>

<RequestExample>
  ```graphql Operation lines expandable theme={null}
  query AchReturns($input: AchReturnsInput!) {
    achReturns(input: $input) {
      items {
        acceptor {
          businessName
          id
          name
          reference
        }
        accountNumberEndingIn
        accountOwnerName
        accountOwnerType
        accountType
        activityDate
        amount
        currency
        id
        organization {
          achReturns
          businessName
          capabilities
          id
          legalName
          name
          phoneNumber
        }
        paymentId
        reason
        reasonCode
        routingNumber
        traceNumber
        transactionActivityDate
        transactionAmount
        transactionDateTime
        transactionId
        transactionReference
        transactionTraceNumber
        transactionType
      }
      pageInfo {
        hasNextPage
        hasPreviousPage
      }
    }
  }
  ```

  ```json Variables lines expandable theme={null}
  {
    "input": {
      "paging": {
        "skip": 0,
        "take": 0
      },
      "where": {
        "acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
        "activityDate": "example",
        "id": "example"
      }
    }
  }
  ```

  ```bash cURL lines expandable theme={null}
  curl --request POST \
    --url https://api.sandbox.com/graphql \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Bearer <YOUR_ACCESS_TOKEN>' \
    --data '{
    "query": "query AchReturns($input: AchReturnsInput!) {\n  achReturns(input: $input) {\n    items {\n      acceptor {\n        businessName\n        id\n        name\n        reference\n      }\n      accountNumberEndingIn\n      accountOwnerName\n      accountOwnerType\n      accountType\n      activityDate\n      amount\n      currency\n      id\n      organization {\n        achReturns\n        businessName\n        capabilities\n        id\n        legalName\n        name\n        phoneNumber\n      }\n      paymentId\n      reason\n      reasonCode\n      routingNumber\n      traceNumber\n      transactionActivityDate\n      transactionAmount\n      transactionDateTime\n      transactionId\n      transactionReference\n      transactionTraceNumber\n      transactionType\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n    }\n  }\n}",
    "variables": {
      "input": {
        "paging": {
          "skip": 0,
          "take": 0
        },
        "where": {
          "acceptorId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
          "activityDate": "example",
          "id": "example"
        }
      }
    }
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response lines expandable theme={null}
  {
    "data": {
      "achReturns": {
        "items": [
          {
            "acceptor": {
              "allocations": "example",
              "authorizationSummaries": "example",
              "billingDescriptor": "CLACKSWORTH KEYBOARDS",
              "businessName": "Clacksworth Keyboards",
              "fees": "example",
              "feeSummaries": "example",
              "fundingAchReturns": "example",
              "fundingDisputeEvents": "example",
              "fundingSummaries": "example",
              "fundingTransactions": "example",
              "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
              "name": "Ben Torres",
              "paymentTransactions": "example",
              "paymentTransactionSummaries": "example",
              "reference": "example"
            },
            "accountNumberEndingIn": "example",
            "accountOwnerName": "example",
            "accountOwnerType": "CONSUMER",
            "accountType": "CHECKING",
            "activityDate": "2026-01-15",
            "amount": 0,
            "currency": "example",
            "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
            "organization": {
              "acceptorApplicationCounts": [
                "example"
              ],
              "acceptors": "example",
              "achNotificationsOfChange": "example",
              "achReturns": "example",
              "allocations": "example",
              "allowedMerchantCategories": [
                "example"
              ],
              "authorizationSummaries": "example",
              "businessAddress": "example",
              "businessName": "Clacksworth Keyboards",
              "capabilities": [
                "ACQUIRING"
              ],
              "fees": "example",
              "feeSummaries": "example",
              "fundingAchReturns": "example",
              "fundingDisbursementReturns": "example",
              "fundingDisputeEvents": "example",
              "fundingSummaries": "example",
              "fundingTransactions": "example",
              "id": "c9a1e2d3-4b5f-6789-0abc-def123456789",
              "legalName": "example",
              "name": "Ben Torres",
              "paymentTransactions": "example",
              "paymentTransactionSummaries": "example",
              "phoneNumber": "example",
              "reportAvailability": [
                "example"
              ],
              "settings": "example"
            },
            "paymentId": "d8b2f3e4-5c6a-7890-1bcd-ef2345678901",
            "reason": "example",
            "reasonCode": "R01",
            "routingNumber": "example",
            "traceNumber": "example",
            "transactionActivityDate": "2026-01-15",
            "transactionAmount": 0,
            "transactionDateTime": "2026-01-15T14:30:00Z",
            "transactionId": "e7c3a4b5-6d7e-8901-2cde-f34567890123",
            "transactionReference": "example",
            "transactionTraceNumber": "example",
            "transactionType": "AUTHORIZATION"
          }
        ],
        "pageInfo": {
          "hasNextPage": true,
          "hasPreviousPage": true
        }
      }
    }
  }
  ```
</ResponseExample>
