[PR #3442] [CLOSED] usage tracking via stripe #4826

Closed
opened 2026-03-13 12:01:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3442
Author: @dagmawibabi
Created: 7/18/2025
Status: Closed

Base: mainHead: usage-tracking


📝 Commits (8)

📊 Changes

6 files changed (+774 additions, -10 deletions)

View changed files

📝 docs/content/docs/plugins/stripe.mdx (+219 -0)
📝 packages/stripe/src/index.ts (+220 -9)
📝 packages/stripe/src/schema.ts (+26 -0)
📝 packages/stripe/src/stripe.test.ts (+265 -0)
📝 packages/stripe/src/types.ts (+14 -0)
📝 packages/stripe/src/utils.ts (+30 -1)

📄 Description

Summary by cubic

Added usage tracking endpoints and schema to support usage-based subscriptions with Stripe.

  • New Features
    • Added trackUsage and getUsage endpoints to record and fetch daily usage per plan.
    • Introduced a new usage schema and type for storing usage data.
    • Enabled usage-based subscription support via a new usageBased option.

🔄 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/3442 **Author:** [@dagmawibabi](https://github.com/dagmawibabi) **Created:** 7/18/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `usage-tracking` --- ### 📝 Commits (8) - [`33953ba`](https://github.com/better-auth/better-auth/commit/33953baa80f390ebadc56945d18867e842894f01) usage tracking via stripe - [`817b440`](https://github.com/better-auth/better-auth/commit/817b440f32ab05fb57264f7ddf7f483398a622a1) fixed cicd test issues - [`54f861b`](https://github.com/better-auth/better-auth/commit/54f861bcaa506c8fad5105905437041e0ad66510) usage tracking via stripe - [`3f27bcc`](https://github.com/better-auth/better-auth/commit/3f27bccb558433ad1bbe4758a0d94182a39954f8) usage based - [`7859285`](https://github.com/better-auth/better-auth/commit/7859285a61f6090db768470577dd9a0a3f1853cb) usage bassed billing - [`ce7f1cc`](https://github.com/better-auth/better-auth/commit/ce7f1ccc05677b43a609968a05f29e3640a0d2a3) fix type - [`60f3edf`](https://github.com/better-auth/better-auth/commit/60f3edf2b4dd744ed188ab7890ab0510b480bea3) fixed type issue - [`1cdf011`](https://github.com/better-auth/better-auth/commit/1cdf0114f2d8977d7e8cca94ad817f43f29ce015) usage based billing, prevent duplicate customers and usage docs ### 📊 Changes **6 files changed** (+774 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/stripe.mdx` (+219 -0) 📝 `packages/stripe/src/index.ts` (+220 -9) 📝 `packages/stripe/src/schema.ts` (+26 -0) 📝 `packages/stripe/src/stripe.test.ts` (+265 -0) 📝 `packages/stripe/src/types.ts` (+14 -0) 📝 `packages/stripe/src/utils.ts` (+30 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Added usage tracking endpoints and schema to support usage-based subscriptions with Stripe. - **New Features** - Added `trackUsage` and `getUsage` endpoints to record and fetch daily usage per plan. - Introduced a new `usage` schema and type for storing usage data. - Enabled usage-based subscription support via a new `usageBased` option. <!-- 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-03-13 12:01:12 -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#4826