[PR #7090] [MERGED] fix(stripe): pass metadata to subscription object in upgrade method #7068

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

📋 Pull Request Information

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

Base: canaryHead: 2026-01-02/fix/stripe-subscription-metadata


📝 Commits (2)

  • 916196a fix(stripe): pass metadata to subscription object in upgrade method
  • b27a500 test: add session-level metadata check

📊 Changes

2 files changed (+74 additions, -1 deletions)

View changed files

📝 packages/stripe/src/routes.ts (+9 -1)
📝 packages/stripe/src/stripe.test.ts (+65 -0)

📄 Description

Fixes Discord Issue


Summary by cubic

Pass custom metadata when upgrading a Stripe subscription so it’s included on the subscription object. Fixes missing metadata and keeps userId, subscriptionId, and referenceId.

  • Bug Fixes
    • Merge request metadata into subscription_data.metadata and top-level metadata in upgradeSubscription.
    • Add test to confirm checkout.sessions.create receives custom fields in both subscription_data.metadata and metadata.

Written for commit b27a500a5b. 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/7090 **Author:** [@bytaesu](https://github.com/bytaesu) **Created:** 1/1/2026 **Status:** ✅ Merged **Merged:** 1/2/2026 **Merged by:** [@bytaesu](https://github.com/bytaesu) **Base:** `canary` ← **Head:** `2026-01-02/fix/stripe-subscription-metadata` --- ### 📝 Commits (2) - [`916196a`](https://github.com/better-auth/better-auth/commit/916196a94dace241748211fedc867ced5be9cd5b) fix(stripe): pass metadata to subscription object in upgrade method - [`b27a500`](https://github.com/better-auth/better-auth/commit/b27a500a5bf2cebca92ad0cc761ea3b286c44b01) test: add session-level metadata check ### 📊 Changes **2 files changed** (+74 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/routes.ts` (+9 -1) 📝 `packages/stripe/src/stripe.test.ts` (+65 -0) </details> ### 📄 Description Fixes [Discord Issue](https://discord.com/channels/1288403910284935179/1288403910284935182/1447353709284692129) <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Pass custom metadata when upgrading a Stripe subscription so it’s included on the subscription object. Fixes missing metadata and keeps userId, subscriptionId, and referenceId. - **Bug Fixes** - Merge request metadata into subscription_data.metadata and top-level metadata in upgradeSubscription. - Add test to confirm checkout.sessions.create receives custom fields in both subscription_data.metadata and metadata. <sup>Written for commit b27a500a5bf2cebca92ad0cc761ea3b286c44b01. 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-03-13 13:23:00 -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#7068