Record an invoice payment
distru-create-invoice-paymentWriteLeafLinkQuickBooksRecords a payment received against an invoice. QuickBooks gets the invoice if it isn't there yet, otherwise the payment when your QuickBooks settings sync payments. LeafLink gets the payment when your LeafLink settings sync payments and the order is linked to LeafLink.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| invoiceId | string | Yes | Resolve via distru-search-invoices. |
| received | object | No | Money from the customer (cash, check, card, ACH). Omit when paying only with credit. |
| received. | string or number | Yes | Dollars. |
| received. | string | Yes | Resolve via distru-search-lookups (type PAYMENT_METHOD). |
| creditAmount | string or number | No | Dollars paid from the customer's active credits the caller can see, oldest first, up to their credit balance. With credit, received.amount + creditAmount must not exceed the invoice's remaining balance. |
| paymentDate | string | No | When received. Default now. ISO 8601 with a UTC offset, e.g. "2026-09-01T00:00:00-07:00"; the company timezone is on distru-get-me. |
| note | string | No | |
| qbDepositAccount | string | No | QuickBooks account by full name ("Parent:Child" for a sub-account) or name; an active Bank or Other Current Asset account. Resolve via distru-search-qb-accounts. Default: the company's Sales Deposit Account, rejected when unset or inactive (point the user to Settings → QuickBooks). A name several accounts share is rejected with their full names to choose from. Rejected when the company is not on QuickBooks. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| invoicePayment | object | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | enumPOSTEDVOIDED | Always |
| invoicePayment. | string | Can be null |
| invoicePayment. | object | Can be null |
| invoicePayment. | string | Always |
| invoicePayment. | object | Can be null |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Can be null |
| invoicePayment. | object | Can be null |
| invoicePayment. | string | Always |
| invoicePayment. | string | Null or absent |
| invoicePayment. | object | Can be null |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | enumNOT_PAIDOVER_PAIDPAIDPARTIALLY_PAID | Always |
| invoicePayment. | string | Can be null |
| invoicePayment. | string | Can be null |
| invoicePayment. | enumDELETED_IN_QBOERRORNOT_SYNCEDPARTIALLY_SYNCEDPENDINGSYNCED | Can be null |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | object[] | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | object | Can be null |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | object[] | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | string | Always |
| invoicePayment. | enumACTIVECANCELEDREDEEMED | Always |
What the AI reads
Records a payment received against an invoice: money from the customer, customer credit, or both. The applied amount is capped at the invoice's remaining balance; excess money becomes customer credit, returned in overpaymentCredits. Rejected when the invoice is fully paid or voided. A payment can't be edited: void it with distru-void-invoice-payment and create it again. Returns the payment as distru-get-invoice-payment does.