#453 — [Bug]: creation master fee config template available_for_partners field issues

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

Created: 2025-08-01 · Updated: 2025-09-15

Description

Steps to reproduce

2 issues here:

  • A: without available_for_partners field at all tries to create it for “001” partner.
  • B: with empty available_for_partners field just makes wrong asyncpg query.
  1. In prod open OpenAPI UI and login under master
  • A: Call POST /master/fees/configs with
{
    "name": "Surcharge / Dual Pricing 4",
    "type": "surcharge",
    "processing_rate_percent": "0.00",
    "transaction_fee": "0.00",
    "monthly_fee": "0.00",
    "interchange_percent": "0.00",
    "card_not_present_percent": "0.00",
    "authorization_fee": "0.00",
    "base_rate_percent": "0.00",
    "surcharge_rate_percent": "4.00",
    "qualified_rate_percent": "0.00",
    "mid_qualified_rate_percent": "0.00",
    "non_qualified_rate_percent": "0.00"
}
  • B: Call POST /master/fees/configs with
{
    "name": "Surcharge / Dual Pricing 4",
    "type": "surcharge",
    "processing_rate_percent": "0.00",
    "transaction_fee": "0.00",
    "monthly_fee": "0.00",
    "interchange_percent": "0.00",
    "card_not_present_percent": "0.00",
    "authorization_fee": "0.00",
    "base_rate_percent": "0.00",
    "surcharge_rate_percent": "4.00",
    "qualified_rate_percent": "0.00",
    "mid_qualified_rate_percent": "0.00",
    "non_qualified_rate_percent": "0.00",
    "available_for_partners":[]
}

Expected behavior

A: error that available_for_partners is not specified.

B: passes (to make template be enabled for partners

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets