# Creates an ACH debit payment

<span class="api-endpoint">POST {{<a href="#urlbases">baseURL</a>}}/pay-api/v1/transactions/ach/payment</span>
This endpoint creates an ACH (automated clearing house) transaction to transfer funds from the customer to the merchant.
It specifically transfers money from the customer's bank account to the merchant's account.
<details>
<summary>The following is an example of the minimum call.</summary>
The endpoint call:

```html
POST {{baseURL}}/pay-api/v1/transactions/ach/payment
```
The endpoint request body:

```json
{
  "paymentProcessorId": "7a913ba9-724b-4020-8ef1-d3375291f59e",
  "RequesterIpAddress": "2001:0db8:85a3:0000:0000:8a2e:0370:7334",
  "amount": 54.87,
  "secCode": 1,
  "accountHolderType": 1,
  "accountNumber": "123456789",
  "routingNumber": "123123123",
  "accountType": 1,
  "billingAddress": 
  {
      "city": "New York",
      "countryId": 1,
      "line1": "1234 Hudson Avenue",
      "postalCode": "10001",
      "stateName": "New York",
      "stateId": 25
  },
  "contactInfo": 
  {
      "firstName": "Alex",
      "lastName": "Morgan",
      "companyName": "Positive",
      "email": "a.morgan@example.com",
      "mobilePhoneNumber": '+14155554618'
  }
}
```
</details>
<span class="api-seealso">See Also:</span><br>
To create an ACH credit transaction, see `GET /pay-api/v1/transactions/ach/payment/credit`

Endpoint: POST /pay-api/v1/transactions/ach/payment
Version: V1
Security: Bearer

## Request fields (application/json):

  - `amount` (number, required)
    Specifies the payment amount.

Example: 129.99
    Example: 129.99

  - `paymentProcessorId` (string, required)
    Specifies the ACHQ (ACH check) payment processor identifier.

Example: f4e41489-aea6-4279-b6f1-e1f9bffd5358
    Example: f4e41489-aea6-4279-b6f1-e1f9bffd5358

  - `secCode` (integer, required)
    Specifies the SEC (standard entry class) code for the payment method.
Allowed values:
| Type ID | Entry Type | Description |
|  --- | --- | --- |
| 1 | Web | Internet-initiated/mobile entries. Default value. |
| 2 | PPD | Prearranged payment and deposit entries. |
| 3 | CCD | Corporate credit or debit. |
| 4 | Telephone | Telephone-initiated entries. |

Example: 1
    Example: 1

  - `requesterIPaddress` (string, required)
    Specifies the IP address of the end user.
This is an IPv4 or IPv6 address.
This may be the customer, operator, or application responsible for submitting the transaction.
Examples:
192.168.1.1
2001:0db8:85a3:0000:0000:8a2e:0370:7334
    Example: 192.168.1.1

  - `paymentMethodId` (string)
    Specifies the customer payment method identifier.

Providing this value indicates the transaction uses a stored bank account.
If this value is included, `customerId` must also be included.
Example: b6df8625-cd25-4123-b345-638aa7b5d011
    Example: b6df8625-cd25-4123-b345-638aa7b5d011

  - `customerId` (string)
    Specifies the customer identifier.

Providing this value indicates the transaction uses a stored bank account.
This value is required if `paymentMethodId` is provided.

Providing this value without also providing `paymentMethodId` indicates the transaction does not use a stored bank account.
In this case, a new customer will automatically be generated.
Example: 87d8e330-2878-4742-a86f-dbbb3bf522ac
    Example: 87d8e330-2878-4742-a86f-dbbb3bf522ac

  - `accountNumber` (string)
    Specifies the payment target's bank account number.
We recommend using `paymentMethodId` instead of `accountNumber`.
Example: 5413591081013511
    Example: 5413591081013511

  - `routingNumber` (string)
    Specifies the payment target's bank routing number.

Example: 026009593
    Example: 026009593

  - `accountType` (integer)
    Identifies the account type.

This value is required when the transaction is not using a stored bank account.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Checking | Checking |
| 2 | Savings | Savings |

Example: 1
    Example: 1

  - `accountHolderType` (integer)
    Identifies the account holder type.

This value is required when the transaction not using a stored bank account.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Business | Business |
| 2 | Personal | Personal |

Example: 1
    Example: 1

  - `contactInfo` (object)
    This object is required when the transaction is not using a stored bank account.

  - `contactInfo.companyName` (string, required)
    Indicates the name of the customer's company or organization.

Example: Peppared Street Cafe
    Example: Peppared Street Cafe

  - `contactInfo.firstName` (string)
    Indicates the customer's first name.

