shadow
shadow
BABetter Auth
Created by TAM on 4/7/2025 in #help
How to fix Stripe error
@TAM
11 replies
BABetter Auth
Created by TAM on 4/7/2025 in #help
How to fix Stripe error
can you check #Unable to get access to authClient.stripe.subscription
11 replies
BABetter Auth
Created by TAM on 4/7/2025 in #help
How to fix Stripe error
I am getting problem with subs
11 replies
BABetter Auth
Created by TAM on 4/7/2025 in #help
How to fix Stripe error
Hey, is your webhook running fine?
11 replies
BABetter Auth
Created by shadow on 4/7/2025 in #help
Unable to get access to authClient.stripe.subscription
7 replies
BABetter Auth
Created by shadow on 4/7/2025 in #help
Unable to get access to authClient.stripe.subscription
Stripe deprecated the current_period_start and current_period_end fields on the subscriptions API on March 31, 2025, and instead, you should use the current_period_start and current_period_end fields on the items[] field.
7 replies
BABetter Auth
Created by shadow on 4/7/2025 in #help
Unable to get access to authClient.stripe.subscription
7 replies
BABetter Auth
Created by shadow on 4/7/2025 in #help
Unable to get access to authClient.stripe.subscription
Invalid db[getModelName(model)].update() invocation in /Users/mayanktripathi/Projects/adam/prod/bv-prod/.next/server/chunks/58a27_better-auth_dist77281df6..js:3150:62 3147 } 3148 const whereClause = convertWhereClause(model, where); 3149 const transformed = transformInput(update, model, "update"); → 3150 const result = await db[getModelName(model)].update({ where: { id: "cus_S5ZkzLrh2oHinN" }, data: { plan: "pro", stripeSubscriptionId: "sub_1RBPxKLW6jnevwpozuutGeB4", status: "active", periodStart: new Date("Invalid Date"), ~~~~~~~~ periodEnd: new Date("Invalid Date"), seats: 1 } }) Invalid value for argument periodStart: Provided Date object is invalid. Expected Date. getting this now
7 replies
BABetter Auth
Created by shadow on 4/7/2025 in #help
Unable to get access to authClient.stripe.subscription
is it supposed to not automatically update the user in db?
7 replies
BABetter Auth
Created by shadow on 4/7/2025 in #help
Unable to get access to authClient.stripe.subscription
auth.ts
plugins: [
stripe({
stripeClient,
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
createCustomerOnSignUp: true,
subscription: {
enabled: true,
plans: async () => {
const products = await stripeClient.products.list();

const plans = products.data.map((product) => ({
name: product.name,
priceId: product.default_price as string | undefined,
}));

return plans;
},
},
}),
]
plugins: [
stripe({
stripeClient,
stripeWebhookSecret: process.env.STRIPE_WEBHOOK_SECRET!,
createCustomerOnSignUp: true,
subscription: {
enabled: true,
plans: async () => {
const products = await stripeClient.products.list();

const plans = products.data.map((product) => ({
name: product.name,
priceId: product.default_price as string | undefined,
}));

return plans;
},
},
}),
]
7 replies