All Posts
February 12, 20260.1.6Calmony Sanctions Monitor

v0.1.6 — feat: PAYG Credit & Billing System with Stripe integration

Release v0.1.6: PAYG Credit & Billing System

12 February 2026

What changed

  • Pay-as-you-go credits — New credit system with 5 free welcome credits for every account. Four purchasable packages: Starter (£5/50cr), Growth (£18/220cr), Professional (£40/575cr), Enterprise (£75/1,200cr).
  • Stripe payments — Credit purchases go through Stripe Checkout. Webhook handling for payment confirmation and failure.
  • Credit gates — Adding a person (1 credit) and screening (1 credit) now require sufficient balance. Requests return a 402 with INSUFFICIENT_CREDITS when balance is too low.
  • Billing dashboard — New /dashboard/billing page with credit balance, package cards, transaction history, burn rate, and low-balance warnings. Balance card also added to the main dashboard.
  • Monthly billing processor — Cron-callable endpoint charges 1 credit per monitored person per month, with per-person charge records.
  • 5 new database tablescredit_accounts, credit_packages, credit_transactions, monitoring_billing_cycles, monitoring_charges.
  • Audit logging — All credit operations (purchases, charges, settings changes) are logged.

Why it matters

Screening and monitoring are now metered. Users get 5 free credits to start, then purchase more as needed — no subscription required. Every credit operation is logged for compliance.

Technical notes

  • 5 new database tables for credits, billing cycles, and charges.
  • New environment variables required: STRIPE_SECRET_KEY, NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, STRIPE_WEBHOOK_SECRET, NEXT_PUBLIC_APP_URL.
  • Stripe SDK is lazy-loaded; builds won't break if it's not installed.
  • API routes return 402 Payment Required with code INSUFFICIENT_CREDITS when balance is too low.

Release Notes

Successfully merged PR #19 and created release v0.1.6.

What was released:

  • PR #19 "feat: PAYG Credit & Billing System with Stripe integration" was squash-merged into main
  • Release v0.1.6 was created with tag v0.1.6

Key changes in this release:

  1. PAYG Credit System — Credit accounts with 5 free welcome credits, 4 purchasable package tiers (£5–£75), auto-topup, and burn rate tracking
  2. Stripe Integration — Checkout sessions, webhook handling, and signature verification for secure payments
  3. Credit Gates — Screening and adding people now requires credits (1 credit each), with 402 responses when balance is insufficient
  4. Billing Dashboard — New /dashboard/billing page with balance, packages, transaction history, and burn rate
  5. Monthly Billing Processor — Cron-callable endpoint to charge 1 credit per monitored person per month
  6. 5 New Database Tables — credit_accounts, credit_packages, credit_transactions, monitoring_billing_cycles, monitoring_charges
  7. Full Audit Logging — All credit operations logged for compliance

Stats: 1,964 additions, 48 deletions across 17 files

Release URL: https://github.com/LetMC/CalmonySanctionsMonitor/releases/tag/v0.1.6