Example: Alexandro
    Example: Alexandro

  - `contactInfo.lastName` (string)
    Indicates the customer's last name.

Example: Peppared
    Example: Peppared

  - `contactInfo.email` (string)
    Indicates the customer's email.
Example: peppared@example.com
    Example: peppared@example.com

  - `contactInfo.mobilePhoneNumber` (string)
    Indicates the customer's mobile phone number.
Example: +15551234567
    Example: +15551234567

  - `contactInfo.smsNotification` (boolean)
    Specifies the customer is sent an SMS notification.
If `true`, the customer is sent an SMS notification.
If `false`, the customer is not sent an SMS notification.
Example: true
    Example: true

  - `billingAddress` (object)
    This object is required when the transaction is not using a stored bank account.

  - `billingAddress.city` (string, required)
    Specifies the name of the city.

Example: Chicago
    Example: Chicago

  - `billingAddress.countryId` (integer, required)
    Specifies the Flute country identifier.
Example: 1
    Example: 1

  - `billingAddress.line1` (string)
    Specifies the street address.

Example: 322 Unicorn Boulevard
    Example: 322 Unicorn Boulevard

  - `billingAddress.line2` (string)
    Specifies additional street address information.

Example: Apt. Block 6
    Example: Apt. Block 6

  - `billingAddress.postalCode` (string)
    Specifies the postal or ZIP code.
Examples:
60601
60601-0001
    Example: 60601-0001

  - `billingAddress.stateName` (string)
    Indicates the full state name.
Examples:
Texas
Washington
Illinois
    Example: Illinois

  - `billingAddress.stateId` (integer)
    Specifies the Flute US state or territory identifier code.
Example: 1
    Example: 1

  - `isFasterProcessing` (boolean)
    Specifies ACH (automated clearing house) transaction has same day processing enabled.
Must be empty or null for card subscriptions.
If `true`, same day processing is enabled.
If `false`, same day processing is not enabled.
Example: false
    Example: false

  - `taxId` (string)
    Specifies the customer's TIN (tax identifier).

Example: 98-7654321
    Example: 98-7654321

## Response 200 fields (application/json):

  - `transactionId` (string)
    Indicates the transaction identifier.

Example: bf5a1dc7-57b7-4fec-ab09-52c47c1acaff
    Example: bf5a1dc7-57b7-4fec-ab09-52c47c1acaff

  - `typeId` (integer)
    Indicates the Flute ACH (automated clearing house) transaction type code.
Example: 6
    Example: 6

  - `type` (string)
    Indicates the Flute ACH transaction type.
Example: CardAuthentication
    Example: CardAuthentication

  - `statusId` (integer)
    Indicates the Flute ACH transaction status code.
Example: 1
    Example: 1

  - `status` (string)
    Indicates the Flute ACH transaction status type.
Example: Authorized
    Example: Authorized

  - `responseDescription` (string)
    Indicates a free-formed description regarding the transaction.

Example: Command Successful. Approved.
    Example: Command Successful. Approved.

  - `responseCode` (string)
    Indicates a response code regarding the transaction.

Example: 000
    Example: 000

  - `processedAmount` (number)
    Indicates the transaction amount (in USD).

Example: 3500.00
    Example: 3500

## Response 400 fields (application/json):

  - `details` (string)
    Indicates details about the error.

Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error
    Example: Validation failed: -- Email: 'Email' is not a valid email address. Severity: Error

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)
    Indicates the source of the error.
Example: <Service>
    Example: <Service>

  - `exceptionType` (string)
    Indicates the error's exception type.

Example: FluentValidation.ValidationException
    Example: FluentValidation.ValidationException

  - `correlationId` (string)
    Indicates the correlation identifier.

Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef
    Example: aa6cfcd0-0295-4a4c-b074-8c901f114fef

  - `entityId` (string)
    Indicates the entity identifier.
Example:
null

  - `errorCode` (string)
    Indicates the error code.
Example:
null

## Response 404 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

## Response 500 fields (application/json):

  - `details` (string)

  - `statusCode` (integer)
    Specifies the HTTP response status code.
This is the HTTP status code returned by the attempted delivery.
The following is a list of HTTP response status codes that include but are not limited to:
| HTTP Status | Meaning |
|  --- | --- |
| 200 | Delivery succeeded |
| 400 | Bad request |
| 401 | Unauthorized |
| 404 | Endpoint not found |
| 429 | Rate limited |

Example: 401
    Example: 401

  - `source` (string)

  - `exceptionType` (string)

  - `correlationId` (string)

  - `entityId` (string)

  - `errorCode` (string)

