QuickBooks Payment API
A Payment object records a payment in QuickBooks. The payment can be applied for a particular customer against multiple Invoices and Credit Memos. It can also be created without any Invoice or Credit Memo, by just specifying an amount. A Payment can be updated as a full update or a sparse update. A Payment can be linked to multiple Invoices and Credit Memos. A Payment can be created as unapplied to any Invoice or Credit Memo, in which case it is recorded as a credit. If any element in any line needs to be updated, all the Line elements of the Payment object have to be provided. This is true for full or sparse update. Lines can be updated only ALL or NONE. To remove all lines, send an empty Line element. To remove some of the lines, send all the Lines that need to be present MINUS the lines that need to be removed. To add some lines, send all existing and new Lines that need to be present. The sequence in which the lines are received is the sequence in which lines are preserved. If you have a large number of invoice and corresponding payment records that you wish to import to the QuickBooks Online company, sort the invoice and payment records in chronological order and use the batch resource to send invoice and payments batches of 10, one after the other, to ensure any open invoices get credited with their payments.