stripe 404 error
i am getting the error when running
for reference, i am using stripe cli with the command:
stripe listen --forward-to
auth.ts
authClient.ts
http://localhost:3000/api/auth/subscription/upgrade http://localhost:3000/api/auth/subscription/upgrade 404 when using await authClient.subscription.upgrade({
plan: //plan,
successUrl: "/",
cancelUrl: "/",
}); await authClient.subscription.upgrade({
plan: //plan,
successUrl: "/",
cancelUrl: "/",
});for reference, i am using stripe cli with the command:
stripe listen --forward-to
http://localhost:3000/api/auth/stripe/webhookhttp://localhost:3000/api/auth/stripe/webhookauth.ts
import { stripe } from "@better-auth/stripe";
import Stripe from "stripe";
const stripeClient = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: "2025-02-24.acacia", //i tried using stripe 17.7 and latest version
});
export const auth = betterAuth({
... //other stuff
plugins: [
stripe({
stripeClient,
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
createCustomerOnSignUp: true,
subscriptions: {
enabled: true,
plans: []
]
});import { stripe } from "@better-auth/stripe";
import Stripe from "stripe";
const stripeClient = new Stripe(process.env.STRIPE_SECRET_KEY!, {
apiVersion: "2025-02-24.acacia", //i tried using stripe 17.7 and latest version
});
export const auth = betterAuth({
... //other stuff
plugins: [
stripe({
stripeClient,
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
createCustomerOnSignUp: true,
subscriptions: {
enabled: true,
plans: []
]
});authClient.ts
import { createAuthClient } from "better-auth/react";
import { stripeClient } from "@better-auth/stripe/client"
export const authClient = createAuthClient({
baseURL: process.env.BETTER_AUTH_URL,
plugins: [
stripeClient({
subscription: true
})
]
});import { createAuthClient } from "better-auth/react";
import { stripeClient } from "@better-auth/stripe/client"
export const authClient = createAuthClient({
baseURL: process.env.BETTER_AUTH_URL,
plugins: [
stripeClient({
subscription: true
})
]
});