API key types
Accelebit issues three key types per merchant account:
All API requests require a secret key. The public key is not accepted as authentication.
Authenticating requests
Include your secret key in theX-API-Key header on every request:
401 Unauthorized response:
Key management
Manage your API keys from the Dashboard:- View keys — Secret keys are shown once at creation. Store them securely immediately; you cannot retrieve them again.
- Rotate keys — Generate a new key and revoke the old one. Both keys remain valid during a grace period so you can update your integration without downtime.
- Revoke keys — Immediately disable a compromised key. Any in-flight requests using that key will be rejected.
Security best practices
- Never expose your secret key in client-side code, Git repositories, or application logs.
- Use environment variables to inject keys into your application at runtime — for example, store the key as
ACCELEBIT_SECRET_KEYand read it fromprocess.envor your secrets manager. - Restrict access within your team. Only backend engineers should have access to live secret keys.
- Rotate keys periodically and immediately if you suspect a compromise.
- Use test keys (
smtgw_sk_test_) in development and staging. Test keys cannot process real payments.
Idempotency
AllPOST endpoints require an Idempotency-Key header. This guarantees that retrying a failed or timed-out request will not create a duplicate transaction.
- If you retry a request with the same idempotency key, the API returns the original response without reprocessing the payment.
- Idempotency keys expire after 24 hours. After expiry, the same key can be reused for a new request.
Merchant scoping
All resources — payments, refunds, and customers — are automatically scoped to the merchant account associated with the API key you use. You cannot read or modify another merchant’s data, regardless of the key permissions.Rate limits
The API enforces rate limits per API key:
When you exceed the limit, the API returns a
429 Too Many Requests response with a Retry-After header indicating how many seconds to wait before retrying. Implement exponential backoff in your integration to handle this gracefully.