#397 — Facade “Create Merchant” API and merchant updating flow template

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

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

Description

Request

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

We need to create merchant in PE to keep most of fields from Merchant On-boarding page in. Note that existing POST /integrations won’t work because it is for regular tenants.

Acceptance criteria

  • Facade has POST /partner/merchants API which creates new merchant on PE and persists new row in “merchant” table.
  • ~~Once on-boarding application sends new data to PE (maybe API from https://github.com/Twill-AI/facade/issues/394 is called?) row of relevant merchant is updated with data from PE. ~~ Just template of PATCH API is created, new idea of making Facade “the source of truth” for merchants is defined in https://github.com/Twill-AI/facade/issues/411.

Implementation details

Created “Create merchant” API which allows to create completely new and add existing merchant on PayEngine. Please reuse existing - they have data and won’t generate new merchants in PayEngine - we can’t remove merchants, even testing ones. Note that attempt to create merchant created by another user won’t change “created_by_id” in database.

Image

Also created “Update merchant” which would allow to update merchant in Facade from PayEngine. Now it requires only merchant ID, next it would accept all other values from “Pricing” tab.

Updating flow would be implemented in separate https://githu

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets