InvoiceToTable Docs

Payments Overview

Subscription billing with Creem and legacy one-time credit compatibility.

Overview

InvoiceToTable uses Creem for payment processing.

Public billing now focuses on recurring subscriptions:

  • Pro$19.9/month, 500 credits each month
  • Ultra$29.9/month, 800 credits each month

Legacy one-time credit packs remain compatible for historical webhooks, ledger entries, and older payment records, but they are no longer a public checkout option.

Subscription Plans

Configured in constants/billing.ts:

PlanPriceCredits
Pro Monthly$19.9/mo500/month
Ultra Monthly$29.9/mo800/month

Payment Flow

  1. User clicks buy → Frontend calls /api/payments/creem/checkout
  2. Checkout session created → Creem API returns a payment URL
  3. User completes payment → Creem sends webhook to /api/payments/creem/webhook
  4. Webhook processing:
    • Signature verification (HMAC-SHA256)
    • Idempotency check (prevents duplicate processing)
    • Payment record inserted
    • Subscription record created/updated
    • Credits granted to user
    • Confirmation email sent

Legacy One-Time Credit Packs

Legacy one_time_pack records still work in the backend:

  • Existing payment and ledger history stays readable
  • Older webhooks can still resolve the legacy pack key
  • New public pricing pages no longer create one-time checkout sessions

Credit Scheduling

The current public catalog only uses monthly subscription grants.

If you later add annual plans, the built-in scheduling utilities in lib/billing/subscription.ts and /api/cron/subscription-grants are still available.

Testing

Set CREEM_SIMULATE="true" in .env to bypass real payment processing during development.

On this page