Record a payment against an invoice
splose_record_paymentWRITE, MONEY: records ONE payment received (cash, card, transfer) against ONE invoice; it moves the invoice towards Paid and is shown in the patient's account. It does NOT charge anyone's card. amount must not exceed what is owed (check splose_get_invoice). Not idempotent: calling twice records two payments, and this server cannot delete a payment, so confirm the details with the user first and pass confirm: true. Ids come from splose_get_invoice and splose_list_payment_methods. POST /payments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount paid, in dollars. | |
| confirm | Yes | Must be true: the user has confirmed the invoice, amount and payment method. | |
| invoiceId | Yes | Invoice id the payment settles. | |
| patientId | Yes | Patient id of the invoice. | |
| locationId | Yes | Location id. | |
| paymentDate | Yes | Date the money was received. | |
| paymentMethodId | Yes | Payment method id (splose_list_payment_methods). |