[PR #4121] [MERGED] fix(stripe): fix unset values on session completed with trial #22100

Closed
opened 2026-04-15 20:49:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4121
Author: @Ooscaar
Created: 8/21/2025
Status: Merged
Merged: 8/29/2025
Merged by: @himself65

Base: canaryHead: fix/stripe-trial-bug


📝 Commits (1)

  • d2bb241 fix(stripe): fix unset values on session completed with trial

📊 Changes

2 files changed (+121 additions, -0 deletions)

View changed files

📝 packages/stripe/src/schema.ts (+8 -0)
📝 packages/stripe/src/stripe.test.ts (+113 -0)

📄 Description

Fixes #4046


Summary by cubic

Fixes missing trial dates on Stripe subscriptions created from checkout.session.completed when a trial is present. We now persist trialStart and trialEnd alongside periodStart and periodEnd.

  • Bug Fixes
    • Added trialStart and trialEnd fields to the subscription schema.
    • Webhook now saves Stripe trial_start and trial_end on session completion with a trial.
    • Added tests for the trial flow to ensure trial and period dates are set.

🔄 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/4121 **Author:** [@Ooscaar](https://github.com/Ooscaar) **Created:** 8/21/2025 **Status:** ✅ Merged **Merged:** 8/29/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/stripe-trial-bug` --- ### 📝 Commits (1) - [`d2bb241`](https://github.com/better-auth/better-auth/commit/d2bb24162da4f5d150fd130ea8f019760a3f220a) fix(stripe): fix unset values on session completed with trial ### 📊 Changes **2 files changed** (+121 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/schema.ts` (+8 -0) 📝 `packages/stripe/src/stripe.test.ts` (+113 -0) </details> ### 📄 Description Fixes #4046 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes missing trial dates on Stripe subscriptions created from checkout.session.completed when a trial is present. We now persist trialStart and trialEnd alongside periodStart and periodEnd. - **Bug Fixes** - Added trialStart and trialEnd fields to the subscription schema. - Webhook now saves Stripe trial_start and trial_end on session completion with a trial. - Added tests for the trial flow to ensure trial and period dates are set. <!-- 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-15 20:49: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#22100