Skip to content

[ENG-1060] credit based trial support#9355

Merged
pjain1 merged 19 commits intomainfrom
credit_based_trials
May 6, 2026
Merged

[ENG-1060] credit based trial support#9355
pjain1 merged 19 commits intomainfrom
credit_based_trials

Conversation

@pjain1
Copy link
Copy Markdown
Member

@pjain1 pjain1 commented May 1, 2026

New flow -

  1. Have two plans - one trial and one paid. Both will have same billable metric (slots/min or slots/hr). No need to add credits to plan, two plans are there for distinction so its easy to know which customer is on trial.
  2. On new org creation - we create customer in Orb and Stripe as usual and also add $250 of credits directly to Orb customer so it persists across plan changes.
  3. When credit drops below $50 we send out warning email
  4. When credits deplete we hibernate projects, cancel subscription and send out email
  5. On upgrade before or after credit depletion we move them to paid plan

Points to note -

  1. All new trials will be credit based, no need to support time based trial
  2. For customers currently on time based trials, they will also upgrade to new paid plan
  3. Can remove extending time based trial feature for simplicity

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@pjain1 pjain1 requested review from a team as code owners May 1, 2026 10:15
@pjain1 pjain1 changed the title first commit credit based trial support May 1, 2026
remove more time base trial methods
@pjain1 pjain1 force-pushed the credit_based_trials branch from 03bc8c9 to b8e7b27 Compare May 1, 2026 17:19
Comment thread admin/server/billing.go Outdated
@pjain1 pjain1 changed the title credit based trial support [ENG-1060] credit based trial support May 1, 2026
@pjain1 pjain1 requested a review from begelundmuller May 4, 2026 07:54
Comment thread runtime/registry.go Outdated
Comment thread runtime/registry.go Outdated
Comment thread runtime/registry.go Outdated
Comment thread admin/deployments.go Outdated
Copy link
Copy Markdown
Contributor

@begelundmuller begelundmuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread admin/billing/biller.go Outdated
Comment thread admin/billing/README.MD Outdated
Comment thread admin/server/billing.go Outdated
Comment thread proto/rill/admin/v1/api.proto Outdated
@pjain1 pjain1 merged commit 3cfd0b9 into main May 6, 2026
16 checks passed
@pjain1 pjain1 deleted the credit_based_trials branch May 6, 2026 11:12
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.

2 participants