Overview
Caibo IPG uses a two-tier authentication system where merchants first authenticate through the Control Panel to generate API keys, then use those API keys to access payment APIs. This approach provides secure access management while maintaining ease of integration.Authentication Architecture
Control Panel Authentication
The Caibo Control Panel (merchant back office) handles user authentication and API key management. Merchants log into the control panel to manage their account and generate API keys for programmatic access.API Key Authentication
Generated API keys are used to authenticate requests to all Caibo IPG payment APIs. These keys are included in HTTP headers for secure API access.Getting Started
Step 1: Access the Control Panel
Navigate to the Caibo Control Panel and log in with your merchant credentials. Login Endpoint:POST /auth/login
Request:
Step 2: Generate API Key
Once logged into the control panel, navigate to your profile section to generate or regenerate your API key. API Key Generation Endpoint:PUT /users/{userId}/apikey
Headers:
Step 3: Use API Key in Payment Requests
Include your API key in all payment API requests using theX-API-Key header.
Example Payment Request:
API Key Management
Key Types
Caibo provides different API key types based on your environment:- Live Keys:
caibo_live_sk_*- For production transactions - Test Keys:
caibo_test_sk_*- For development and testing
Security Best Practices
Key Storage
- Never expose API keys in client-side code or public repositories
- Store keys securely in environment variables or secure configuration
- Use different keys for different environments (development, staging, production)
Key Rotation
- Regenerate keys regularly for enhanced security
- Update all integrations when rotating keys
- Monitor key usage through the control panel
Access Control
- Limit key permissions to required operations only
- Monitor API key usage for suspicious activity
- Revoke compromised keys immediately
Regenerating API Keys
To regenerate your API key:- Log into the Control Panel
- Navigate to Profile Settings
- Click “Re-generate API Key”
- Confirm the action (old key will be invalidated)
- Update your integrations with the new key
Authentication Headers
Required Headers
All Caibo IPG API requests must include the following headers:Optional Headers
Additional headers for enhanced functionality:Error Handling
Authentication Errors
401 Unauthorized
- Invalid or expired API key
- Missing
X-API-Keyheader - Revoked or regenerated key
- Verify your API key is correct
- Check that the key hasn’t been regenerated
- Ensure the header is properly formatted
403 Forbidden
- API key lacks required permissions
- Account limitations or restrictions
- Suspended merchant account
- Contact support to verify account status
- Check account permissions in control panel
- Ensure compliance with terms of service
Testing Authentication
Test Your API Key
Use this simple endpoint to verify your API key is working:Webhook Authentication
For webhook endpoints, Caibo includes signature verification:Integration Examples
Node.js Example
PHP Example
Python Example
Troubleshooting
Common Issues
API Key Not Working
- Verify key format - Should start with
caibo_live_sk_orcaibo_test_sk_ - Check environment - Ensure using correct key for environment
- Confirm regeneration - Verify key hasn’t been regenerated recently
Control Panel Access Issues
- Password reset - Use forgot password if needed
- Account status - Verify account is active and in good standing
- Browser issues - Clear cache and cookies, try different browser
Integration Problems
- Header format - Ensure
X-API-Keyheader is correctly formatted - HTTPS required - All requests must use HTTPS
- Content-Type - Include
application/jsonfor POST requests
Getting Help
If you encounter authentication issues:- Check API Status - Visit status.caibo.digital for service status
- Review Logs - Check your application logs for detailed error messages
- Contact Support - Reach out to support@caibo.digital with:
- Your merchant ID
- Error messages and timestamps
- Steps to reproduce the issue
Next Steps
Payment Requests
Create your first payment request
Webhooks Setup
Configure real-time payment notifications
API Reference
Explore the complete API documentation
Control Panel Guide
Learn more about the merchant control panel

