I believe the latest change in the last week or two has broken something with the addManualPayment call.
No matter what I pass in, it will throw this:
Uncaught Failed to invoke method addManualPayment in class com.infusionsoft.api.xmlrpc.XmlRpcInvoiceService: id must be valid
The odd thing is that the manual payment does appear in the UI.
This issue was resolved on Friday 8/22/2017. If this is still being experienced please let us know by creating a case with API support here: Create a Support Ticket - Keap Developer Portal as not all phone and chat reps are trained on troubleshooting the API.