Billing
Who it is for
Staff and customers.
What you can do
- Staff run the next non-autopay rent invoice from
/admin/facilities/[id]/billing. That page only runs the billing run; it does not record a payment and it does not charge a card. - A cash, check, or card payment is recorded from the Rentals tab or the lease, not from the billing page.
- Delinquency is
/admin/facilities/[id]/delinquency. - Stripe keys are
/admin/stripe. - Move-in fees, tax, and late-fee settings are on facility settings, with a link to delinquency and a link to rate changes.
- Customers: pay an open invoice by card and start autopay.
- Admin: configure move-in fees, tax, late fees, and reservation rules on facility settings.
How it works
- Billing run:
/admin/facilities/[id]/billingrenderscomponents/storage/BillingRun.tsx, which callsgenerateRecurringRentinactions/recurringRent.ts. - Card pay and autopay:
createInvoiceCheckoutandstartAutopayinactions/billing.ts. - Webhook:
POST /api/stripe/webhook. - Stripe keys come from the
StripeSettingssingleton (managed at/admin/stripe), thenSTRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRET. - Money is stored in cents and shown as dollars.
- Recurring rent creates the next invoice for a lease that is not on autopay. The invoice id is deterministic so a second run does not double-post. Autopay leases are skipped.
- A ledger line is not edited. Staff reverse or credit from the lease contract screen instead.
Limits
- The billing run only creates invoices; it does not charge cards.
- Autopay leases are billed by Stripe.
- A payment ledger line uses the Stripe payment intent or
inv_<invoice id>so retries do not double-post.
Lockyard