APIPayment

Get payments

GET
/public/v1/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.

At most 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).

Payments are not team-restricted: every payment in your company is returned. What a payment points at is team-restricted: invoice, purchase and company are null when the authenticated user cannot view them under their team restrictions, a credit use's credit is null for a credit they cannot view, and overpayment_credits leaves such credits out. payment_type still says which kind of payment it is.

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.

Authorization

Bearer
headerAuthorizationBearer <token>

API token generated in Distru (Settings → Distru API). Send it on every request as Authorization: Bearer YOUR_API_TOKEN.

Query Parameters

ids[]?array<string>

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.

amount?string

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.

company_ids[]?array<string>

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.

inserted_datetime?string

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.

invoice_ids[]?array<string>

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.

payment_method_ids[]?array<string>

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.

purchase_ids[]?array<string>

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?string

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.

payment_datetime?string

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.

payment_number?string

Filter to payments whose payment_number contains this value (case-insensitive substring match, not an exact match).

payment_status?string

Filter by payment status. POSTED returns only non-voided payments; VOIDED returns only voided ones. Omit to return both POSTED and VOIDED payments.

Value in"POSTED""VOIDED"
payment_type?string

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.

Value in"INVOICE""PURCHASE"
updated_datetime?string

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 Body

A list of payments

*/*
  1. response

A collection of Payments

data?array<>

Payments

next_page?string

URL for the next page of results; null when there is no next page

Example Request
curl -X GET 'https://app.distru.com/public/v1/payments'
Example Response
{  "data": [    {      "amount": "75.25",      "company": {        "id": "00000000-0000-0000-0000-0000000000f4",        "name": "Company 706",        "updated_datetime": "2026-08-24T16:01:05.993867Z"      },      "credit_uses": null,      "description": "pur payment",      "fully_paid_with_credits": false,      "id": "00000000-0000-0000-0000-000000000005",      "inserted_datetime": "2026-08-24T16:01:06.026947Z",      "invoice": null,      "overpayment_credits": null,      "payment_date": "2026-08-24T16:01:06.025787Z",      "payment_datetime": "2026-08-24T16:01:06.025787Z",      "payment_method": {        "active": true,        "deleted_at": null,        "id": "00000000-0000-0000-0000-000000000013",        "inserted_datetime": "2026-08-24T16:01:06.024649Z",        "name": "Payment Method 18",        "qb_payment_method_id": null,        "type": "CREDIT_CARD",        "updated_datetime": "2026-08-24T16:01:06.024649Z"      },      "payment_number": "Payment #4",      "payment_type": "PURCHASE",      "purchase": {        "id": "00000000-0000-0000-0000-00000000000a",        "purchase_number": "Purchase #9",        "status": "PENDING",        "total": "32.00"      },      "quickbooks_deposit_account_id": null,      "status": "POSTED",      "updated_datetime": "2026-08-24T16:01:06.026947Z"    },    {      "amount": "150.5",      "company": {        "id": "00000000-0000-0000-0000-0000000000f0",        "name": "Company 691",        "updated_datetime": "2026-08-24T16:01:05.939513Z"      },      "credit_uses": [        {          "amount": "30",          "credit": {            "amount": "100",            "credit_number": "CRT-U",            "id": "742f6f7c-7ef0-460f-b973-2688472c91a3",            "source": "USER"          },          "id": "8011ef98-305b-4f6e-8239-51d30460cc71"        }      ],      "description": "inv payment",      "fully_paid_with_credits": false,      "id": "00000000-0000-0000-0000-000000000004",      "inserted_datetime": "2026-08-24T16:01:05.965028Z",      "invoice": {        "id": "00000000-0000-0000-0000-00000000000b",        "invoice_number": "Invoice #10",        "status": "NOT_PAID",        "total": "32.00"      },      "overpayment_credits": [        {          "amount": "20",          "credit_number": "CRT-OP",          "id": "c1c44171-31d0-435a-9979-ec74269f7ced",          "source": "INVOICE_PAYMENT"        }      ],      "payment_date": "2026-08-24T16:01:05.963869Z",      "payment_datetime": "2026-08-24T16:01:05.963869Z",      "payment_method": {        "active": true,        "deleted_at": null,        "id": "00000000-0000-0000-0000-000000000012",        "inserted_datetime": "2026-08-24T16:01:05.962102Z",        "name": "Payment Method 17",        "qb_payment_method_id": null,        "type": "CREDIT_CARD",        "updated_datetime": "2026-08-24T16:01:05.962102Z"      },      "payment_number": "Payment #3",      "payment_type": "INVOICE",      "purchase": null,      "quickbooks_deposit_account_id": null,      "status": "POSTED",      "updated_datetime": "2026-08-24T16:01:05.965028Z"    }  ],  "next_page": null}