#394 — Facade: Master Tenant Fee-Schedule Storage & Sync

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

Created: 2025-07-12 · Updated: 2025-09-15

Description

Persist custom fee templates in addition to PayEngine’s ones.

Use cases for Fee Schedule:

  1. System template which are prepared by Michael should be shown to partners having relevant processor configuration. E.g. if Clover is configured for Galt then Clover-based templates should be available for Galt.
  2. User from specific partner has created new template (on “Pricing” sub-tabs after “Templates”) and it should be stored for this user and available for check by “Owner” role.
  3. Merchant application was updated with some specific Fee Schedule.

AC:

  • Requirements to fee templates (PE and custom) are discussed with @TwillPayments.
  • Facade has persistence for all types of fee templates.
  • Facade has new /partner/fee-schedules/partner/fees/configs API to get and update pricing options (partner_id is needed for future filtering by partner). Filtering by user is expected to happen by JWT (blocked by https://github.com/Twill-AI/facade/issues/396).
  • Facade updates Fee Templates from PE by dedicated API request (for now, later by job or other triggers). PE fee templates are not needed, we would have only our own.

Implementation details

Added separate “partner” and “master” API-s for managing fee configs. “Master” API-s allow to see them all, “partner” - only in scope of current partner/user.

Also updates authorization, added to GET /partner/users/{user_id} ability to show partner name and manager name for given user. But it opens security breach

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets