Documentation Index
Fetch the complete documentation index at: https://docs.caibo.digital/llms.txt
Use this file to discover all available pages before exploring further.
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. For browser-side flows (the embedded checkout iframe), the API key is never sent to the browser. Instead the merchant backend exchanges it for a short-lived checkout session token scoped to a single payment request. See Checkout Session Tokens below.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 server-to-server requests to Caibo IPG payment APIs. These keys are included in HTTP headers for secure API access. TheapiKey is a long-lived bearer secret and must never appear in browser URLs, client-side code, or any value that can leave your server.
Checkout Session Token Authentication
For the embedded checkout iframe — where the merchantapiKey cannot be used directly — your backend mints a short-lived (15-minute) checkout session token that is bound to a single payment request. The browser uses that token to authenticate against a small allow-list of endpoints. See Checkout Session Tokens.
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
Checkout Session Tokens (Browser-Side Flows)
The embedded checkout iframe runs in the customer’s browser, where the merchantapiKey cannot be used directly — leaking it would compromise the entire account. To authenticate the iframe safely, your backend exchanges the apiKey for a short-lived, scoped token:
| Property | Merchant apiKey | Checkout session token |
|---|---|---|
| Lifetime | Long-lived (until rotated) | 15 minutes |
| Scope | Full merchant API | One payment request + a small endpoint allow-list |
| Where to send it | X-API-Key header, server-to-server | X-Checkout-Token header, or ?token= in iframe URL |
| Can it mint more tokens? | n/a | No |
Minting a Token
Your backend calls the mint endpoint after creating the payment request:{ requestId, token } to the browser (over your own authenticated channel) and the frontend constructs:
src: a leak only compromises one payment request for 15 minutes, not the whole account.
For the full reference (endpoint behavior, response shape, allow-listed endpoints, error codes, lifecycle), see the Mint a Checkout Session Token page.
Authentication Headers
Required Headers (server-to-server)
Most server-to-server Caibo IPG API requests must include the following headers:Required Headers (embedded checkout)
Requests originating from inside the embedded checkout iframe authenticate with a checkout session token instead. The Caibo payment page sets this header automatically once it picks up?token= from the iframe URL; you only need to set it manually if you call the API from a non-browser client using a token.
Exactly one of
X-API-Key or X-Checkout-Token is expected per request. If both are present, the checkout token takes precedence and the request is treated as a scoped (checkout_session) call.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

