Get payments
Get a paginated list of your company's payments, newest first (ordered by creation time, then id).
A payment is a single record of money moving, and comes in one of two kinds, reported in payment_type: • INVOICE — money received from a customer against an invoice. The invoice field is populated and purchase is null. • PURCHASE — money paid to a vendor against a purchase. The purchase field is populated and invoice is null.
Exactly one of invoice / purchase is populated on any payment; the other is always null. Only invoice payments carry credit_uses and overpayment_credits (both null on purchase payments).
Each payment has a status of POSTED or VOIDED. A voided payment is retained rather than deleted, so historical references to it still resolve. By default this endpoint returns both POSTED and VOIDED payments; pass payment_status to narrow. Soft-deleted payments are never returned.
Narrow the result with company_ids (the customer/vendor), invoice_ids (INVOICE payments only), purchase_ids (PURCHASE payments only), payment_method_ids, amount range, payment_number, payment_type, payment_status, and the inserted_datetime / payment_datetime / updated_datetime windows. When several filters are supplied a payment must satisfy all of them (AND).
Results are eventually consistent: a newly created, updated, or voided payment can take up to 1 second to appear here or to reflect its latest state.
Required permission: payments_permissions_view.
Query parameters
Restrict the result to specific payments by ID (the same ID returned as each payment's id). Repeat the bracketed key once per ID. Unknown IDs simply match nothing; an empty list is treated as no filter. At most 200 IDs may be given.
Filter by the payment amount as an inclusive min,max decimal range separated by a comma. Either bound may be omitted: 100, keeps payments of 100 or more, ,500 those of 500 or less, 100,500 those in between. A range with both bounds empty is rejected.
Restrict to payments tied to specific companies by company ID (the same ID returned as each payment's company.id — the customer for INVOICE payments, the vendor for PURCHASE payments). Repeat the bracketed key once per ID; matches ANY. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.
Filter by when the payment was created in Distru. Accepts a comma-separated after,before ISO8601 datetime range; either side may be omitted for an open-ended bound. 2022-07-10T00:00:00Z, returns payments created at or after that instant, ,2022-07-10T00:00:00Z returns those created at or before it, and giving both bounds a closed range.
Restrict to INVOICE payments applied to any of the given invoices by invoice ID (the same ID returned under each payment's invoice.id). Repeat the bracketed key once per ID; matches ANY. PURCHASE payments never match. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.
Restrict to payments made with specific payment methods by payment method ID (the same ID returned under each payment's payment_method.id). Repeat the bracketed key once per ID; matches ANY. Payments fully paid with credits (which have no payment method) never match. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.
Restrict to PURCHASE payments applied to any of the given purchases by purchase ID (the same ID returned under each payment's purchase.id). Repeat the bracketed key once per ID; matches ANY. INVOICE payments never match. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.
Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.
Filter by the payment's payment_datetime (the datetime the payment was recorded as made, not when it was created in Distru). Same comma-separated after,before ISO8601 range format as inserted_datetime, with either bound optional.
Filter to payments whose payment_number contains this value (case-insensitive substring match, not an exact match).
Filter by payment status. POSTED returns only non-voided payments; VOIDED returns only voided ones. Omit to return both POSTED and VOIDED payments.
Filter by what the payment is tied to. INVOICE returns money received from customers against invoices; PURCHASE returns money paid to vendors against purchases. Omit to return both types.
Filter by when the payment was last modified in Distru. Same comma-separated after,before ISO8601 range format as inserted_datetime, with either bound optional.
Response
A list of payments
Changes
No recorded changes to this endpoint across all 1 revision of this API.