Authentication Overview
Waffo Pancake supports two authentication methods for API access:| Method | Use Case | Description |
|---|---|---|
| API Key | Server-to-server calls | Permanent authentication using Merchant ID and private key |
| Store Slug | Public checkout flows | Public access using X-Store-Slug and X-Environment headers |
API Key Authentication
API Keys provide permanent server-to-server authentication. The private key never leaves your server.API Key authentication is handled automatically by the SDK. Install
@waffo/pancake-ts, provide your Merchant ID and private key, and the SDK will handle request signing automatically.Using the SDK (Recommended)
API Key authentication does not require the
X-Environment header. The environment is determined by the key’s registered environment (test or prod).Store Slug Authentication
For public-facing checkout flows, use Store Slug authentication. This allows visitors to interact with checkout endpoints without API Key credentials.| Header | Description |
|---|---|
X-Store-Slug | Your store’s unique slug identifier |
X-Environment | test or prod (required) |
Creating API Keys
Create API Key
Click “Create API Key” to generate a new key pair. The public key is sent to the server automatically.
Name and Configure
Give it a descriptive name (e.g., “Production Server”) and select the target environment (Test or Production).
Security Best Practices
- Never expose private keys in client-side code, version control, or public repositories
- Use environment variables to store keys in your server application
- Separate test and production keys — create distinct keys for each environment
- Rotate keys regularly, especially after team member changes
- Monitor API usage in the Dashboard for unusual activity
Authentication Errors
| Status | Message | Solution |
|---|---|---|
| 401 | Invalid API key | Verify your Merchant ID and private key are correct |
| 401 | Missing authentication | Ensure the SDK is initialized with valid credentials |
| 403 | Insufficient permissions | Use a key with the required permissions |