Yes, sure, if you POST or PUT a customerpayment, under paymentlines, you wil find the fields to insert an invoice and the amount to be paid for this invoice.
Under the Customerinvoice endpoint you see the field Status, that tells you among other statusses that the invoice is open or closed, and field Balance shows what is still to be paid. Does this help you?
... View more