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

# Initiate a bank transfer

> Initiate an ACH bank transfer to withdraw funds directly from a customer's bank account for one-time or recurring payments.

**What is it?** A bank transfer request initiates the process of withdrawing money directly from a customer's bank account. This can be used for both one-time payments and recurring transactions like subscriptions or bill payments.

<Tip type="when to use">
  **When to Use**

  <ul>
    <li>You want to accept payments directly from customers' bank accounts.</li>
    <li>You need to set up recurring payments or subscriptions with lower transaction fees than card payments.</li>
    <li>You want to offer customers an alternative payment method to credit/debit cards.</li>
  </ul>
</Tip>

<Callout icon="clapperboard-play" color="#6938EF" type="scenario">
  **Scenario**

  Ben sets up automatic recurring payments (\$150) for a monthly subscription to Maple Street Coffee, one of Clearpath Payment's acceptors, using his checking account ending in 5678. Clearpath Payments submits a request to initiate a bank transfer from Ben's bank account on behalf of Maple Street Coffee.
</Callout>

### Steps

1. Call the [initiateBankTransfer](/acquiring/reference/graphql/operations#initiate-bank-transfer) mutation, passing in the required and optional [input fields](/acquiring/reference/graphql/types/initiatebanktransferinput):

| Required input         | Description                                                                                                                                                                                             |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `acceptorId`           | The unique, 36 character identifier assigned to the entity providing the goods or services to the customer. Other processors may refer to this as the Merchant ID (MID), Outlet ID, or Customer number. |
| `transactionReference` | The unique transaction identifier created by YOU to distinguish this transaction from another.                                                                                                          |
| `paymentMethodDetails` | The bank account details or token to be used for the transfer.                                                                                                                                          |
| `amountDetails`        | The amount of the transfer and its currency (only USD supported).                                                                                                                                       |

### Payment method details

You can provide bank account details in one of two ways:

1. Direct bank account details:

   ```graphql lines theme={null}
   bankAccountDetails: {
     routingNumber: "123456789"
     accountNumber: "12345678"
     bankAccountType: CHECKING
     accountOwnerType: CONSUMER
     paymentEntryMode: ECOMMERCE
     recurringType: RECURRING
     nameOnAccount: "Goku Son"
   }
   ```

2. Using a previously tokenized bank account:

   ```graphql lines theme={null}
   acquirerTokenDetails: {
     token: "previously-generated-token"
   }
   ```

### Amount details

When specifying the amount:

* `amountDetails`:
  * `totalAmount`: The total amount of the transfer (e.g., 150.00)
  * `currency`: Currently only supports `USD`

### Bank account types

When providing direct bank account details, specify:

* `bankAccountType`:
  * `CHECKING`: A checking account for day-to-day transactions
  * `SAVINGS`: A savings account with potential withdrawal limitations

* `accountOwnerType`:
  * `CONSUMER`: Individual/personal accounts
  * `CORPORATE`: Business accounts

### Channel

For consumer interaction method, specify:

* `channel`:
  * `ECOMMERCE`: Customer interacts through online interface
  * `MAIL_ORDER_TELEPHONE_ORDER`: Customer interacts through mail, phone, or fax

### Entry modes

Indicates how the bank account information was collected:

* `paymentEntryMode`:
  * `KEYED`: Manually entered
  * `ON_FILE`: Retrieved from stored credentials

Note: For online (ECOMMERCE) or telephone entries, use the `channel` parameter with values `ECOMMERCE` or `MAIL_ORDER_TELEPHONE_ORDER` respectively.

### Recurring type

For payment frequency, specify:

* `recurringType`:
  * `SINGLE`: One-time payments with no future transactions expected
  * `RECURRING`: Subscription payments, recurring bills, or installment payments

<RequestExample>
  ```graphql Operation lines expandable theme={null}
  mutation InitiateBankTransfer($input: InitiateBankTransferInput!) {
    initiateBankTransfer(initiateBankTransferInput: $input) {
      bankTransferResponse {
        ... on BankTransferApproval {
          transactionId
          paymentId
          processorResponseCode
          isDuplicateRequest
        }
        ... on BankTransferDecline {
          message
          processorAdvice
          declineType
          transactionId
        }
      }
      errors {
        errorType: __typename
        ... on ValidationFailureError {
          message
          fieldPath
        }
        ... on RouteNotFoundError {
          message
        }
        ... on AcceptorNotFoundError {
          message
        }
      }
    }
  }
  ```

  ```json Variables lines theme={null}
  {
    "input": {
      "acceptorId": "05a39b14-f29f-443b-a107-da3e3e8969fb",
      "transactionReference": "68448abe-735b-4ee3-af14-d0f50a091c9b",
      "paymentMethodDetails": {
        "bankAccountDetails": {
          "routingNumber": "123456789",
          "accountNumber": "12345678",
          "bankAccountType": "CHECKING",
          "accountOwnerType": "CONSUMER",
          "paymentEntryMode": "ECOMMERCE",
          "recurringType": "RECURRING",
          "nameOnAccount": "Goku Son"
        }
      },
      "amountDetails": {
        "totalAmount": 150,
        "currency": "USD"
      },
      "channel": "ECOMMERCE",
      "billToAddress": {
        "firstName": "Goku",
        "lastName": "Son",
        "address1": "439 East District",
        "city": "Mount Paozu",
        "state": "IL",
        "postalCode": "62701",
        "countryCode": "USA"
      },
      "orderDetails": {
        "orderReference": "UTIL-123",
        "customerDetails": {
          "email": "goku@capsulecorp.com",
          "phoneNumber": "555-0123"
        }
      }
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json title="Response" lines theme={null}
  {
    "data": {
      "initiateBankTransfer": {
        "bankTransferResponse": {
          "transactionId": "f14f0a48-35c4-4e68-b2e3-e40f6d6160a8",
          "paymentId": "792282f2-d929-4dad-8c8a-9552c92154f1",
          "processorResponseCode": "A0000",
          "isDuplicateRequest": false
        }
      }
    }
  }
  ```
</ResponseExample>
