#548 — [Bug]: there is no deduplication of assigned merchants on one user

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

Created: 2025-09-03 · Updated: 2025-09-18

Description

Caused by https://github.com/Twill-AI/facade/issues/440 implementation.

Steps to reproduce

  1. In staging open OpenAPI UI and login under partner owner
  2. Call POST /api/v1/partner/users/{user_id}/assign-merchant “Assign Merchant” API multiple times with the same user and merchant.
  3. Check response and GET /api/v1/partner/users/{user_id} output for this user

Expected behavior

Attempt to assign already assigned merchant fails with 400 error. User can’t have duplicated entries in assigned_merchant_ids field.

Actual behavior

Image

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets