fix(GRO-751): add server-side tip split validation to markPaid #320

Merged
the-dogfather-cto[bot] merged 1 commits from fix/gro-751-tip-split-validation into dev 2026-04-17 12:33:43 +00:00

1 Commits

Author SHA1 Message Date
Test User b65d5ff0d6 fix(GRO-751): add server-side tip split validation to markPaid
- Extend updateInvoiceSchema to accept optional tipSplits array in PATCH body
- Validate tip splits sum to 100% (10000 bps) when marking paid with tipCents > 0
- Return 422 if tipSplits not provided and no existing splits in DB
- Save tip splits atomically in same DB transaction as invoice status update
- Update frontend markPaid() to send tipSplits in PATCH body instead of separate POST
- Remove non-atomic POST /tip-splits call from markPaid flow

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-04-17 12:21:59 +00:00