authClient.subscription.list does a POST request which results in a 404
https://github.com/better-auth/better-auth/blob/0a596beb3a1d39d97e17b085c581ffd119404a58/packages/stripe/src/index.ts#L888C14-L888C17
I am using sveltekit with better auth 1.3.4 and if i look at the code it seems like it should be a GET request.
If i rewrite the request to GET it also works.
GitHub
better-auth/packages/stripe/src/index.ts at 0a596beb3a1d39d97e17b08...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
4 Replies
can you show me your auth & authClient configs?
import { createAuthClient } from "better-auth/svelte"
import { anonymousClient } from "better-auth/client/plugins"
import { stripeClient } from "@better-auth/stripe/client"
import { env } from "$env/dynamic/public";
export const authClient = createAuthClient({
baseURL: env.PUBLIC_BETTER_AUTH_URL,
plugins: [
anonymousClient(),
stripeClient({
subscription: true
})
]
})
and hooks.server.ts
@Ping I just tried to do a reproducible example and i noticed the request is only a post request if you have an object with
referenceId
as argument. if you use it without it's fine and a normal GET request and everything works.I have a similar issue with the billing portal but here it always uses the GET method no matter what i do
