---
title: "Record Payment"
method: POST
path: "/api/v1/accounts-payable/payments"
tags: ["v1", "Accounts Payable"]
---

# Record Payment

`POST /api/v1/accounts-payable/payments`

## Request

- Base URL: `https://api.jeevyfabrication.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.jeevyfabrication.com/api/v1/accounts-payable/payments`
- Auth: none declared

Record a payment: upload proof file as PAYMENT_RECEIPT doc (if provided), create the
vendor_payments rows, and queue the push to Zoho Books / QuickBooks.

``allocation_mode``:
  - ``po``: pay one or more POs, ``po_allocations_json`` = [{vendor_po_id, amount}],
    full or partial; any excess over the POs is kept as vendor credit.
  - ``vendor``: pay the vendor; the amount is applied to its received POs oldest
    due first and the rest is kept as vendor credit.
  - absent: as before. A single ``vendor_po_id`` / ``po_number`` takes the PO path;
    ``allocations_json`` (split by project / line) and a bare vendor payment keep
    their old behaviour.

## Request body `multipart/form-data`

- BodyRecordPaymentApiV1AccountsPayablePaymentsPost
  - `vendor_id` integer, required
  - `amount` number, required
  - `payment_date` string, required
  - `payment_method` string, nullable
  - `reference_number` string, nullable
  - `project_id` integer, nullable
  - `allocations_json` string, nullable
  - `notes` string, nullable
  - `vendor_po_id` integer, nullable
  - `po_number` string, nullable
  - `allocation_mode` string, nullable
  - `po_allocations_json` string, nullable
  - `vendor_po_ids_json` string, nullable
  - `forced_po_ids_json` string, nullable
  - `use_credit` boolean
  - `file` string, binary, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-20** `9f5f2c9a7763`: 5 info
  - added the new optional request property `allocation_mode`
  - added the new optional request property `forced_po_ids_json`
  - added the new optional request property `po_allocations_json`
  - added the new optional request property `use_credit`
  - …1 more
- **2026-11-09** `d9ef00c0253a`: 1 breaking, 4 info
  - the `file` request property contentMediaType changed from `application/octet-stream` to ``
  - added the new optional request property `po_number`
  - added the new optional request property `vendor_po_id`
  - the request property `file` became optional
  - …1 more

[Operation history](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/changes/api/v1/accounts-payable/payments/post.md)

---

[API](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api.md) - [All operations](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jeevyfabrication/apis/bom-generation-api/revisions/ad9a01abeac9?raw)
