Authorization header for certain flows.
API secret key
Star-Pay issues an API secret key to each merchant through the CBE merchant dashboard. You must include this key in thex-api-secret header on every request.
Your merchant API secret key, provided by CBE or your Star-Pay merchant dashboard.
How to include it
Add thex-api-secret header to every API call:
Example request
cURL
Bearer JWT tokens
Some Star-Pay flows also use a Bearer JWT in theAuthorization header. When a session token is issued, include it as follows:
cURL
Check the specific endpoint documentation to determine whether a Bearer JWT is required in addition to the
x-api-secret header.Security best practices
Follow these practices to keep your integration secure:Use environment variables
Store your API secret in an environment variable (
STARPAY_API_SECRET) rather than hardcoding it in source code.Keep secrets server-side
Only make Star-Pay API calls from your backend server. Never call the API directly from a browser or mobile client where the secret could be extracted.
Rotate keys when compromised
If you suspect your secret key has been leaked, rotate it immediately from the CBE merchant dashboard and update your environment configuration.