#309 — Facade API to Search Transactions

Repo: Twill-AI/facade State: closed | Status: done Assignee: Unassigned

Created: 2025-03-19 · Updated: 2025-09-15

Description

See https://www.figma.com/design/ZUrZatocX5Vs79IBNqzGke/Twill-UI?node-id=8619-55576&t=RIaI1tbHfTsvpeox-4 for the UI we need to serve. Includes disputes list.

May look like a single POST HTTP REST endpoint with request body containing filters and pagination data. POST and “data in body” because some filters may contain sensitive information and if put everything into query we may hit URL limit 2048 characters.

API is expected to query BD “transaction” table for rows data and also “twill_customer”, “recurring_plan”, “card_token”, “ach_token” tables for joined filters.

Pagination is supported by “start from ID” way, i.e. with “pageSize”, “sort” and “afterId”/“beforeId” parameters. It would allow to avoid costly OFFSET queries.

Limitations:

  • Pagination’s “total” counter is not provided. It means pagination is only “previous page” (if applicable) and “next page” where “next page” may be empty (when current page size is equal to page size).
  • Supported filters types: hardcoded list of options (including boolean and “not null”), dates range, float number with [==, >, >=, <, , !=] operators, exact string (aka ID), free string with [startswith, endswith, contains, not contains] operators.
  • Filters by direct columns:
    • createdAt (datetime),
    • updatedAt (datetime),
    • integrationId (exact string, get from GET /integrations),
    • platformId (exact string, null),
    • orderId (exact string, null),
    • payoutId (exact string, null),
    • platformCustomerId (exact string, null

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets