[GH-ISSUE #7680] Misleading error message when using the stripe plugin with the new organization customerType #10868

Closed
opened 2026-04-13 07:14:12 -05:00 by GiteaMirror · 3 comments
Owner

Originally created by @joshsedl on GitHub (Jan 29, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/7680

Originally assigned to: @bytaesu on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Problem

I just setup stripe with organization support (implemented through https://github.com/better-auth/better-auth/pull/7142) and once I tried to subscribe to a plan, via authClient.subscription.upgrade I got the following error message:

Organization subscription is not enabled

But I enabled it before in my auth.ts. The reason for this error was, that I didn't implement authorizeReference in the stripe definition. After implementing the error disappeared.

Fix

Adjust the error message if the method is not implemented.

Current vs. Expected behavior

See above

What version of Better Auth are you using?

1.4.17

System info

Not needed.

Which area(s) are affected? (Select all that apply)

Server Response

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  emailAndPassword: {  
    enabled: true
  },
});

Additional context

No response

Originally created by @joshsedl on GitHub (Jan 29, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/7680 Originally assigned to: @bytaesu on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce ### Problem I just setup stripe with organization support (implemented through https://github.com/better-auth/better-auth/pull/7142) and once I tried to subscribe to a plan, via `authClient.subscription.upgrade` I got the following error message: > Organization subscription is not enabled But I enabled it before in my `auth.ts`. The reason for this error was, that I didn't implement `authorizeReference` in the stripe definition. After implementing the error disappeared. ### Fix Adjust the error message if the method is not implemented. ### Current vs. Expected behavior See above ### What version of Better Auth are you using? 1.4.17 ### System info ```bash Not needed. ``` ### Which area(s) are affected? (Select all that apply) Server Response ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the locked label 2026-04-13 07:14:12 -05:00
Author
Owner

@better-auth-agent[bot] commented on GitHub (Jan 29, 2026):

Thank you for bringing this issue to our attention! The error you experienced, "Organization subscription is not enabled," can occur if the authorizeReference method is not implemented in your Stripe configuration for handling organization subscriptions.

To resolve this, the following steps are recommended:

  1. Ensure that you have enabled the organization subscription in your Stripe plugin configuration.
  2. Implement the authorizeReference method as it is crucial for the authorization process when using organization-based subscriptions. This function checks if the user has permission to manage subscriptions for the organization.
  3. Consider updating the documentation to include steps for implementing this method to aid future users.

You could also suggest adjusting the error message to be more informative about the missing implementation of authorizeReference, as this will help users quickly pinpoint the issue in the future.

If you have further questions or need assistance as you implement these changes, feel free to reach out! Are you currently working on any other features or improvements for Better Auth that I can assist you with?

If you need more help, tag @better-auth-agent in a comment so I can respond.

DiagramDiscordGitHub

Diagram Join Star

<!-- gh-comment-id:3816877784 --> @better-auth-agent[bot] commented on GitHub (Jan 29, 2026): Thank you for bringing this issue to our attention! The error you experienced, "Organization subscription is not enabled," can occur if the `authorizeReference` method is not implemented in your Stripe configuration for handling organization subscriptions. To resolve this, the following steps are recommended: 1. Ensure that you have enabled the organization subscription in your Stripe plugin configuration. 2. Implement the `authorizeReference` method as it is crucial for the authorization process when using organization-based subscriptions. This function checks if the user has permission to manage subscriptions for the organization. 3. Consider updating the documentation to include steps for implementing this method to aid future users. You could also suggest adjusting the error message to be more informative about the missing implementation of `authorizeReference`, as this will help users quickly pinpoint the issue in the future. If you have further questions or need assistance as you implement these changes, feel free to reach out! Are you currently working on any other features or improvements for Better Auth that I can assist you with? _If you need more help, tag @better-auth-agent in a comment so I can respond._ <!-- bot:webhook reply v1 --> [Diagram](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) • [Discord](https://discord.gg/better-auth) • [GitHub](https://github.com/better-auth/better-auth) [![Diagram](https://img.shields.io/badge/Diagram-2b3137?style=flat-square)](https://repodiagrams.s3.eu-north-1.amazonaws.com/better-auth_ultra_detailed_interactive.html) [![Join](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&style=flat-square)](https://discord.gg/better-auth) [![Star](https://img.shields.io/badge/star-181717?logo=github&logoColor=white&style=flat-square)](https://github.com/better-auth/better-auth)
Author
Owner

@bytaesu commented on GitHub (Jan 29, 2026):

Hi @joshsedl,

I meant that message to indicate it’s not active yet due to incomplete setup, but it probably needs to be clearer.

I'll update that 🙂

<!-- gh-comment-id:3820804694 --> @bytaesu commented on GitHub (Jan 29, 2026): Hi @joshsedl, I meant that message to indicate it’s not active yet due to incomplete setup, but it probably needs to be clearer. I'll update that 🙂
Author
Owner

@joshsedl commented on GitHub (Feb 9, 2026):

@bytaesu thanks for the quick fix!

<!-- gh-comment-id:3870458806 --> @joshsedl commented on GitHub (Feb 9, 2026): @bytaesu thanks for the quick fix!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#10868