RazCrypto RazCrypto Docs
Dashboard Get API Keys
Docs Authentication

Authentication

RazCrypto uses two types of API keys. Always keep your secret key secure on your server.

Authentication Methods

Key TypeUse CaseSecurity Level
rz_pub_... Public KeyFrontend SDK, browserโœ… Safe for client-side
rz_sec_... Secret KeyBackend API, server-to-server๐Ÿ”’ Server-side only

Getting Your API Keys

  1. Login to RazCrypto Dashboard
  2. Navigate to Platforms section
  3. Click Add Platform or select existing
  4. Copy your Public Key and Secret Key

SDK Authentication (Frontend)

JavaScript
// Use Public Key in frontend โ€” safe!
RazCrypto.init({
    public_key_id: "rz_pub_your_public_key_here"
});

API Authentication (Backend)

// Send in request header
X-Public-Key-Id: rz_pub_your_public_key_here
// Send both headers for server-to-server
X-Gateway-Id: your_gateway_id_here
X-Secret-Key: rz_sec_your_secret_key_here

Environment Variables

.env
# NEVER commit this file to version control
RAZ_PUBLIC_KEY=rz_pub_your_public_key_here
RAZ_SECRET_KEY=rz_sec_your_secret_key_here
RAZ_WEBHOOK_SECRET=your_webhook_secret_here
Never expose your secret key in client-side code! Always keep it in environment variables on your server.