Polar not working

I tried polar subscriptions but when i do checkout i get this error
2025-03-05T18:05:39.702Z ERROR [Better Auth]: Polar checkout creation failed. Error: Invalid URL
 ⨯ [Error [APIError]: Checkout creation failed] {
  status: 'INTERNAL_SERVER_ERROR',
  body: [Object],
  headers: {},
  statusCode: 500,
  digest: '2697661159'
}
but i think the polar developers have not integrated headers cause when i add headers are not being passed
export const checkout = async () => {
    await auth.api.polarCheckout({
        query: {
            productId: "6a77ff44-8349-436a-a46b-483cc3ba9f64",
        },
        params: {
            slug: "pro",
        },
        headers: await headers(),
    });
};
Was this page helpful?