Authorization header. You generate API keys from the admin panel - see API keys for the full key management guide.
How to get an API key
- Log in to your OwnPay admin panel
- Navigate to Developers → API Keys
- Click Generate API Key
- Choose the access scope (read, write, or admin)
- Copy the key immediately - it is shown only once
Header format
Every API request must include the key as a Bearer token:op_live_ identifies a live key. Test-mode keys use the op_test_ prefix.
Key scopes
API keys carry one of three scopes, which determine which endpoints the key can access:The scope is set when you generate the key and cannot be changed afterward. Create separate keys for separate applications.
Super admin operations
A small set of platform-level operations (creating brands, managing system users) require an additional header on top of anadmin-scoped key:
Authentication error response
If the key is missing, invalid, expired, or lacks the required scope, the API returns:Code examples
Best practices
- Rotate keys every 90 days
- Use one key per environment (dev, staging, prod)
- Use one key per application
- Monitor usage in Developers → API Keys for anomalies
- Revoke unused keys immediately