Get an invoice payment

distru-get-invoice-paymentRead

Gets one payment received against an invoice by ID, with the credits it used (creditUses) and the credits its overpayment created (overpaymentCredits).

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idstringYesResolve via distru-search-invoice-payments.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
invoicePaymentobjectCan be null
invoicePayment.idstringAlways
invoicePayment.paymentNumberstringAlways
invoicePayment.paymentDatestringAlways
invoicePayment.statusenum
POSTEDVOIDED
Always
invoicePayment.voidedAtstringCan be null
invoicePayment.receivedobjectCan be null
invoicePayment.received.amountstringAlways
invoicePayment.received.paymentMethodobjectCan be null
invoicePayment.received.paymentMethod.idstringAlways
invoicePayment.received.paymentMethod.namestringAlways
invoicePayment.creditAmountstringAlways
invoicePayment.appliedAmountstringAlways
invoicePayment.overpaidAmountstringAlways
invoicePayment.notestringCan be null
invoicePayment.customerobjectCan be null
invoicePayment.customer.idstringAlways
invoicePayment.customer.namestringNull or absent
invoicePayment.invoiceobjectCan be null
invoicePayment.invoice.idstringAlways
invoicePayment.invoice.invoiceNumberstringAlways
invoicePayment.invoice.paymentStatusenum
NOT_PAIDOVER_PAIDPAIDPARTIALLY_PAID
Always
invoicePayment.qbDepositAccountstringCan be null
invoicePayment.qbPaymentIdstringCan be null
invoicePayment.qbSyncStatusenum
DELETED_IN_QBOERRORNOT_SYNCEDPARTIALLY_SYNCEDPENDINGSYNCED
Can be null
invoicePayment.insertedAtstringAlways
invoicePayment.updatedAtstringAlways
invoicePayment.creditUsesobject[]Always
invoicePayment.creditUses[].amountstringAlways
invoicePayment.creditUses[].appliedAtstringAlways
invoicePayment.creditUses[].creditobjectCan be null
invoicePayment.creditUses[].credit.idstringAlways
invoicePayment.creditUses[].credit.creditNumberstringAlways
invoicePayment.overpaymentCreditsobject[]Always
invoicePayment.overpaymentCredits[].idstringAlways
invoicePayment.overpaymentCredits[].creditNumberstringAlways
invoicePayment.overpaymentCredits[].amountstringAlways
invoicePayment.overpaymentCredits[].statusenum
ACTIVECANCELEDREDEEMED
Always
What the AI reads

Gets one payment received against an invoice by ID, with the credits it used (creditUses) and the credits its overpayment created (overpaymentCredits). To browse or filter payments use distru-search-invoice-payments. appliedAmount is what counts toward the invoice's paid amount: received.amount + creditAmount = appliedAmount + overpaidAmount, and overpaidAmount became customer credit. received is null when the payment was made entirely with credit. A VOIDED payment keeps its amounts as recorded, so leave it out of totals. customer and invoice are null when the caller's team can't see them. qbSyncStatus ERROR: distru-search-quickbooks-activities with paymentIds gives the error. ERROR or NOT_SYNCED: distru-sync-to-quickbooks pushes it, or says why it can't. creditUses is empty once the payment is voided, and overpaymentCredits are then CANCELED. overpaymentCredits lists only credits the caller's team can see, none without permission to view credits, while overpaidAmount counts them all. Null if no invoice payment matches the ID; a permission error if the caller can't view it. A purchase payment's ID is null here too: read it with distru-get-purchase-payment.