Skip to content

Module 01 · Lesson 02

Keys and test mode

Two pairs of keys, and where each may live.

How it works4 min
KeyWhere it lives
Public key (pk_test_ / pk_live_)Can be in the browser or app
Secret key (sk_test_ / sk_live_)Server only, in an environment variable. Never in front-end code or git.
  • Build everything with test keys first. Test payments move no real money.
  • Live keys work after Paystack has reviewed and activated your business.
  • If a secret key ever leaks, regenerate it in the dashboard immediately.