Skip to content

feat(payments): support list filters - #419

Draft
sarkissianraffi wants to merge 2 commits into
mainfrom
feat/payments-list-filters
Draft

feat(payments): support list filters#419
sarkissianraffi wants to merge 2 commits into
mainfrom
feat/payments-list-filters

Conversation

@sarkissianraffi

@sarkissianraffi sarkissianraffi commented Sep 7, 2026

Copy link
Copy Markdown

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-filters at 1cb1dd67552d07279e74f005ac28d3e9684a76f7 (bundled SHA-256 edc85fddf229feb79974e65bb8c7a1a8e720926cb294d3749e6bd572edb72d7d).

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 timetour argument 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_type removed 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.

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.
Removed from the Lago API for performance reasons; the client must not
send or document it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant