Authorization header:
Bash
- All requests must be made over HTTPS
- API keys are environment-specific — sandbox keys don’t work in production and vice versa
- Missing or invalid tokens return
401 Unauthorized
Token Types
Cadana offers three token types for different integration scenarios:| Token Type | Scope | Expires | Use Case |
|---|---|---|---|
| Org Token | Single business | No* | Backend integrations for one business |
| Platform Token | Multiple businesses | No* | Multi-tenant platforms serving multiple companies |
| User Token | Single user | 1 hour | Frontend and mobile apps |
Org Tokens
The default for most integrations. An Org token gives your backend full access to your organization’s resources — persons, users, payrolls, payments, and settings.Bash
Platform Tokens
These tokens are not restricted to a particular organization. They grant access to the primary organization and any additional businesses created. When using a Platform API Key for business specific actions you must include theX-MultiTenantKey header to specify which business you’re accessing:
Bash
User Tokens
User tokens are scoped to an individual end-user — whether an admin, employee, or contractor. They grant access only to that user’s resources, making them safe for frontend applications (browser or mobile).- Valid for 1 hour, after which a new token must be obtained
- Obtained through Cadana’s built-in authentication or a custom authentication flow (SSO via your own JWT provider)
Which Token Do I Need?
| Scenario | Token | Headers |
|---|---|---|
| Backend for one business | Org | Authorization: Bearer {token} |
| Backend for multiple businesses | Platform | Authorization: Bearer {token} + X-MultiTenantKey: {key} |
| Frontend / mobile for a user | User | Authorization: Bearer {token} |
Common Errors
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized | Missing or invalid token | Check your API key is correct |
401 Unauthorized | Wrong environment | Use sandbox key with dev-api.cadanapay.com |
401 Unauthorized | Platform token without tenant key | Add X-MultiTenantKey header |
403 Forbidden | Insufficient permissions | Check your token type and scope |