Record a purchase payment
distru-create-purchase-paymentWriteQuickBooksRecords a payment made to a supplier against a purchase order. Reaches QuickBooks when your settings sync purchases, purchase payments and the purchase order's status, and its total isn't negative (a zero total needs its own setting).
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| purchaseId | string | Yes | Resolve via distru-search-purchase-orders. |
| amount | string or number | Yes | Dollars. |
| paymentMethodId | string | Yes | Resolve via distru-search-lookups (type PAYMENT_METHOD). |
| paymentDate | string | No | When paid. 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 | |
| qbPaymentAccount | string | No | QuickBooks account the payment is made from (the "deposit account" in Distru's UI and errors), by full name ("Parent:Child" for a sub-account) or name; an active Bank or Credit Card account. Default: the company's Purchase Deposit Account; rejected when that is unset, inactive or another account type, so pass a payment account name or 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 | Description |
|---|---|---|---|
| purchasePayment | object | Always | |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Always | |
| purchasePayment. | enumPOSTEDVOIDED | Always | VOIDED payments no longer count toward paid. |
| purchasePayment. | string | Can be null | |
| purchasePayment. | string | Always | Dollars, as recorded; a void leaves it unchanged. |
| purchasePayment. | object | Can be null | Null once the method is deleted. |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Can be null | |
| purchasePayment. | string | Can be null | Full name of the QuickBooks Bank or Credit Card account the payment was made from. Null when it has none or the account is not in the QuickBooks cache. |
| purchasePayment. | string | Can be null | Its QuickBooks bill payment ID. |
| purchasePayment. | enumDELETED_IN_QBOERRORNOT_SYNCEDPARTIALLY_SYNCEDPENDINGSYNCED | Can be null | Null unless the company's QuickBooks module is on and connected. PENDING and ERROR are its latest sync's outcome and win over the rest. A payment syncs only once its purchase has a QuickBooks bill and purchase payment sync is on, so NOT_SYNCED is normal before that. |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Always | Also moves on a void. |
| purchasePayment. | object | Can be null | Null when the caller's team can't see the purchase. |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Always | |
| purchasePayment. | enumNOT_PAIDOVER_PAIDPAIDPARTIALLY_PAID | Always | |
| purchasePayment. | string | Always | Sum of its non-voided payments. |
| purchasePayment. | string | Always | |
| purchasePayment. | object | Can be null | Null when the caller's team can't see it. |
| purchasePayment. | string | Always | |
| purchasePayment. | string | Null or absent |
What the AI reads
Records a payment made to the supplier against a purchase order. Rejected for DRAFT purchases. An amount above the purchase's remaining balance is accepted and marks it OVER_PAID; the output's purchase.paymentStatus shows the result. A payment can't be edited: void it with distru-void-purchase-payment and create it again. Returns the payment as distru-get-purchase-payment does. qbBillPaymentId is its QuickBooks bill payment ID; qbPaymentAccount is the full name of the QuickBooks account it was paid from. qbSyncStatus is null unless the company's QuickBooks module is on and connected; PENDING and ERROR are its latest sync's outcome and win over the rest; DELETED_IN_QBO = the bill payment was deleted in QuickBooks; NOT_SYNCED = it isn't in QuickBooks, which is normal until its purchase has a QuickBooks bill and purchase payment sync is on. For why a sync failed, use distru-search-quickbooks-activities with purchaseOrderIds (its purchase.id).