Skip to content

Authentication

NogorPay authenticates every API request with a secret API key. Live keys start with sk_live_.

  1. Sign in to the NogorPay dashboard.
  2. Open Integrations → Connection settings.
  3. Select Generate API Key, give the key a name (for example Production server), and confirm.
  4. Copy the key and store it in your server’s environment variables or secret manager.

Put the key in the NOGORPAY-API-KEY header:

Terminal window
curl https://api.nogorpay.com/api/v1/charge/methods \
-H "NOGORPAY-API-KEY: sk_live_xxxxxxxxxxxxxxxx"

The header name is not case-sensitive. NogorPay also accepts the key in an X-API-Key header.

Status message Cause
401 Not authorized: Missing NOGORPAY-API-KEY header The request has no API key header.
401 Invalid API Key provided The key does not exist or has been revoked.
403 Your merchant account has been deactivated. Please contact support. The merchant account that owns the key is inactive.
  • Use the key only on your server. Anyone who has the key can create charges and read payment status for your account.
  • Don’t commit keys to Git. Load them from environment variables.
  • If a key leaks, revoke it in Integrations → Connection settings and generate a new one. Revoking takes effect within about a minute.