Key types
Copy your keys from the Demat dashboard after you create a merchant account. Keep the secret key in your server environment. Never put it in a browser or mobile app.
Test vs live
Use the same base URL for both. The secret key selects the data plane.
A test key always uses sandbox data. A live key requires admin verification and live mode.
Protect the secret key
- Do not put
sk_keys in frontend code, mobile apps, or git. - Store them in environment variables or a secrets manager.
- Rotate a key immediately if you think it leaked.
SSL
Call the API over HTTPS. Do not disable TLS verification (VERIFY_PEER or equivalent) in production.