Core
API Keys
Create, list, and revoke CamelPay API keys. Keys are scoped and environment-specific.
API keys authenticate every payment request. You can manage them from the dashboard or via the API.
Create a Developer App
First, create a developer app to group your API keys:
bash
curl -X POST https://api.camelpay.in/developers/apps \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "My Payment Integration",
"description": "Campus delivery service payments",
"environment": "test"
}'Generate an API Key
bash
curl -X POST https://api.camelpay.in/developers/keys \
-H "Authorization: Bearer <your_jwt_token>" \
-H "Content-Type: application/json" \
-d '{
"app_id": "app_abc123def456",
"key_name": "Production Payment Key",
"scopes": ["payments:read", "payments:write"],
"expires_in_days": 90
}'The plain_text_key is only shown ONCE. Copy it immediately and store it securely.
Key Formats
| Prefix | Environment | Usage |
|---|---|---|
cp_test_ | Sandbox | Testing and development |
cp_live_ | Production | Live payment processing |
Available Scopes
| Scope | Description |
|---|---|
payments:read | View payment status and history |
payments:write | Initiate new payments |
payouts:write | Create payout requests |
wallets:read | View wallet balance and transactions |
List Your API Keys
bash
curl -X GET "https://api.camelpay.in/developers/keys?app_id=app_abc123def456" \
-H "Authorization: Bearer <your_jwt_token>"Revoke an API Key
bash
curl -X DELETE https://api.camelpay.in/developers/keys/key_xyz789 \
-H "Authorization: Bearer <your_jwt_token>"