Skip to content

feat(payments): document list filters on findAllPayments - #579

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
Contributor

Document every payment list filter on findAllPayments and findAllCustomerPayments, including currency and search that REST previously omitted. Split parameter sources and the regenerated root openapi.yaml are committed; payment response schemas and all other operations are unchanged.

REST GraphQL Semantics
payment_status / payment_statuses paymentStatus OR across pending, processing, succeeded, failed; singular REST alias takes precedence
amount_from, amount_to amountFrom, amountTo Inclusive nonnegative int64 cents; reject reversed bounds
receipt_number receiptNumber Exact case-insensitive receipt number, max 255
created_at_from, created_at_to createdAtFrom, createdAtTo Inclusive organization-timezone dates
payment_provider_type paymentProviderType OR across the six configured provider types
currency currency Payment amount currency; now forwarded by REST
invoice_number invoiceNumber Exact case-insensitive number, max 255; matches Invoice and any invoice in a PaymentRequest
external_customer_id externalCustomerId Existing exact customer filter
payment_type paymentType manual / provider
payable_type payableType Invoice / PaymentRequest
search_term searchTerm Existing search now exposed on REST; exact invoice/customer filters skip redundant search branches

All filters AND together; array entries OR together. Existing page, per_page, invoice_id and GraphQL pagination/search arguments remain supported.

Arrays use repeated bracketed keys (payment_status[]=succeeded&payment_status[]=failed) with form/explode serialization; descriptions also document accepted scalar forms and the plural status alias. Includes enum values, inclusive int64 amount bounds, exact case-insensitive text limits, organization-timezone dates, 422 validation and pagination semantics.

Verification

  • npm run build and npm test pass with zero errors.
  • Redocly: 13 existing warnings. Spectral: 23 baseline warnings plus five singular-array-name warnings because the required public filter names are fixed; no lint rule suppressed.
  • Structural comparison confirms no response schema changes, no unrelated operation changes and no payment POST changes.
  • Consumed successfully by both generated clients and the CLI; live UI/API/SDK/CLI parity verified.

API and client QA, 79 HTTP assertions, cross-client IDs, UI QA and recording

Scope notes

The requested feat/payments-list-filters branch overrides the older template's feature/ prefix. The template's Ruby test command does not apply to this repository; both OpenAPI lint suites pass. One implementation commit. Invoice amount parameters remain unchanged because their existing input contract differs from nonnegative int64 payment bounds. Reuses the existing shared currency parameter without broadening unrelated currency schemas. No serializer changes or export.

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 GET /payments and GET /customers/{external_customer_id}/payments: the API dropped the filter for performance reasons (feat(payments): add list filters to payments (REST + GraphQL) lago-api#6325, "Not shipped for performance reasons"). Parameter file, registry entry and both resource references removed; bundle rebuilt; npm test green (0 errors, pre-existing warnings only).
  • SDK clients and the CLI must be regenerated from this bundle before release.

Document shared list filters for payments and customer payments, including array serialization, exact number matches, inclusive date and int64 amount bounds, validation errors and pagination semantics. Regenerate the public bundle without changing response schemas.
Removed with the API filter for performance reasons. SDK clients and the CLI
are generated from this bundle and must be regenerated before release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature Feature requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant