API Key Authentication
All CashQ API requests require authentication using an API Key. Your API key identifies your merchant account and authorizes access to the CashQ platform.How to Authenticate
Include your API key in the request header of every API call:Example Request
Getting Your API Credentials
Sandbox Credentials
To get credentials for the Sandbox environment:- Fill out the Sandbox Request Form
- You’ll receive your API key via email within 24 hours
- Use the sandbox base URL:
https://api.cashqbot.com/
Production Credentials
When you’re ready to go live:- Contact our support team at [email protected]
- We’ll provide your production environment credentials
- You’ll receive a separate API key for production use
Separate Credentials Per Environment
You will have separate API credentials for each environment:| Environment | Purpose | How to Get |
|---|---|---|
| Sandbox | Testing and development | Request via form |
| Production | Live transactions | Contact support |
Data created or modified in each environment will not affect the other, and data cannot be transferred between environments.
Authentication Errors
If your API key is missing or invalid, you’ll receive an error response:Common Authentication Issues
Missing API-KEY header
Missing API-KEY header
Problem: Request doesn’t include the
API-KEY header.Solution: Ensure you’re including the header in every request:Invalid API key
Invalid API key
Problem: The API key is incorrect or has been revoked.Solution:
- Verify you’re using the correct API key
- Check if you’re using the right key for the environment (sandbox vs production)
- Contact support if you believe your key should be valid
Wrong environment
Wrong environment
Problem: Using a sandbox key with production URL or vice versa.Solution: Ensure your API key matches the environment:
- Sandbox key →
https://api.cashqbot.com/ - Production key → Production URL (provided by support)
Best Practices
Use Environment Variables
Store API keys in environment variables, not in your code:
Separate Keys
Always use different API keys for sandbox and production environments.
Secure Storage
Never commit API keys to version control or share them publicly.
Regular Rotation
Rotate your API keys periodically for enhanced security.
Next Steps
Make Your First Request
Follow our quickstart guide to make your first authenticated API request.
