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
| Prefix | Environment | Usage |
|---|---|---|
cp_test_ | Test | Development and integration testing |
cp_live_ | Live | Production payment processing |
Available Scopes
| Scope | Grants | Requires KYC-verified? |
|---|---|---|
balance:read | GET /v1/balance | No |
profile:read | GET /v1/profile | No |
transactions:read | GET /v1/transactions | No |
pages:read | List/get your payment pages | No |
pages:write | Create/update payment pages | Yes |
payouts:read | List payouts / check status | No |
payouts:write | Send a payout | Yes |
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>"