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

# Create payment

> Creates a payment (only ACH for now) from the calling company's Every account to one of its own vendors.

The payment is created awaiting approval by the company's signatory and is not sent to the
bank until that approval happens, exactly as a payment created in the Every dashboard.
Poll `GET /v1/payments/{id}` to follow it.

`idempotency_key` is required. Repeating a request with a key already used answers `409`
with the payment the first request created, so a retry can never send the money twice. Its
`status` is the payment's current one, so a repeat reports where the payment got to just as
`GET /v1/payments/{id}` does.




## OpenAPI

````yaml /api-reference/openapi.yaml post /v1/payments
openapi: 3.0.0
info:
  title: Every Public API
  version: 1.0.0
  description: >
    The Every public API. Keys are issued per company and every response is
    scoped to the company

    that owns the calling key.


    Every response carries an `x-request-id` header, generated by Every for that
    request. Quote it

    when contacting support: it is the id the request is recorded under. A
    caller-supplied

    `x-request-id` is never echoed.
servers:
  - url: https://api.public.every.io/company
    description: Production
security:
  - apiKey: []
tags:
  - name: Company
    description: The company the calling key belongs to.
  - name: Vendors
    description: The people and businesses the company pays, and their W9 details.
  - name: Bank accounts
    description: A vendor's accounts at its own bank, the accounts payments are paid into.
  - name: Payments
    description: >-
      ACH payments from the company's Every account to a vendor, and where they
      are.
  - name: Reference data
    description: The categories and departments a payment is filed under.
paths:
  /v1/payments:
    post:
      tags:
        - Payments
      summary: Create payment
      description: >
        Creates a payment (only ACH for now) from the calling company's Every
        account to one of its own vendors.


        The payment is created awaiting approval by the company's signatory and
        is not sent to the

        bank until that approval happens, exactly as a payment created in the
        Every dashboard.

        Poll `GET /v1/payments/{id}` to follow it.


        `idempotency_key` is required. Repeating a request with a key already
        used answers `409`

        with the payment the first request created, so a retry can never send
        the money twice. Its

        `status` is the payment's current one, so a repeat reports where the
        payment got to just as

        `GET /v1/payments/{id}` does.
      operationId: createPayment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePaymentRequest'
      responses:
        '201':
          description: The payment, awaiting approval
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedPayment'
        '400':
          description: >
            The request cannot produce a payment. Among the causes: an amount
            below $0.01, an amount

            with more than two decimal places, a `to_bank_account_id` that
            cannot receive an ACH

            payment, a company not yet enabled for API payments, an amount over
            the account's

            remaining ACH limit, or a missing `idempotency_key`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: No such vendor in the calling company
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >
            This `idempotency_key` has already been used, so no second payment
            was created. The body

            is the response the original request produced, with `status`
            refreshed to the payment's

            current one — or, while that request is still running or when it
            stopped without

            recording what it did, an error saying so.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/CreatedPayment'
                  - $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
        default:
          $ref: '#/components/responses/UnexpectedError'
components:
  schemas:
    CreatePaymentRequest:
      type: object
      additionalProperties: false
      required:
        - vendor_id
        - amount
        - idempotency_key
        - to_bank_account_id
        - memo
        - every_category_id
        - every_department_id
      properties:
        vendor_id:
          type: string
          format: uuid
          description: >-
            A vendor of the calling company, whose account named in
            `to_bank_account_id` receives the payment.
        amount:
          type: number
          minimum: 0.01
          description: >
            Amount in US dollars, at least 0.01 and to at most two decimal
            places. A more precise

            amount is refused rather than rounded, so that the payment sent
            matches the amount asked

            for.
        idempotency_key:
          type: string
          minLength: 1
          description: Caller-chosen key that makes a retry of this request safe.
        memo:
          type: string
          minLength: 1
          maxLength: 50
          description: >
            Description carried on the payment and shown under Transactions in
            the Every dashboard. It

            is also the description the bank puts on the ACH transfer, which is
            why it cannot be blank.
        to_bank_account_id:
          type: string
          format: uuid
          description: >-
            The vendor's bank account to pay into, from `GET
            /v1/vendors/{vendorId}/bank-accounts`. It must belong to the vendor
            named in `vendor_id`.
        every_category_id:
          type: string
          format: uuid
          description: What the payment is for, from `GET /v1/every-categories`.
        every_department_id:
          type: string
          format: uuid
          description: >-
            Which department the payment is for, from `GET
            /v1/every-departments`.
    CreatedPayment:
      type: object
      required:
        - id
        - status
        - vendor_id
        - amount
        - memo
        - every_category_id
        - every_department_id
      properties:
        id:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/PaymentStatus'
        vendor_id:
          type: string
          format: uuid
        amount:
          type: string
        memo:
          type: string
        every_category_id:
          type: string
          format: uuid
        every_department_id:
          type: string
          format: uuid
        from_every_account_id:
          type: string
          format: uuid
          description: >-
            The calling company's Every account the payment is drawn from — its
            default one.
        to_bank_account_id:
          type: string
          format: uuid
          description: The vendor's bank account the payment is paid into.
        approval:
          type: object
          description: The approval the payment is waiting on before it is sent.
          properties:
            id:
              type: string
              format: uuid
            approver_user_id:
              type: string
              format: uuid
    Error:
      type: object
      properties:
        message:
          type: string
        errors:
          type: array
          items:
            type: object
    PaymentStatus:
      type: string
      description: >
        `pending` — created, waiting on its approval.

        `processing` — approved and on its way to the bank.

        `completed` — the money has moved.

        `failed` — it will not move; see `failure_reason`.

        `returned` — the money moved and the receiving bank sent it back; see
        `failure_reason`.
      enum:
        - pending
        - processing
        - completed
        - failed
        - returned
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The `x-api-key` header is missing, or the key is unknown, revoked, or
        not enabled for this API. The body is `{"message":"Forbidden"}`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.