Skip to content

feat: add trial period unit price and overrides - #255

Draft
jedpattersonpaddle wants to merge 2 commits into
mainfrom
spec_sync_price_trial_pricing
Draft

jedpattersonpaddle wants to merge 2 commits into
mainfrom
spec_sync_price_trial_pricing

Conversation

@jedpattersonpaddle

Copy link
Copy Markdown
Member

Summary

  • Price trial periods gain unit_price and unit_price_overrides, on requests (create, and non-catalog prices on transactions and subscriptions), responses and price.* webhooks.
  • New MoneyOptionalCurrency and trial override types. The spec makes currency_code optional here, unlike Money.
  • UpdatePriceRequestBody.trialPeriod uses a new update type where every field is optional, per PriceTrialDurationUpdate. This accepts more input than before, but code that reads .interval from a value typed as the update body now sees Interval | undefined.

Mirrors PaddleHQ/paddle-python-sdk#154.


Part of the Node SDK catch-up with the released public API spec (docs-developer-billing open-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 prettier pass. pnpm lint passes apart from the pre-existing src/version.ts eol-last error, which #250 fixes.

🤖 Implemented and adversarially reviewed with Claude Code

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant