Live Billing And Promotion Codes
Patina 0.6 turns the live Stripe billing on. The Pro and Basic plan tiers introduced in 0.5.35 are now backed by real production payments, with redeemable promotion codes, a cleaner Settings page, and a small Quick Journal polish.
Live billing is on
- The Stripe live keys, recurring Price IDs, and webhook signing secret introduced in 0.5.35 are now wired through to production. Patina Basic and Patina Pro plans both create real Stripe Checkout sessions and respect the Pro entitlement when the webhook returns.
- Existing Lifetime License holders see no functional change.
- Existing annual subscribers stay on Patina Basic with no action needed.
Promotion codes in checkout
SubscriptionService.checkout(plan:email:promotionCode:)now forwards an optional promotion code through to the Cloudflare worker. The worker validates it against Stripe, applies the discount to the Checkout Session, and (for 100% off codes like the new EARLYBIRD coupon) skips Stripe Checkout entirely and flips the user to Pro server-side. The client picks that up via the newredeemedfield on the checkout response and refreshes the subscription status without sending the user through a hosted page.- Two new operator scripts ship in
scripts/: create-earlybird-code.mjsprovisions or refreshes the EARLYBIRD promotion code in live Stripe with the right product scoping and expiration.check-earlybird-code.mjslooks the code up by name and prints status, redemption count, max redemptions, and coupon shape.- Both scripts read the live secret from a hidden TTY prompt so the key never touches shell history.
Settings polish
- The fair-use bars in Settings now show weekly requests plus the weekly AI budget used by the Patina plan. The worker enforces the same weekly cost ceiling, so the UI matches the cap users actually hit.
- The macOS-only "Background Sync" section has been removed from General Settings. Background sync still runs on its own cadence, but the manual "Refresh Now" control was confusing to people who hadn't connected a source yet.
- The onboarding-screen debug picker that used to appear under Design Previews is now gated behind
com.gabrielvaldivia.patina.debug, so production builds no longer surface it even when other design preview affordances are on.
Quick Journal
- The Save button in the Quick Journal overlay now uses solid white foreground text whenever it is enabled. The previous Color.dynamic call flipped to black on dark backgrounds, which washed out against the filled accent pill in dark mode.