Overview
The CashQ Payin API uses Basic Authentication with your API Key and PIN from Approvely Gateway.Getting Your Credentials
1
Access Control Panel
Log in to the Approvely Gateway Control Panel:Sandbox: https://sandbox.approvelygateway.com/Production: Contact support for production access
2
Navigate to Sources
Go to Control Panel → Sources
3
Get API Credentials
You’ll find three important credentials:
- API Key - Used for API authentication
- Tokenization Token - Used for frontend card tokenization
- PIN - Used with API Key for authentication
Keep these credentials secure. You’ll need the API Key and PIN to authenticate API requests.
Authentication Method
The Payin API uses HTTP Basic Authentication. You need to:- Concatenate your API Key and PIN with a colon:
[API_KEY]:[PIN] - Encode the string to Base64
- Add it to the
Authorizationheader asBasic [base64_string]
Example
Implementation Examples
Environment URLs
Use the appropriate base URL for your environment:| Environment | Base URL |
|---|---|
| Sandbox | https://api.sandbox.approvelygateway.com |
| Production | https://banking.cashqbot.com |
Sandbox Login
For testing in the sandbox environment:- URL: https://sandbox.approvelygateway.com/
- Login: Contact support for credentials
- Password: Contact support for credentials
Security Best Practices
Store Securely
Never hardcode credentials in your source code. Use environment variables or secure vaults.
Use HTTPS Only
All API requests must use HTTPS. Never send credentials over HTTP.
Separate Environments
Use different credentials for sandbox and production. Never use production credentials in testing.
Rotate Regularly
Periodically rotate your API credentials for enhanced security.
Testing Authentication
Test your authentication setup with a simple request:401 Unauthorized response.
Common Authentication Errors
401 Unauthorized
401 Unauthorized
403 Forbidden
403 Forbidden
Cause: Valid credentials but insufficient permissionsSolution:
- Contact support to verify your account permissions
- Ensure your account is active and in good standing
Invalid Base64 Encoding
Invalid Base64 Encoding
Cause: Credentials not properly encodedSolution:
- Verify the format:
[API_KEY]:[PIN] - Use a proper Base64 encoding function
- Don’t include extra spaces or line breaks
