---
search:
  tags:
    - SupplierFinance
    - POST
seo:
  description: >-
    Any signed in user. Adds one payment to a… Reference for the POST
    /api/v1/supplier-finance/invoices/{invoiceId}/payments endpoint in the
    PharmaFlow API.
sidebar:
  label: Record a payment on an invoice
  badge: POST
title: Record a payment on an invoice
type: openapi-operation
---
Any signed in user. Adds one payment to a supplier invoice and advances the paid amount. The amount must be positive, and the invoice reads as paid once payments cover its total.

`POST /api/v1/supplier-finance/invoices/{invoiceId}/payments`

**Request body** (`application/json`, required)

- `amount` (number, required)
- `method` (string)
- `reference` (string)

Request body example:

```json
{
  "amount": 0,
  "method": "string",
  "reference": "string"
}
```

**Responses**

- `200` — The invoice with the payment applied
- `400` — amount must be positive
- `401` — Not authenticated
- `404` — Supplier invoice not found

Response example, 200:

```json
{
  "id": "string",
  "supplier_id": "string",
  "branch_id": "string",
  "invoice_no": "string",
  "total_amount": 0,
  "paid_amount": 0,
  "status": "string",
  "due_date": "string",
  "notes": "string",
  "created_by": "string",
  "created_at": "string"
}
```
