Skip to content

feat(payments): support list filters - #61

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

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 typed PaymentFilters builders to both payment list requests, reuse existing payment enums, and encode query pairs with url::Url so arrays and exact text are preserved. Method types have a shared filter enum with snake_case serialization.

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: cargo test --all-features, cargo fmt --all -- --check, cargo clippy --all-features -- -D warnings, release build, and cargo publish --workspace --dry-run all pass. Unit/serde/mock HTTP tests cover every filter, both routes, empty/backward-compatible requests, escaped text and exact i64::MAX.

The client previously depended on registry lago-types 0.1.24 while its workspace crate is 0.1.25. It now uses a versioned path dependency so local and CI tests actually exercise the changed types. CI verifies both packages together with a workspace publish dry run; no upload or version bump. README example added. Existing payment response model unchanged.

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.

Add typed payment filters to both list requests and encode query pairs safely. Test the local types crate with the client and verify packaging together.
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