#457 — [Bug]: Facade doesn’t mark bank accounts as immutable

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

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

Description

Caused by investigations around https://github.com/Twill-AI/facade/pull/458

Steps to reproduce

  1. In staging open OpenAPI UI and login under any partner user that has an existing merchant with 2 existing bank accounts associated
  2. Call PATCH /api/v1/partner/merchants/{merchant_id} with only one of the bank accounts (i.e. the patch deletes one of the accounts)

Expected behavior

I expected the account to be deleted. Internally accounts can’t be deleted/updated in PE but can be set as “not default”. The endpoint should identify accounts to delete and set them as “not default” in PE. Also front-end should be notified about ability to update returned bank accounts. Only active bank accounts should be returned.

Actual behavior

Both accounts are returned back, no marks whether bank account is mutable or not.

Implementation details.

Actually there is no ability to deactivate bank accounts in PE - only ability to set default bank account but it means we need to have another (and valid!) bank account to switch on plus it should be the only one. So decided to just provide UI with “immutable” marks.

Implemented unit tests to check bank accounts handling in following scenarios:

  • Free add/remove/update of “local” bank accounts on “update” calls (no PE-communication with ban

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets