React-stripe-elements: Uncaught IntegrationError: Live Stripe.js integrations must use HTTPS

Created on 27 Jul 2019  路  4Comments  路  Source: stripe/react-stripe-elements

Summary

I have been using Stripe elements for a while and today I was making some changes to my website without any problems all my JS ran fine and at around 7 GMT +1 I got the error you see in the title :

Selection_094

Everything still works in my staging and production environments as these are running as HTTPS but it makes local development more difficult.

Most helpful comment

Hi @DennisdeBest - this error appears when you use a Live Mode publishable key with Stripe.js in an environment that isn't being served over HTTPS. In your case, it sounds like you're working in a local environment without HTTPS. This error won't appear if you use a Test Mode key in your development environment.

You can find your test mode publishable key on your dashboard, or by checking out this page while logged in to Stripe: https://stripe.com/docs/keys#api-keys

I hope that helps to clear things up!

All 4 comments

Hi @DennisdeBest - this error appears when you use a Live Mode publishable key with Stripe.js in an environment that isn't being served over HTTPS. In your case, it sounds like you're working in a local environment without HTTPS. This error won't appear if you use a Test Mode key in your development environment.

You can find your test mode publishable key on your dashboard, or by checking out this page while logged in to Stripe: https://stripe.com/docs/keys#api-keys

I hope that helps to clear things up!

Pardon my stupidity I rsynced some configuration the wrong way around, thank you for pointing this out

what should i do to work in live mode?

@Mkhira
image

Was this page helpful?
0 / 5 - 0 ratings