[PR #4192] fix(stripe): metadata not passing to stripe subscriptions upon create #5244

Open
opened 2026-03-13 12:15:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4192
Author: @melsonic
Created: 8/24/2025
Status: 🔄 Open

Base: canaryHead: fix/stripe-metadata-not-passing


📝 Commits (2)

  • 5e6baaa fix: metadata not passing to stripe subscriptions upon create
  • b290b70 fix: lint

📊 Changes

1 file changed (+3 additions, -0 deletions)

View changed files

📝 packages/stripe/src/index.ts (+3 -0)

📄 Description

Previously, while creating a Stripe subscription, the metadata provided by the user was not being passed to the subscription. This PR ensures that the user-defined metadata from authClient.subscription.upgrade or auth.api.upgradeSubscription is included in the subscription that is created.

context: https://www.better-auth.com/docs/plugins/stripe#creating-a-subscription

/fixes #4104


Summary by cubic

Passes user-provided metadata to Stripe when creating a subscription, so values from authClient.subscription.upgrade and auth.api.upgradeSubscription are attached to the resulting subscription.


🔄 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/4192 **Author:** [@melsonic](https://github.com/melsonic) **Created:** 8/24/2025 **Status:** 🔄 Open **Base:** `canary` ← **Head:** `fix/stripe-metadata-not-passing` --- ### 📝 Commits (2) - [`5e6baaa`](https://github.com/better-auth/better-auth/commit/5e6baaa6c7bbb077481db3cb6de13112413fe6b1) fix: metadata not passing to stripe subscriptions upon create - [`b290b70`](https://github.com/better-auth/better-auth/commit/b290b70729f0bf4b94d2a1ff8cb148bce898b067) fix: lint ### 📊 Changes **1 file changed** (+3 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/index.ts` (+3 -0) </details> ### 📄 Description Previously, while creating a Stripe subscription, the metadata provided by the user was not being passed to the subscription. This PR ensures that the user-defined metadata from authClient.subscription.upgrade or auth.api.upgradeSubscription is included in the subscription that is created. context: https://www.better-auth.com/docs/plugins/stripe#creating-a-subscription /fixes #4104 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Passes user-provided metadata to Stripe when creating a subscription, so values from authClient.subscription.upgrade and auth.api.upgradeSubscription are attached to the resulting subscription. <!-- 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:15:27 -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#5244