# Creates an ACH payment method

POST {{baseURL}}/pay-api/v1/customers/{{customerId}}/payment-methods/ach
This endpoint creates a payment method for EFT or ACH (automated clearing house) transactions.
The following is an example of the minimum call.The endpoint call, with a fictitious customerId:

```html
POST {{baseURL}}/pay-api/v1/customers/019d2135-be3f-7310-8e03-0bece14c231b/payment-methods/ach
```
The endpoint request body:

```json
{
  "paymentMethodId": "123456789",
  "routingNumber": "123123123",
  "accountType": 1,
  "accountHolderType": 1
}
```
The return value is the paymentMethodId (payment method identifier).

```json
{
  "id": "ecb05a38-990a-46fb-9a37-b0359164d918"
}
```
See Also:
To list a customer's payment methods, see GET /pay-api/v1/customers/{customerId}/payment-methods.
To create a card payment method for a customer, see POST /pay-api/v1/customers/{customerId}/payment-methods/cards.
To update a customer's payment method, see PUT /pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}.
To set a customer's default payment method, see PUT /pay-api/v1/customers/{customerId}/payment-methods/{paymentMethodId}/make-default.

Endpoint: POST /pay-api/v1/customers/{customerId}/payment-methods/ach
Version: V1
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer JWT

## Path parameters:

  - `customerId` (string, required)
    Specifies a single customer's identifier.

## Request fields (application/json):

  - `accountNumber` (string, required)
    Specifies the account number.

Example: 123456789
    Example: 123456789

  - `routingNumber` (string, required)
    Specifies the routing number.

Example: 123123123
    Example: 123123123

  - `accountType` (integer, required)
    Identifies the account type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Checking | Checking |
| 2 | Savings | Savings |

Example: 1
    Example: 1

  - `accountHolderType` (integer, required)
    Identifies the account holder type.
Possible values:
| Type ID | Account Type | Description |
|  --- | --- | --- |
| 1 | Business | Business |
| 2 | Personal | Personal |

Example: 1
    Example: 1

  - `name` (string)
    Specifies the payment method name.

This is a free-formed name that is convenient for the merchant to recognize.

Example: Peppared Street Cafe's Preferred Payment
    Example: Peppared Street Cafe's Preferred Payment

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

Example: 98-7654321
    Example: 98-7654321

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `id` (string)
    Indicates the payment method identifier.
This is also known the `paymentMethodId`.
Example: db02ec6c-2e5a-4b87-98a0-8dd881707d84
    Example: db02ec6c-2e5a-4b87-98a0-8dd881707d84

## Response 400:

  - `400` (unknown)
    Bad Request

## 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: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

  - `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

  - `errors` (object)
    Indicates the collection of validation errors, keyed by field name.
Example:
{ "Email": ["'Email' is not a valid email address."] }

## Response 404:

  - `404` (unknown)
    Resource not found

## Response 404 fields (application/json):

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

Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.
    Example: Entity with ID 'aa6cfcd0-0295-4a4c-b074-8c901f114fef' was not found.

  - `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: FluteOpsDeveloper.MSG322
    Example: FluteOpsDeveloper.MSG322

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

Example: System.Collections.Generic.KeyNotFoundException
    Example: System.Collections.Generic.KeyNotFoundException

  - `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 500:

  - `500` (unknown)
    Internal Error

## Response 500 fields (application/json):

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

Example: An unexpected error occurred while processing the request.
    Example: An unexpected error occurred while processing the request.

  - `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: System.Exception
    Example: System.Exception

  - `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

