Get a purchase payment

distru-get-purchase-paymentRead

Gets one payment made to a supplier against a purchase order by ID, with the purchase's payment status, paid amount and total.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
idstringYesResolve via distru-search-purchase-payments or distru-get-purchase-order (includePayments).

Output

Presence on a nested field assumes its parent exists.

FieldTypePresenceDescription
purchasePaymentobjectCan be null
purchasePayment.idstringAlways
purchasePayment.paymentNumberstringAlways
purchasePayment.paymentDatestringAlways
purchasePayment.statusenum
POSTEDVOIDED
AlwaysVOIDED payments no longer count toward paid.
purchasePayment.voidedAtstringCan be null
purchasePayment.amountstringAlwaysDollars, as recorded; a void leaves it unchanged.
purchasePayment.paymentMethodobjectCan be nullNull once the method is deleted.
purchasePayment.paymentMethod.idstringAlways
purchasePayment.paymentMethod.namestringAlways
purchasePayment.notestringCan be null
purchasePayment.qbPaymentAccountstringCan be nullFull 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.qbBillPaymentIdstringCan be nullIts QuickBooks bill payment ID.
purchasePayment.qbSyncStatusenum
DELETED_IN_QBOERRORNOT_SYNCEDPARTIALLY_SYNCEDPENDINGSYNCED
Can be nullNull 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.insertedAtstringAlways
purchasePayment.updatedAtstringAlwaysAlso moves on a void.
purchasePayment.purchaseobjectCan be nullNull when the caller's team can't see the purchase.
purchasePayment.purchase.idstringAlways
purchasePayment.purchase.purchaseNumberstringAlways
purchasePayment.purchase.paymentStatusenum
NOT_PAIDOVER_PAIDPAIDPARTIALLY_PAID
Always
purchasePayment.purchase.paidstringAlwaysSum of its non-voided payments.
purchasePayment.purchase.totalstringAlways
purchasePayment.supplierobjectCan be nullNull when the caller's team can't see it.
purchasePayment.supplier.idstringAlways
purchasePayment.supplier.namestringNull or absent
What the AI reads

Gets one payment made to a supplier against a purchase order by ID, with the purchase's payment status, paid amount and total. To browse or filter payments use distru-search-purchase-payments. A VOIDED payment keeps its amount as recorded but no longer counts toward the purchase's paid. supplier is null when the caller's team can't see it. 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). Null if no purchase payment matches the ID; a permission error if the caller can't view it. An invoice payment's ID is null here too: read it with distru-get-invoice-payment.