Core

API Keys

Create, list, and revoke CamelPay API keys. Keys are scoped and environment-specific.

API keys authenticate every request under /v1/*. You can manage them from the dashboard or via the API — creating an app and a key both require a JWT.

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": ["pages:write", "pages:read", "transactions:read", "balance:read"],
    "expires_in_days": 90
  }'
The plain_text_key is only shown ONCE (on create and on rotate). Copy it immediately and store it securely — it cannot be retrieved again.

Key Formats

PrefixEnvironmentUsage
cp_test_TestDevelopment and integration testing
cp_live_LiveProduction payment processing

Available Scopes

ScopeGrantsRequires KYC-verified?
balance:readGET /v1/balanceNo
profile:readGET /v1/profileNo
transactions:readGET /v1/transactionsNo
pages:readList/get your payment pagesNo
pages:writeCreate/update payment pagesYes
payouts:readList payouts / check statusNo
payouts:writeSend a payoutYes
A key without the right scope for an endpoint gets a 403 insufficient scopes response — grant only what your integration actually needs.

List Your API Keys

bash
curl -X GET "https://api.camelpay.in/developers/keys?app_id=app_abc123def456" \
  -H "Authorization: Bearer <your_jwt_token>"

Rotate an API Key

Issues a new key with the same scopes and immediately revokes the old one:

bash
curl -X POST https://api.camelpay.in/developers/keys/key_xyz789/rotate \
  -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>"