Repository navigation
feat: add trial period unit price and overrides - #255
Draft
jedpattersonpaddle wants to merge 2 commits into
Draft
jedpattersonpaddle wants to merge 2 commits into
jedpattersonpaddle wants to merge 2 commits into
Conversation
Adds paid trial support from the public API spec: unit_price and unit_price_overrides on price trial_period (PriceTrialDuration, PriceTrialDurationCreate, PriceTrialDurationUpdate) using new MoneyOptionalCurrency and PriceTrialUnitPriceOverride types, mirrored on webhook notifications. Price updates now accept a partial trial period.
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
unit_priceandunit_price_overrides, on requests (create, and non-catalog prices on transactions and subscriptions), responses andprice.*webhooks.MoneyOptionalCurrencyand trial override types. The spec makescurrency_codeoptional here, unlikeMoney.UpdatePriceRequestBody.trialPerioduses a new update type where every field is optional, perPriceTrialDurationUpdate. This accepts more input than before, but code that reads.intervalfrom a value typed as the update body now seesInterval | undefined.Mirrors PaddleHQ/paddle-python-sdk#154.
Part of the Node SDK catch-up with the released public API spec (
docs-developer-billingopen-api-spec-v1.yaml@ 7 Oct 2026). This batch fixes gaps found by a full SDK-vs-spec audit; many predate August. No breaking changes: removals and narrowings are held for the next major.Checks:
pnpm build,pnpm typecheck:tests,pnpm test,pnpm prettierpass.pnpm lintpasses apart from the pre-existingsrc/version.tseol-lasterror, which #250 fixes.🤖 Implemented and adversarially reviewed with Claude Code