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

PrefixEnvironmentUsage
cp_test_SandboxTesting and development
cp_live_ProductionLive payment processing

Available Scopes

ScopeDescription
payments:readView payment status and history
payments:writeInitiate new payments
payouts:writeCreate payout requests
wallets:readView 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>"