#677 — Merchant Invitation System

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

Created: 2025-10-27 · Updated: 2025-11-11

Description

Enable master/partners to invite merchants via email with secure password setup flow.

Create POST /api/v1/partner/merchants/{merchant_id}/invite endpoint (+master) Use Supabase invite_user_by_email() for passwordless invite Create DbProfile record with merchant_id and Role.MERCHANT_USER Generate invite email with white-label partner branding Set redirect URL to merchant portal application page Add invited_at timestamp to DbMerchant table Track invitation status (invited, accepted)

AC:

  • Partner can invite merchant by email
  • Merchant receives branded email with magic link
  • Link redirects to password setup + login
  • Invitation tracked in database with timestamps
  • API tests for invitation flow
  • Master invite endpoint

Notes

Add implementation notes, blockers, and context here

Add wikilinks to related people, meetings, or other tickets