Skip to content

fix(kiloclaw): remove delayed-billing start date that causes Stripe checkout failures#1363

Draft
jeanduplessis wants to merge 1 commit intomainfrom
jdp/remove-billing-start-date
Draft

fix(kiloclaw): remove delayed-billing start date that causes Stripe checkout failures#1363
jeanduplessis wants to merge 1 commit intomainfrom
jdp/remove-billing-start-date

Conversation

@jeanduplessis
Copy link
Contributor

Summary

  • Removes the STRIPE_KILOCLAW_BILLING_START env var and the trial_end logic in checkout session creation. This mechanism deferred billing for pre-launch subscribers until March 23, but Stripe requires trial_end to be at least 48 hours in the future — causing checkout failures for users as we approached that date.
  • New subscriptions now always bill immediately. Pre-launch subscriptions that already have a trial_end are still handled correctly by the existing trialing→active status mapping.
  • Updates the billing spec to remove the configurable billing start date rules and documents the change in the changelog.

Verification

  • pnpm typecheck — passes across all workspace projects
  • pnpm test -- src/routers/kiloclaw-billing-router.test.ts — 25/25 tests pass
  • Pre-push hooks (format, lint, typecheck) all pass

Visual Changes

N/A

Reviewer Notes

  • .env.local still contains STRIPE_KILOCLAW_BILLING_START="2026-03-23" — should be removed manually (file edit was blocked by repo rules). The production env var should also be removed.
  • The trialing→active mapping in stripe-handlers.ts is now only needed for legacy pre-launch subs. A TODO was added to remove it after ~2026-03-23 when those subscriptions transition.

…rial_end rejection

STRIPE_KILOCLAW_BILLING_START was set to 2026-03-23 but Stripe requires
trial_end to be at least 48h in the future, causing checkout failures for
users. Since launch billing is imminent, remove the mechanism entirely
rather than adding a buffer.
@jeanduplessis jeanduplessis marked this pull request as draft March 21, 2026 11:16
@kilo-code-bot
Copy link
Contributor

kilo-code-bot bot commented Mar 21, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • .env.test
  • .specs/kiloclaw-billing.md
  • src/lib/config.server.ts
  • src/lib/kiloclaw/stripe-handlers.ts
  • src/routers/kiloclaw-billing-router.test.ts
  • src/routers/kiloclaw-router.ts

Reviewed by gpt-5.4-20260305 · 246,221 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant