# Create an ACH vendor payment

Sends a one-time USD ACH transfer from a checking account of the
business to a saved bank account of a counterparty. The bank account is
a `payment_methods` entry with `type` `ach` from
listAccountsPayableCounterparties; the counterparty's default is not
used.
Send an `Idempotency-Key` header and reuse it on every retry. Over
REST, the first request with a key sends the transfer and returns
`201`; a repeated key returns `409` without sending it again. A `503`
with `Retry-After` means the transfer may still have been accepted:
retry with the same key after the delay.
Through MCP, every transfer requires approval in the Rho app, and only
the user who connected the app, or the creator of the API Access Token,
can approve it. The approval link (`action_url`) expires after 15
minutes (`expires_at`), and the transfer is sent when the user approves
it. A repeat with the same arguments and key after the transfer was
sent returns the same result, and a key reused with different
arguments returns `409`. A request that was denied or expired is not
sent, and repeating it returns `409`.
Over REST, the transfer is sent on behalf of the creator of the API
Access Token, or the user who authorized the OAuth app. Through MCP,
it's sent on behalf of the user who approves it. That user needs
permission to make transfers in Rho. An accepted
transfer can still wait for the company's approval rules
(`approval_status`), and the bank transfer settles afterwards
(`transaction_status`).

Endpoint: POST /ap/payments
Version: 1.0.0
Security: AccessToken

## Security:

  - `AccessToken` (unknown)
    oauth2 scopes: accounts_payable:payments:write

## Header parameters:

  - `Idempotency-Key` (string, required)
    A unique key of 1 to 255 printable ASCII characters, generated once per
intended action and reused on every retry. UUID v4 is recommended.
Keys are case-sensitive. Surrounding spaces are ignored.

## Request fields (application/json):

  - `type` (string, required)
    Enum: "ach"

  - `source_account_id` (string, required)
    Checking account of the authenticated business, from GET /accounts.

  - `counterparty_id` (string, required)
    Counterparty of the authenticated business, from GET /ap/counterparties.

  - `payment_method_id` (string, required)
    Explicitly selected saved ACH payment method of this vendor.

  - `amount` (object, required)
    Positive USD amount in cents.

  - `amount.amount` (integer, required)

  - `amount.currency` (string, required)

  - `purpose` (string, required)
    Enum: "payroll", "contractor", "invoice", "reimbursement", "other"

  - `memo` (string)
    Optional payment memo. A blank or whitespace-only memo is omitted.

## Response 201:

  - `201` (unknown)
    Payment accepted, subject to company approvals. This does not mean paid.

## Response 201 fields (application/json):

  - `success` (boolean, required)

  - `payment_id` (string, required)

  - `approval_status` (string, required)
    Enum: "pending", "approved", "not_required", "denied"

  - `transaction_status` (string, required)
    Latest known status of the bank transfer when the payment was
accepted. It is a snapshot and can change afterwards.
    Enum: "pending", "settled", "failed", "awaiting_approval"

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 404:

  - `404` (unknown)
    Not found

## Response 404 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 409:

  - `409` (unknown)
    The Idempotency-Key was already used

## Response 409 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 413:

  - `413` (unknown)
    Request body exceeded the 1 MiB limit

## Response 413 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 422:

  - `422` (unknown)
    The request is valid but cannot be carried out

## Response 422 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 429:

  - `429` (unknown)
    Request rejected because a Rho API rate limit was exceeded

## Response 429 headers:

  - `Retry-After` (integer, required)
    Suggested delay in seconds before retrying. A positive value should
be honored. A value of zero means that no fixed cooldown has been
applied and does not guarantee that an immediate retry will succeed.
If the header is zero, use exponential backoff with jitter.

## Response 500:

  - `500` (unknown)
    Internal server error

## Response 500 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 503:

  - `503` (unknown)
    Accounts Payable is temporarily unavailable, or the payment did not
finish in time. When `Retry-After` is present the payment may still
have been accepted: retry with the same `Idempotency-Key` after the
delay. A `409 Conflict` then means the key is in use.

## Response 503 fields (application/problem+json):

  - `type` (string, required)
    A URI reference that identifies the problem type.
    Example: about:blank

  - `title` (string, required)
    A short, human-readable summary of the problem type.

  - `status` (integer, required)
    The HTTP status code.

  - `detail` (string)
    A human-readable explanation specific to this occurrence of the problem.

## Response 503 headers (application/problem+json):

  - `Retry-After` (integer)
    Suggested delay in seconds before retrying with the same
`Idempotency-Key`.

