#311 — Facade API to Search PaymentLinks
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=9486-25159&t=RIaI1tbHfTsvpeox-4 for UI requirements and https://github.com/Twill-AI/facade/issues/309 for filter types limitations.
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.
API is expected to query BD “payment_link” 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.
Filters by:
- id
- status (active, completed)
- integrationId (exact string, get from GET /integrations)
- createdAt
- updatedAt
- startDate
- endDate
- amount
- currency (exact string, ISO 3 chars)
- paymentMethods (CC_DC, ACH, ?)
- salesTax
- orderNumber (exact string)
- description (free string)
- isOneTime
- name
- isHaveContactInfo
- contactInfo (free text, search in JSON)
- slugId (exact string)
- isSaveCardConsent
- isUseSameAmount
- cardAmountNone
- achAmountNote
- isEnableCaptcha (boolean)
- merchantName
AC:
- Facade provides API for searching PaymentLinks in BD tables.
- API is covered by unit tests.
- https://twillpayments.atlassian.net/wiki/spaces/TD/pages/7929859/Facade+API is updated.
Notes
Add implementation notes, blockers, and context here
Related
Add wikilinks to related people, meetings, or other tickets