[PR #8098] [CLOSED] Support for Stripe Managed Payments #15992

Closed
opened 2026-04-13 10:20:25 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8098
Author: @CarlosZiegler
Created: 2/22/2026
Status: Closed

Base: mainHead: main


📝 Commits (10+)

📊 Changes

524 files changed (+44089 additions, -15349 deletions)

View changed files

.claude/rules/release.md (+70 -0)
📝 .cspell/company-names.txt (+2 -1)
📝 .cspell/names.txt (+15 -1)
📝 .cspell/tech-terms.txt (+2 -0)
📝 .github/workflows/adapter-tests.yml (+0 -1)
.github/workflows/auto-cherry-pick-to-main.yml (+0 -337)
.github/workflows/cherry-pick-to-main.yml (+0 -325)
📝 .github/workflows/ci.yml (+19 -11)
.github/workflows/claude.yml (+53 -0)
📝 .github/workflows/e2e.yml (+23 -23)
📝 .github/workflows/preview.yml (+6 -4)
📝 .github/workflows/release.yml (+7 -0)
📝 .gitignore (+2 -0)
.npmrc (+0 -1)
.postmortem/client-side-import-server.md (+141 -0)
.postmortem/tanstack-start-server-core.md (+104 -0)
CLAUDE.md (+89 -0)
📝 biome.json (+3 -1)
📝 demo/nextjs/app/(auth)/sign-in/_components/sign-in.tsx (+69 -82)
📝 demo/nextjs/app/admin/page.tsx (+27 -1)

...and 80 more files

📄 Description

What’s added

This PR introduces support for Stripe Managed Payments as a new payment flow option for eligible digital product transactions.

With this change, we can route payments through Managed Payments where applicable, enabling a simpler path to global selling with Stripe handling key merchant-of-record responsibilities.

Why we’re adding this

We want to reduce operational complexity when selling internationally and improve speed-to-market for global transactions.

Managed Payments helps by covering core areas such as:

• tax handling (for supported regions/use cases),
• fraud/risk workflows,
• dispute handling,
• and customer transaction support.

Scope in this PR

• Add Managed Payments integration path.
• Enable configuration/setup required for using Managed Payments in our flow.
• Keep existing payment flow intact for non-eligible or non-configured scenarios.

References

https://x.com/jrfarr/status/2021999397287133511
https://stripe.com/en-de/managed-payments
https://docs.stripe.com/payments/managed-payments/how-it-works
https://docs.stripe.com/payments/managed-payments/set-up?dashboard-or-api=api


Summary by cubic

Adds preview support for Stripe Managed Payments in subscription checkout, with per-request enablement and strict param guards. Eligible checkouts can route through Managed Payments; others keep the current flow.

  • New Features

    • New subscription.managedPayments config: enabled, apiVersion, preview (default: managed_payments_preview=v1), isEnabled predicate.
    • Automatically adds managed_payments and sets Stripe-Version with the preview; blocks conflicting apiVersion sources and validates preview format.
    • Rejects unsupported Checkout params when enabled (e.g., customer_update, automatic_tax, tax_id_collection, payment_method_types, shipping_*; and subscription_data.default_tax_rates, application_fee_percent, on_behalf_of, transfer_data, invoice_settings).
    • Skips customer_update under Managed Payments; protects internal metadata and core checkout fields from overrides.
    • Docs updated with setup, selective enablement, options table, and webhook notes; comprehensive tests added.
  • Migration

    • No changes if you don’t enable it.
    • To enable: activate the preview in Stripe, set subscription.managedPayments.apiVersion (recommended) and preview token, or pass a matching RequestOptions apiVersion.
    • Remove unsupported params from getCheckoutSessionParams for Managed Payments, and handle async settlement webhooks if applicable.

Written for commit d2dd94356b. 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/8098 **Author:** [@CarlosZiegler](https://github.com/CarlosZiegler) **Created:** 2/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (10+) - [`1dfcbae`](https://github.com/better-auth/better-auth/commit/1dfcbae5491bf0efdbfd7a71ce9367cafdea81f2) docs: improve accessibility (#7253) - [`d81c742`](https://github.com/better-auth/better-auth/commit/d81c7428153cb5522ef88acf7304588f93b2ade6) chore: add claude code github workflow (#7268) - [`65ea323`](https://github.com/better-auth/better-auth/commit/65ea32356edae9e78d166e17a09fc7b71c48dc36) fix(api-key): log key verification errors (#7174) - [`1359f1c`](https://github.com/better-auth/better-auth/commit/1359f1c6c7061c8ca0ec526b76fd80dd2bd02d50) chore: add `--coverage.provider=istanbul` to coverage script (#7262) - [`80f1038`](https://github.com/better-auth/better-auth/commit/80f10389e275afac4da0408082311d89b25de641) docs: add Sequenzy to community plugins (#7266) - [`63d6721`](https://github.com/better-auth/better-auth/commit/63d67214113d6e51cdefaf65c821418bc8ab96c4) fix(two-factor): add missing POST endpoints to client pathMethods (#7284) - [`cb06d1a`](https://github.com/better-auth/better-auth/commit/cb06d1ad80ac3a95f9439093b081f0a22c93d001) chore(deps): update github-actions (#7278) - [`3b8db34`](https://github.com/better-auth/better-auth/commit/3b8db3418bb1d56ded366fe425c7b7faa3db3712) chore: release v1.4.11 - [`c9c46ca`](https://github.com/better-auth/better-auth/commit/c9c46ca9cadc24d1e48ffbba1e226ce269d6fe48) chore: use latest for dash plugin - [`f931272`](https://github.com/better-auth/better-auth/commit/f93127283846033855fcc94951bcb201a2a28c2e) chore: fix lockfile ### 📊 Changes **524 files changed** (+44089 additions, -15349 deletions) <details> <summary>View changed files</summary> ➕ `.claude/rules/release.md` (+70 -0) 📝 `.cspell/company-names.txt` (+2 -1) 📝 `.cspell/names.txt` (+15 -1) 📝 `.cspell/tech-terms.txt` (+2 -0) 📝 `.github/workflows/adapter-tests.yml` (+0 -1) ➖ `.github/workflows/auto-cherry-pick-to-main.yml` (+0 -337) ➖ `.github/workflows/cherry-pick-to-main.yml` (+0 -325) 📝 `.github/workflows/ci.yml` (+19 -11) ➕ `.github/workflows/claude.yml` (+53 -0) 📝 `.github/workflows/e2e.yml` (+23 -23) 📝 `.github/workflows/preview.yml` (+6 -4) 📝 `.github/workflows/release.yml` (+7 -0) 📝 `.gitignore` (+2 -0) ➖ `.npmrc` (+0 -1) ➕ `.postmortem/client-side-import-server.md` (+141 -0) ➕ `.postmortem/tanstack-start-server-core.md` (+104 -0) ➕ `CLAUDE.md` (+89 -0) 📝 `biome.json` (+3 -1) 📝 `demo/nextjs/app/(auth)/sign-in/_components/sign-in.tsx` (+69 -82) 📝 `demo/nextjs/app/admin/page.tsx` (+27 -1) _...and 80 more files_ </details> ### 📄 Description ## What’s added This PR introduces support for Stripe Managed Payments as a new payment flow option for eligible digital product transactions. With this change, we can route payments through Managed Payments where applicable, enabling a simpler path to global selling with Stripe handling key merchant-of-record responsibilities. ### Why we’re adding this We want to reduce operational complexity when selling internationally and improve speed-to-market for global transactions. ### Managed Payments helps by covering core areas such as: • tax handling (for supported regions/use cases), • fraud/risk workflows, • dispute handling, • and customer transaction support. ### Scope in this PR • Add Managed Payments integration path. • Enable configuration/setup required for using Managed Payments in our flow. • Keep existing payment flow intact for non-eligible or non-configured scenarios. References • https://x.com/jrfarr/status/2021999397287133511 • https://stripe.com/en-de/managed-payments • https://docs.stripe.com/payments/managed-payments/how-it-works • https://docs.stripe.com/payments/managed-payments/set-up?dashboard-or-api=api <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds preview support for Stripe Managed Payments in subscription checkout, with per-request enablement and strict param guards. Eligible checkouts can route through Managed Payments; others keep the current flow. - **New Features** - New subscription.managedPayments config: enabled, apiVersion, preview (default: managed_payments_preview=v1), isEnabled predicate. - Automatically adds managed_payments and sets Stripe-Version with the preview; blocks conflicting apiVersion sources and validates preview format. - Rejects unsupported Checkout params when enabled (e.g., customer_update, automatic_tax, tax_id_collection, payment_method_types, shipping_*; and subscription_data.default_tax_rates, application_fee_percent, on_behalf_of, transfer_data, invoice_settings). - Skips customer_update under Managed Payments; protects internal metadata and core checkout fields from overrides. - Docs updated with setup, selective enablement, options table, and webhook notes; comprehensive tests added. - **Migration** - No changes if you don’t enable it. - To enable: activate the preview in Stripe, set subscription.managedPayments.apiVersion (recommended) and preview token, or pass a matching RequestOptions apiVersion. - Remove unsupported params from getCheckoutSessionParams for Managed Payments, and handle async settlement webhooks if applicable. <sup>Written for commit d2dd94356bab0db57c4b5f9b20cfcefe8297318d. 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-04-13 10:20:25 -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#15992