feat(paykit): add subscription quantity support
Closed
PA
3mo ago+549+549+012345678901234567890123456789-10-10-01234567890123456789
Summary
- Add optional subscription quantity support to subscribe input and provider calls
- Pass quantity through Stripe checkout, create, update, and scheduled changes
- Sync subscription item quantity from provider/webhooks into the existing local subscription quantity column
- Add a changeset for paykitjs
Out of scope
- Checkout command idempotency keys
- Resuming open Checkout Sessions
- Automatic tax, Tax ID, or billing address collection
- App-specific organization or entitlement logic
Test Plan
- pnpm test:unit
- pnpm --filter paykitjs typecheck
- pnpm lint
- pnpm --filter paykitjs build
Summary by CodeRabbit
-
New Features
- Subscription flows now support item quantity across checkout, subscription creation, updates, and scheduled changes.
- Quantity is accepted in subscribe requests, validated as a positive integer, and carried through to provider and local records.
-
Bug Fixes
- Quantity is now normalized and preserved consistently, including during billing sync and scheduled activations.
-
Tests
- Added unit and end-to-end Stripe provider coverage to confirm quantity is forwarded and reflected correctly (including schedule phase changes).