[PR #2566] [CLOSED] feat(stripe): adds option preventDuplicateCustomers #12628

Closed
opened 2026-04-13 08:30:15 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/2566
Author: @zpg6
Created: 5/7/2025
Status: Closed

Base: mainHead: feat/stripe/prevent-duplicate-customers


📝 Commits (7)

  • a7913cb feat: prevent duplicate customers on stripe
  • 15b40f9 fix: stripe call error handling
  • 40982eb chore: customer type annotations
  • 92edd44 chore: format
  • c315beb feat: reusable findExistingCustomer function
  • 57c26e4 fix: reorder to prevent conflict
  • 3a61147 chore: fmt

📊 Changes

2 files changed (+80 additions, -19 deletions)

View changed files

📝 packages/stripe/src/index.ts (+74 -19)
📝 packages/stripe/src/types.ts (+6 -0)

📄 Description

Closes #2495

This adds an option to the stripe plugin called preventDuplicateCustomers which, if enabled, will verify that a customer with that email doesn't already exist before creating a new customer.


🔄 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/2566 **Author:** [@zpg6](https://github.com/zpg6) **Created:** 5/7/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/stripe/prevent-duplicate-customers` --- ### 📝 Commits (7) - [`a7913cb`](https://github.com/better-auth/better-auth/commit/a7913cb57290bf61e712ca8c4d08353c23370bae) feat: prevent duplicate customers on stripe - [`15b40f9`](https://github.com/better-auth/better-auth/commit/15b40f939348f27b9fd39c0e0eb2040e198649b0) fix: stripe call error handling - [`40982eb`](https://github.com/better-auth/better-auth/commit/40982eb631dfce91b8ca58d21bc00d154a11c8d3) chore: customer type annotations - [`92edd44`](https://github.com/better-auth/better-auth/commit/92edd44e8c3345b209eae8353ea4bd92cb86a365) chore: format - [`c315beb`](https://github.com/better-auth/better-auth/commit/c315bebb620c7b638c60037b6dead63741da90d5) feat: reusable `findExistingCustomer` function - [`57c26e4`](https://github.com/better-auth/better-auth/commit/57c26e4098875f710343aae923b4df5a8568eed5) fix: reorder to prevent conflict - [`3a61147`](https://github.com/better-auth/better-auth/commit/3a611479019024de13c4093b4e7416b93fb6bcf4) chore: fmt ### 📊 Changes **2 files changed** (+80 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/src/index.ts` (+74 -19) 📝 `packages/stripe/src/types.ts` (+6 -0) </details> ### 📄 Description Closes #2495 This adds an option to the stripe plugin called `preventDuplicateCustomers` which, if enabled, will verify that a customer with that email doesn't already exist before creating a new customer. --- <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 08:30:15 -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#12628