[PR #5734] feat(stripe): add payment link support #31788

Open
opened 2026-04-17 22:40:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5734
Author: @hyoban
Created: 11/3/2025
Status: 🔄 Open

Base: mainHead: 11-03-payment-link


📝 Commits (10+)

📊 Changes

3 files changed (+541 additions, -5 deletions)

View changed files

📝 docs/content/docs/plugins/stripe.mdx (+16 -2)
📝 packages/stripe/src/hooks.ts (+59 -3)
📝 packages/stripe/src/stripe.test.ts (+466 -0)

📄 Description

Summary by cubic

Adds support for Stripe Payment Links in checkout session completion so sessions created via payment links correctly attach to users and create initial subscriptions.

  • New Features
    • Detect sessions from payment links when referenceId and subscriptionId are missing.
    • Look up user by customer email (honors requireEmailVerification), set referenceId to user.id, and persist stripeCustomerId.
    • Create an initial "incomplete" subscription with plan, customer ID, and seats from item quantity.

Written for commit 862a2c9672. Summary will update automatically 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/5734 **Author:** [@hyoban](https://github.com/hyoban) **Created:** 11/3/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `11-03-payment-link` --- ### 📝 Commits (10+) - [`f145f80`](https://github.com/better-auth/better-auth/commit/f145f80f461b39c9520ab2b1eed8fadfac52d09d) feat(stripe): add payment link support - [`51a1898`](https://github.com/better-auth/better-auth/commit/51a1898f6b71e1557862157c8a927185b5d86e14) Apply suggestion from @Copilot - [`c2a874b`](https://github.com/better-auth/better-auth/commit/c2a874bd49719dca5dec724850370641cb7e356c) update - [`4c9bc1b`](https://github.com/better-auth/better-auth/commit/4c9bc1bea5f67796b49a9c2906c51cd80861928a) update - [`bc2e6ca`](https://github.com/better-auth/better-auth/commit/bc2e6ca1817d927e2f493f4df66fef4446787dce) update - [`21f9259`](https://github.com/better-auth/better-auth/commit/21f9259b99ea4d746b9d0363e33525393583d2bb) Merge branch 'canary' into 11-03-payment-link - [`ef3e87b`](https://github.com/better-auth/better-auth/commit/ef3e87bbf4bc15ce332cc583fa0942c3fb15d456) update - [`4cc5a26`](https://github.com/better-auth/better-auth/commit/4cc5a2667e37b2d3beb264dfa5a4336a12d379cd) Merge branch 'canary' into 11-03-payment-link - [`1e81b04`](https://github.com/better-auth/better-auth/commit/1e81b04b7503d9de4f3817a6a22cc80a6fbc59c7) add test - [`e546f4f`](https://github.com/better-auth/better-auth/commit/e546f4f8e1b0b3d386d046c7c5dc550ff714e429) update docs ### 📊 Changes **3 files changed** (+541 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/plugins/stripe.mdx` (+16 -2) 📝 `packages/stripe/src/hooks.ts` (+59 -3) 📝 `packages/stripe/src/stripe.test.ts` (+466 -0) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Adds support for Stripe Payment Links in checkout session completion so sessions created via payment links correctly attach to users and create initial subscriptions. - **New Features** - Detect sessions from payment links when referenceId and subscriptionId are missing. - Look up user by customer email (honors requireEmailVerification), set referenceId to user.id, and persist stripeCustomerId. - Create an initial "incomplete" subscription with plan, customer ID, and seats from item quantity. <sup>Written for commit 862a2c967215846605f50dcf48be18c199a92bb7. Summary will update automatically 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 22:40:05 -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#31788