Used to issue a payment against an invoice.
Input variables
- invoiceId: id of the invoice (path variable)
- json representation of a payment object
- amount (decimal)
- privateNotes (if any)
- publicNotes (if any)
- paymentmethod: the id of a payment method. The defaults are 1 Cash, 2 Bank Transfer, 3 Online, 4 Check, but methods are configured per school - call GetPaymentMethods for the list that applies to yours.
- createdAt (optional)
## A payment recorded here is always settled
This endpoint records money the school already has in hand, so the payment is created with `status` 1 (VALID) and counts towards the invoice's `paidAmount` immediately.
`status`, `paymentFees` and `stripePaymentIntentId` are read-only and ignored if sent - they describe what a payment provider did, and this endpoint takes no payment. Card and bank payments reach the invoice through Stripe instead, and those are the ones that can appear with status 2 (failed) or 3 (still clearing).
The response is the updated invoice, whose `payments` array carries these fields for every payment on it.
Request
This endpoint expects an object.
publicNotesstringRequired
paymentmethodobjectRequired
createdAtdatetimeRequired
Response
OK
emailstringformat: "email"