lookupKey not working on stripe plugin without priceId #827

Closed
opened 2026-03-13 08:06:04 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @andrewdoro on GitHub (Mar 11, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

using the docs related to stripe I tried to add plans without priceId
https://www.better-auth.com/docs/plugins/stripe#defining-plans

this is not being used when calling the upgrade logic

  await authClient.subscription.upgrade({
              plan: plan,
              referenceId: activeOrg?.id,
              seats: 1,
              annual: billingCycle === "yearly",
              successUrl: "/org/billing/success",
              cancelUrl: "/org/billing",
            });

tsx

          {
            name: "pro", // the name of the plan, it'll be automatically lower cased when stored in the database
            lookupKey: "pro_monthly",
          },
          {
            name: "team",
            lookupKey: "team_monthly",
          },
        ],

Current vs. Expected behavior

it should use the lookupKey when making the stripe session

What version of Better Auth are you using?

1.2.3

Provide environment information

- Mac OS
- Chrome

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

Package

Auth config (if applicable)

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

Additional context

No response

Originally created by @andrewdoro on GitHub (Mar 11, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce using the docs related to stripe I tried to add plans without priceId https://www.better-auth.com/docs/plugins/stripe#defining-plans this is not being used when calling the upgrade logic ```tsx await authClient.subscription.upgrade({ plan: plan, referenceId: activeOrg?.id, seats: 1, annual: billingCycle === "yearly", successUrl: "/org/billing/success", cancelUrl: "/org/billing", }); ``` tsx ``` plans: [ { name: "pro", // the name of the plan, it'll be automatically lower cased when stored in the database lookupKey: "pro_monthly", }, { name: "team", lookupKey: "team_monthly", }, ], ``` ### Current vs. Expected behavior it should use the lookupKey when making the stripe session ### What version of Better Auth are you using? 1.2.3 ### Provide environment information ```bash - Mac OS - Chrome ``` ### Which area(s) are affected? (Select all that apply) Package ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ emailAndPassword: { enabled: true }, }); ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 08:06:04 -05:00
Author
Owner

@Kinfe123 commented on GitHub (Jun 9, 2025):

can you please use

npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/stripe@2963

and let me know if it works

@Kinfe123 commented on GitHub (Jun 9, 2025): can you please use ```bash npm i https://pkg.pr.new/better-auth/better-auth/@better-auth/stripe@2963 ``` and let me know if it works
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#827