← back to work

Shafer Law Payments

Architect & sole engineer · 2026

A production billing and online-payment system for a law firm

Next.jsTypeScriptStripePrismaPostgreSQLClerkWebhooksVercel

Invoicing and card/ACH payments for a law firm, engineered for the correctness and audit standards that money and bar-association compliance demand.

> The_Problem

A firm needed to invoice clients and take payments online without exposing itself to double-charges, lost payments, or an audit trail that couldn't stand up to bar-association review.

> What_I_Built

  • Stripe Checkout (cards, ACH, Apple/Google Pay), token-gated public payment links, and automated email receipts.
  • Signature-verified, idempotent webhooks with two-layer deduplication so a replayed or duplicated event can never double-apply.
  • Atomic invoice numbering, integer-cent accounting (no floating-point money), and ACH payout reconciliation that ties bank transfers back to individual payments.
  • An append-only audit log designed for bar-association review, with card data kept entirely off the application (PCI SAQ-A).

> Outcome

  • Correct-by-construction money handling: no double-charges, deterministic reconciliation, full audit trail.
  • Deployed and handling real client payments.