Record invoice payment
Record money received from a customer against one or more open invoices.
POST https://cotlet.dev/api/v1/myob/customers/{customer_id}/invoice-payments
Records the payment as Sales > Record invoice payment does and returns the amount applied to each invoice with its new balance and status. A payment that settles an invoice in full closes it; a smaller amount leaves it open. An amount above the open invoices makes MYOB create a customer credit, so check the balance with get_invoice first. Payments already reconciled cannot be changed later. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| customer_id string required | string | Customer card ID from list_customers, e.g. CUS000012. |
| bank_account string required | string | Account code from list_bank_accounts, the account the money came in to or goes out of. |
| date date | date | Payment date. Default: today. |
| reference string | string | Reference number. Default: the next number MYOB suggests. |
| payments array required | array | Objects with invoice_number, amount and optional discount. |
| description string | string | Description of transaction. |
Request
curl -X POST https://cotlet.dev/api/v1/myob/customers/CUS000012/invoice-payments \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"bank_account":"1-1110","date":"2026-10-13","reference":"00000087","payments":[{"invoice_number":"00000142","amount":1100}]}' result = client.call("myob", "record_invoice_payment", {"customer_id":"CUS000012","bank_account":"1-1110","date":"2026-10-13","reference":"00000087","payments":[{"invoice_number":"00000142","amount":1100}]}) const result = await cotlet.call('myob', 'record_invoice_payment', {"customer_id":"CUS000012","bank_account":"1-1110","date":"2026-10-13","reference":"00000087","payments":[{"invoice_number":"00000142","amount":1100}]}); cotlet call myob record_invoice_payment --data '{"customer_id":"CUS000012","bank_account":"1-1110","date":"2026-10-13","reference":"00000087","payments":[{"invoice_number":"00000142","amount":1100}]}' Example response
{
"payment_reference": "00000087",
"customer_id": "CUS000012",
"bank_account": "1-1110",
"date": "2026-10-13",
"amount_received": 1100,
"applied": [
{
"invoice_number": "00000142",
"amount": 1100,
"balance_due": 0,
"status": "closed"
}
]
}