Skip to content

What is a publishable key?

A publishable key is an API key that is safe to put in a web page or phone app. It only says which account is calling. Its partner, the secret key, works like a password and stays on your server.

An example

Stripe gives you a publishable key that starts with pk_test_ and a secret key. The publishable key goes in your page’s code. The secret key goes in your .env file.