[PR #7949] [MERGED] fix(stripe): remove getSubscriptionUsage endpoint #33248

Closed
opened 2026-04-17 23:53:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/7949
Author: @bytaesu
Created: 2/12/2026
Status: Merged
Merged: 2/12/2026
Merged by: @bytaesu

Base: canaryHead: 2026-02-13/fix/remove-get-subscription-usage


📝 Commits (1)

  • 2ed01b1 fix(stripe): remove getSubscriptionUsage endpoint

📊 Changes

6 files changed (+1 additions, -368 deletions)

View changed files

📝 packages/stripe/src/error-codes.ts (+0 -1)
📝 packages/stripe/src/index.ts (+0 -2)
📝 packages/stripe/src/routes.ts (+0 -98)
📝 packages/stripe/src/utils.ts (+0 -23)
📝 packages/stripe/test/metered-billing.test.ts (+0 -158)
📝 packages/stripe/test/utils.test.ts (+1 -86)

📄 Description

It doesn't seem very valuable to handle aggregation at the plugin level, since most people will likely customize and build their own dashboards anyway.


Summary by cubic

Removed the getSubscriptionUsage endpoint and related utilities to simplify the Stripe plugin API and avoid plugin-level aggregation. Fetch usage data directly from Stripe when building dashboards.

  • Refactors

    • Removed /subscription/usage route and stripeGetUsage export.
    • Deleted createMeterIdResolver and the METER_ID_NOT_FOUND error code.
    • Cleaned up related tests.
  • Migration

    • Replace any client.subscription.usage or stripeGetUsage calls with direct Stripe Billing Meters queries (e.g., listEventSummaries).
    • If you relied on createMeterIdResolver, move meter ID resolution/caching into your app.
    • Remove references to STRIPE_ERROR_CODES.METER_ID_NOT_FOUND.

Written for commit 2ed01b1726. Summary will update 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/7949 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 2/12/2026 **Status:** ✅ Merged **Merged:** 2/12/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `2026-02-13/fix/remove-get-subscription-usage` --- ### 📝 Commits (1) - [`2ed01b1`](https://github.com/better-auth/better-auth/commit/2ed01b172648fa5b36a9aae4a065bd204cf6958c) fix(stripe): remove getSubscriptionUsage endpoint ### 📊 Changes **6 files changed** (+1 additions, -368 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/error-codes.ts` (+0 -1) 📝 `packages/stripe/src/index.ts` (+0 -2) 📝 `packages/stripe/src/routes.ts` (+0 -98) 📝 `packages/stripe/src/utils.ts` (+0 -23) 📝 `packages/stripe/test/metered-billing.test.ts` (+0 -158) 📝 `packages/stripe/test/utils.test.ts` (+1 -86) </details> ### 📄 Description It doesn't seem very valuable to handle aggregation at the plugin level, since most people will likely customize and build their own dashboards anyway. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Removed the getSubscriptionUsage endpoint and related utilities to simplify the Stripe plugin API and avoid plugin-level aggregation. Fetch usage data directly from Stripe when building dashboards. - **Refactors** - Removed /subscription/usage route and stripeGetUsage export. - Deleted createMeterIdResolver and the METER_ID_NOT_FOUND error code. - Cleaned up related tests. - **Migration** - Replace any client.subscription.usage or stripeGetUsage calls with direct Stripe Billing Meters queries (e.g., listEventSummaries). - If you relied on createMeterIdResolver, move meter ID resolution/caching into your app. - Remove references to STRIPE_ERROR_CODES.METER_ID_NOT_FOUND. <sup>Written for commit 2ed01b172648fa5b36a9aae4a065bd204cf6958c. Summary will update 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 23:53:53 -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#33248