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

write Confirm

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

Parameters: record_invoice_payment
NameTypeDescription
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
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}]}'
Python
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}]})
Node.js
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}]});
CLI
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

JSON

{
  "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"
    }
  ]
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.