Insert a payment for a purchase
Record a payment made against a purchase order. Each call adds one payment; there is no upsert here, so calling it again adds another payment rather than editing an existing one. The response is the created payment.
The payment rolls up into the purchase: the purchase's paid total increases by this amount and its payment_status is recomputed (NOT_PAID → PARTIALLY_PAID → FULLY_PAID, or OVER_PAID if payments exceed the total). Fetch the purchase again to observe the new totals. If your company is integrated with QuickBooks Online, the payment is also recorded against the linked bill, paid from the deposit account you supply or, when you supply none, from the company's Purchase Deposit Account.
A 404 is returned if the purchase does not exist or is not in your company, and a 403 if the authenticated user cannot view it under their team restrictions. A DRAFT purchase is rejected with a 400.
Required permission: purchases_permissions_make_payments. The authenticated user must also be allowed to view purchases under their team restrictions.
Request
- Base URLhttps://app.distru.com
- AuthHTTP bearer
Path parameters
The purchase's ID — the id returned by the list and show purchase endpoints.
Request body
Response
A single payment
Example response
{
"data": {
"company": {
"id": "3f128a34-cc59-4b49-8883-23bf10e59c6c",
"name": "Retailer 1"
}
}
}Changes
No recorded changes to this operation across all 17 revisions of this API.