I tried to find the reason of this problem, and I do not know how to fix it in the headers or bearer something like that. The env file is correct except for the webhook.
There is a direct link checkout page of the product that could be used instead, but I would prefer to know what is going on.
UpgradeButton.tsx:16 TRPCClientError: You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/.
at TRPCClientError.from (TRPCClientError-38f9a32a.mjs:27:1)
at eval (httpBatchLink-d0f9eac9.mjs:189:59)
Fixed this, change the name to the env STRIPE_API_KEY ->
export const stripe = new Stripe(process.env.STRIPE_API_KEY ?? "", {
apiVersion: "2023-08-16",
typescript: true,
});
I tried to find the reason of this problem, and I do not know how to fix it in the headers or bearer something like that. The env file is correct except for the webhook. There is a direct link checkout page of the product that could be used instead, but I would prefer to know what is going on.
UpgradeButton.tsx:16 TRPCClientError: You did not provide an API key. You need to provide your API key in the Authorization header, using Bearer auth (e.g. 'Authorization: Bearer YOUR_SECRET_KEY'). See https://stripe.com/docs/api#authentication for details, or we can help at https://support.stripe.com/. at TRPCClientError.from (TRPCClientError-38f9a32a.mjs:27:1) at eval (httpBatchLink-d0f9eac9.mjs:189:59)