[PR #5821] [MERGED] feat(stripe): allow flexible types in plan limits #31852

Closed
opened 2026-04-17 22:43:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5821
Author: @bytaesu
Created: 11/7/2025
Status: Merged
Merged: 11/11/2025
Merged by: @Bekacru

Base: canaryHead: 2025-11-07/feat/flexible-plan-limits


📝 Commits (7)

  • 4d8a64b feat(stripe): allow flexible types in plan limits
  • 989df62 test: add test cases for plan limits
  • 3213858 chore: adjust comment
  • 14feb55 docs: adjust limits option description
  • 96e2e40 fix: any to unknown
  • e8a001e docs: limits type from any to unknown
  • 6f6e76f Merge branch 'canary' into 2025-11-07/feat/flexible-plan-limits

📊 Changes

3 files changed (+109 additions, -2 deletions)

View changed files

📝 docs/content/docs/plugins/stripe.mdx (+1 -1)
📝 packages/stripe/src/stripe.test.ts (+105 -0)
📝 packages/stripe/src/types.ts (+3 -1)

📄 Description

Since this field acts as metadata injected into the plan, it’s fine to give users more flexibility.

Closes https://github.com/better-auth/better-auth/issues/4977


Summary by cubic

Allow flexible types in Stripe plan limits so teams can store plan-specific metadata. Numbers, arrays, and objects are supported and preserved through subscription APIs.

  • New Features
    • Changed StripePlan.limits to Record<string, unknown>.
    • Added tests to validate numbers, arrays, objects, and mixed structures.
    • Updated docs to explain flexible limits and metadata usage.

Written for commit 6f6e76fbae. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/5821 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 11/7/2025 **Status:** ✅ Merged **Merged:** 11/11/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `2025-11-07/feat/flexible-plan-limits` --- ### 📝 Commits (7) - [`4d8a64b`](https://github.com/better-auth/better-auth/commit/4d8a64b65979a560c00ea87d20862895b663fd5d) feat(stripe): allow flexible types in plan limits - [`989df62`](https://github.com/better-auth/better-auth/commit/989df62e2dcd19376f7a5f633fb2d4beb38adc22) test: add test cases for plan limits - [`3213858`](https://github.com/better-auth/better-auth/commit/321385834cc93df0ea6a5465718c68efb87b3dd1) chore: adjust comment - [`14feb55`](https://github.com/better-auth/better-auth/commit/14feb5599e9fda0a5dac557c96b252a0a9eed759) docs: adjust limits option description - [`96e2e40`](https://github.com/better-auth/better-auth/commit/96e2e40a6c359aafb6cf58984ea222c8aa367945) fix: any to unknown - [`e8a001e`](https://github.com/better-auth/better-auth/commit/e8a001e7306da4ec349ace477baa7fb8dfa69559) docs: limits type from any to unknown - [`6f6e76f`](https://github.com/better-auth/better-auth/commit/6f6e76fbae3d2a9bee7e6b6e47a9242a89dff6fb) Merge branch 'canary' into 2025-11-07/feat/flexible-plan-limits ### 📊 Changes **3 files changed** (+109 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/stripe.mdx` (+1 -1) 📝 `packages/stripe/src/stripe.test.ts` (+105 -0) 📝 `packages/stripe/src/types.ts` (+3 -1) </details> ### 📄 Description Since this field acts as metadata injected into the plan, it’s fine to give users more flexibility. Closes https://github.com/better-auth/better-auth/issues/4977 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Allow flexible types in Stripe plan limits so teams can store plan-specific metadata. Numbers, arrays, and objects are supported and preserved through subscription APIs. - **New Features** - Changed StripePlan.limits to Record<string, unknown>. - Added tests to validate numbers, arrays, objects, and mixed structures. - Updated docs to explain flexible limits and metadata usage. <sup>Written for commit 6f6e76fbae3d2a9bee7e6b6e47a9242a89dff6fb. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-17 22:43:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#31852