---
title: "Create Invoice Payment"
method: POST
path: "/invoices/{invoice_header_id}/payments"
tags: ["Invoice Payments"]
---

# Create Invoice Payment

`POST /invoices/{invoice_header_id}/payments`

## Request

- Base URL: `http://localhost/app4legal/api/v2/money`
- URL: `http://localhost/app4legal/api/v2/money/invoices/{invoice_header_id}/payments`
- Auth: OAuth 2
  - Password
  - Token URL: `http://localhost/app4legal/api/v2/core/login`
- TypeScript: <https://skmtc.dev/app4legal/apis/a4l-money-api/docs/invoices/:invoice_header_id/payments/post.ts> (a function with typed inputs; its response is checked against the schema)

Create Invoice Payment

## Path parameters

- `invoice_header_id` integer, required

## Request body

- object
  - `organization_id` integer, required
  - `paid_on` string, date, required
  - `deposit_account_id` integer, required
  - `deposit_amount` number, required
  - `payment_method` 'Bank Transfer' | 'Cash' | 'Cheque' | 'Credit Card' | 'Other' | 'Online payment' | 'Trust Account', required
  - `comments` string
  - `payment_reference` string

## Response `201`

Invoice payment has been created successfully.

- object
  - `message` string
  - `invoice_payment` object
    - `payment_id` integer
    - `date` string, date
    - `invoice_number` string
    - `payment_total` number
    - `payment_method` string
    - `comments` string
    - `payment_reference` string
    - `created_on` string, date-time

## Other responses

- `401`: Unauthenticated
- `403`: Forbidden
- `500`: Internal Server Error

---

[API](https://skmtc.dev/app4legal/apis/a4l-money-api.md) - [All operations](https://skmtc.dev/app4legal/apis/a4l-money-api/llms.txt) - [OpenAPI document](https://skmtc.dev/app4legal/apis/a4l-money-api/revisions/e0d144609998?raw)
