[PR #5019] [MERGED] fix(stripe): getCustomerCreateParams not actually being called #5722

Closed
opened 2026-03-13 12:32:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5019
Author: @ebalo55
Created: 10/1/2025
Status: Merged
Merged: 10/2/2025
Merged by: @himself65

Base: canaryHead: canary


📝 Commits (8)

  • 66a9979 fix: #2494, getCustomerCreateParams not actually being called in stripe plugin
  • c5798f0 Fix variable naming for customer creation options
  • 4996a5c fix: update context handling in getCustomerCreateParams for customer creation
  • 03973a5 Merge branch 'canary' of github.com:ebalo55/better-auth into canary
  • 5b590d7 fix: defu
  • 3caeac8 test: improve
  • 0132ae1 Merge branch 'canary' into canary
  • 1cdf727 Merge branch 'canary' into canary

📊 Changes

5 files changed (+274 additions, -15 deletions)

View changed files

📝 packages/stripe/package.json (+1 -0)
📝 packages/stripe/src/index.ts (+21 -6)
📝 packages/stripe/src/stripe.test.ts (+243 -0)
📝 packages/stripe/src/types.ts (+2 -5)
📝 pnpm-lock.yaml (+7 -4)

📄 Description

This is a fix for the #2494 bug report affecting the stripe plugin.
Particularly, this plugin seems not to ever call the getCustomerCreateParams function.
This pull fixes it.


Summary by cubic

Fixes the Stripe plugin so getCustomerCreateParams is called and applied when creating a customer on sign-up, enabling custom creation params. Resolves the bug where the hook was never used.

  • Bug Fixes
    • Call options.getCustomerCreateParams({ user, session: null }, ctx) when provided.
    • Merge returned values into customers.create alongside default email, name, and metadata.
    • No behavior change if createCustomerOnSignUp is false or the hook is absent.

🔄 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/5019 **Author:** [@ebalo55](https://github.com/ebalo55) **Created:** 10/1/2025 **Status:** ✅ Merged **Merged:** 10/2/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `canary` --- ### 📝 Commits (8) - [`66a9979`](https://github.com/better-auth/better-auth/commit/66a9979f8cb205d1dd7a057d4eac5ea0821509b8) fix: #2494, `getCustomerCreateParams` not actually being called in stripe plugin - [`c5798f0`](https://github.com/better-auth/better-auth/commit/c5798f0cafd38ce214476ef1ce4d5fa40d15b903) Fix variable naming for customer creation options - [`4996a5c`](https://github.com/better-auth/better-auth/commit/4996a5c27cc39ef2b90e7f5a76cb3f921b1ac026) fix: update context handling in getCustomerCreateParams for customer creation - [`03973a5`](https://github.com/better-auth/better-auth/commit/03973a5b6b061859cbeba5e963b1896a5c70d44a) Merge branch 'canary' of github.com:ebalo55/better-auth into canary - [`5b590d7`](https://github.com/better-auth/better-auth/commit/5b590d71844bcccfc063c66d870e5b1fedfdc874) fix: defu - [`3caeac8`](https://github.com/better-auth/better-auth/commit/3caeac8711105ae4630f260534c40850a9e5b992) test: improve - [`0132ae1`](https://github.com/better-auth/better-auth/commit/0132ae1704cad0797221f32a9a54ca7ff2b42dd0) Merge branch 'canary' into canary - [`1cdf727`](https://github.com/better-auth/better-auth/commit/1cdf72730a9e497a20c91e71a583a05ee4c1839a) Merge branch 'canary' into canary ### 📊 Changes **5 files changed** (+274 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/stripe/package.json` (+1 -0) 📝 `packages/stripe/src/index.ts` (+21 -6) 📝 `packages/stripe/src/stripe.test.ts` (+243 -0) 📝 `packages/stripe/src/types.ts` (+2 -5) 📝 `pnpm-lock.yaml` (+7 -4) </details> ### 📄 Description This is a fix for the #2494 bug report affecting the stripe plugin. Particularly, this plugin seems not to ever call the `getCustomerCreateParams` function. This pull fixes it. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes the Stripe plugin so getCustomerCreateParams is called and applied when creating a customer on sign-up, enabling custom creation params. Resolves the bug where the hook was never used. - **Bug Fixes** - Call options.getCustomerCreateParams({ user, session: null }, ctx) when provided. - Merge returned values into customers.create alongside default email, name, and metadata. - No behavior change if createCustomerOnSignUp is false or the hook is absent. <!-- 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 12:32:54 -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#5722