PayintoDocs

API keys

Understand your key types and how to rotate them.

Find your keys in the dashboard under Settings > API Keys & Webhooks. Each environment has its own pair.

KeyPrefixWhere to use it
Test secret keysk_test_Your server, against the sandbox
Live secret keysk_live_Your server, against production
Test public keypk_test_Checkout in the browser or a mobile app
Live public keypk_live_Checkout in the browser or a mobile app

Only secret keys work on the Business API. Public keys are for the Checkout SDK.

Rotate a key

Rotate your keys regularly, and immediately if one may have been exposed.

Generate a new key in Settings > API Keys & Webhooks.

Update the key in your secret manager and deploy.

Call GET /whoami from production to confirm the new key works.

Good practice

  • Keep separate keys for each environment, and never share a key across them.
  • Restrict live keys to your servers' fixed outbound IP addresses.
  • Mask keys in logs and error reports.

On this page