Authorization header for every server-side request.
Keep your secret key on your backend server. Never expose it in frontend code, mobile apps, Git repositories, or public logs.
API keys
Pasteaza issues separate keys for test mode and live mode. Use test keys while you build and live keys when you are ready to process real transactions.| Key type | Test mode | Live mode | Use |
|---|---|---|---|
| Public key | pk_test_xxxxxxxxxxxxxxxxx | pk_live_xxxxxxxxxxxxxxxxx | Client-side integrations and checkout components |
| Secret key | sk_test_xxxxxxxxxxxxxxxxx | sk_live_xxxxxxxxxxxxxxxxx | Backend API requests |
Authenticate a request
Send your secret key as a bearer token in theAuthorization header.
Choose the correct environment
Use a test secret key for sandbox requests. Use a live secret key only when you want to process real transactions.
Example request
Test mode
Use yoursk_test_ key to create and test payments without moving real funds. Requests made with test keys run in the sandbox environment.
Live mode
Use yoursk_live_ key to process real transactions. Store your live secret key securely and restrict access to trusted backend services only.
Related security features
Webhook verification
Verify the
X-Pasteaza-Signature header before trusting webhook payloads.Idempotency
Use the
Idempotency-Key header to prevent duplicate requests.Security best practices
- Keep secret keys out of frontend and mobile applications.
- Store API credentials in a secure secrets manager or encrypted environment variables.
- Rotate API keys periodically and after any suspected exposure.
- Verify every webhook signature before updating transaction state.
- Use HTTPS for every request to the Pasteaza API.