feat: implement subscription plan templates with dynamic pricing tiers - #1
Open
Timmatt112 wants to merge 1 commit into
Open
feat: implement subscription plan templates with dynamic pricing tiers#1Timmatt112 wants to merge 1 commit into
Timmatt112 wants to merge 1 commit into
Conversation
Add versioned plan templates with graduated pricing tiers, sharing, instantiation, analytics, and contract APIs. Prevent tiered templates from bypassing their pricing ladder through flat price overrides. Generated with Codebuff 🤖 Co-Authored-By: Codebuff <noreply@codebuff.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes Smartdevs17#950
Adds reusable subscription plan templates with dynamic graduated pricing tiers across the subscription contract and billing domain.
What changed
Pricing behavior
Tiered templates use graduated pricing: each tier charges only the units inside its range. An optional final unbounded tier handles usage above the last bounded threshold. Flat templates continue to use their base price regardless of usage.
Compatibility and safety
Planrecords.Verification
git diff --checkpassed.ErrorCodetype/value issue inbackend/services/shared/errors.ts.Scope note
Pre-existing generated typings and
package-lock.jsonmodifications were intentionally left unstaged and are not part of this PR.