feat(payments): support list filters - #419
Draft
sarkissianraffi wants to merge 2 commits into
Draft
Conversation
Document typed payment filters and encode repeated arrays for both list endpoints. Authenticate customer payment requests and accept the existing nullable provider-payment reference so live filtered responses can be read. Validate with 456 tests, Ruff, a wheel build and live UI/REST count and ID comparisons, including the int64 maximum.
This was referenced Sep 7, 2026
Removed from the Lago API for performance reasons; the client must not send or document it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a typed PaymentFilters dictionary and payment-specific query normalization to both payment clients. Existing generic option dictionaries, explicitly bracketed keys and repeated query pairs remain accepted without mutating input.
Both top-level and customer-scoped payment lists accept status/status alias, inclusive int64 amount bounds, receipt number, created date bounds, provider, method, currency, invoice number, payment type, payable type and search. Existing pagination, customer ID and invoice ID options remain supported. Array values serialize as repeated bracketed keys; exact text is URL-encoded.
Source: lago-openapi
feat/payments-list-filtersat1cb1dd67552d07279e74f005ac28d3e9684a76f7(bundled SHA-256edc85fddf229feb79974e65bb8c7a1a8e720926cb294d3749e6bd572edb72d7d).Live QA: succeeded + EUR returns the same seven IDs as UI/REST; cust_1 returns two; amount_from=9223372036854775807 returns two. API and client QA, 79 HTTP assertions, cross-client IDs, UI QA and recording.
Verification: 456 pytest tests pass (449 baseline), changed-file Ruff clean, wheel build succeeds. Tests cover both endpoints, every parameter, array serialization, auth/timeout forwarding and compatibility forms.
Two existing issues surfaced in live QA and are corrected narrowly: customer payments omitted the Authorization header in the generic child mixin path, so this resource now forwards it; provider payments already return reference=null, so PaymentResponse.reference now accepts Optional[str]. The historical
timetourargument spelling stays compatible. No API serializer or wire response change. README example added; no changelog/version bump.Related PRs
Merge order: API, then front; OpenAPI before client/CLI releases. JavaScript CI uses the pinned feature spec during that rollout.
Performance follow-up (2026-09-09)
payment_method_typeremoved from the payments list filters: the Lago API dropped it for performance reasons (getlago/lago-api#6325, "Not shipped for performance reasons"). This client no longer sends or documents it; every other filter is unchanged. Indexes for the remaining filters ship first in getlago/lago-api#6341.