---
title: "Create single payment for specific invoice"
method: POST
path: "/payments"
tags: ["payment"]
---

# Create single payment for specific invoice

`POST /payments`

Create single payment for specific invoice

## Request body

- object
  - `patientId` integer, required — Patient id
  - `locationId` integer, required — Location id
  - `paymentMethodId` integer, required — Payment method id
  - `amount` number, nullable, required — Total payment amount, it should be the same as the sum of all paymentInvoice amount
  - `paymentDate` union, required — Payment date
    - string
    - string
  - `paymentInvoices` object[], required — Payments made to invoices
    - `invoiceId` integer, required — Invoice id
    - `amount` number, nullable, required — Amount paid
    - `xeroId` string — Xero payment id, only applicable for Xero payment
  - `xeroId` string, uuid — Xero batch payment id, only applicable for Xero batch payment

## Response `200`

Object with payment data.

- object
  - `id` integer, required — Payment id
  - `paymentNumber` string, required — Payment number
  - `amount` number, nullable, required — Total payment amount. 0 for credit allocation
  - `patientId` integer, required — The payment patient id
  - `locationId` integer, required — The payment location id
  - `paymentMethodId` integer, nullable, required — The payment method id, null for credit allocation
  - `paymentDate` union, required — Payment date
    - string
    - string
  - `paymentInvoices` object[], required — Payments made to invoices
    - `invoiceId` integer, required — Invoice id
    - `amount` number, nullable, required — Amount paid
    - `xeroId` string, uuid, nullable, required — Xero payment id
  - `creditAllocations` object[], required — Credit allocated to invoices
    - `invoiceId` integer, required — Invoice id
    - `amount` number, nullable, required — Amount paid
  - `xeroId` string, uuid, nullable, required — Xero batch payment id
  - `archivedAt` union, required — Payment archive date time
    - string
    - string
    - unknown
  - `archived` boolean, nullable — Whether the payment has been archived

---

[API](https://skmtc.dev/splose/apis/splose-public-api.md) · [All operations](https://skmtc.dev/splose/apis/splose-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/splose/splose-public-api/revisions/648d60075f00/schema)
