That specific error "Neither apikey nor config.authenticator provided" is a classic sign that the Stripe SDK is being initialized without a valid secret key.
The most common cause for this is that the environment variables haven't "synced" with your live site yet. In Vercel, updating your keys in the dashboard doesn't automatically update an existing build. You’ll need to trigger a fresh deployment to "bake" those new live keys into the environment.
Before you redeploy, it is worth doing a quick audit of your settings in the Vercel Dashboard:
- Check Variable Names: Ensure the names in your dashboard match exactly what your code is looking for (e.g.,
STRIPE_SECRET_KEY). Even a small typo or a missing underscore will prevent the SDK from finding the key.
- Verify Environment Selection: Make sure the live keys are explicitly added to the Production environment. It’s easy to accidentally save them only to Development or Preview.
- Audit your initialization code: Briefly check your Stripe setup code to ensure it isn't accidentally falling back to an empty string or using a hardcoded test value that might be overriding your environment variables.
Usually, once those keys are saved to Production and a new build is finished, the error should clear right up.