License Service
Manages system license activation, validation, and lifecycle.
Activate License
POST /v1/license/activate
Activates a license key for the system.
Request Body:
{
"license_key": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
| Field | Type | Required | Description |
|---|---|---|---|
license_key | string | Yes | JWT license key to activate |
Response (200):
{
"license_key": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Error Responses:
| Code | Description |
|---|---|
| 400 | Invalid license key format |
| 409 | License already activated |
Get License
GET /v1/license
Retrieves information about the currently active license.
Response (200):
{
"license": {
"id": "jti_abc123",
"status": "active",
"issued_to": "partner_bank",
"issuer": "kulpay",
"issued_at": "2025-01-01T00:00:00Z",
"expires_at": "2026-01-01T00:00:00Z",
"capabilities": [
"customer:read",
"customer:write",
"kyc:read",
"kyc:write",
"transaction:create"
],
"metadata": {
"partner_name": "Bank Partner",
"environment": "production"
}
}
}
License Object
| Field | Type | Description |
|---|---|---|
id | string | Unique license ID (JWT jti claim) |
status | string | active, expired, or invalid |
issued_to | string | Entity the license was issued to (JWT sub claim) |
issuer | string | Entity that issued the license (JWT iss claim) |
issued_at | timestamp | When the license was issued |
expires_at | timestamp | When the license expires |
capabilities | string[] | List of granted permissions |
metadata | map | Additional key-value metadata |
Error Response (404):
{
"code": "not_found",
"message": "No active license found"
}
Deactivate License
POST /v1/license/deactivate
Deactivates the current system license.
Request Body: Empty {}
Response (200):
{
"success": true
}
Validate License
POST /v1/license/validate
Validates a license key without activating it. Useful for checking a key before deployment.
Request Body:
{
"license_key": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Response (200):
{
"valid": true,
"message": "License is valid",
"license": {
"id": "jti_abc123",
"status": "active",
"issued_to": "partner_bank",
...
}
}
Invalid License Response:
{
"valid": false,
"message": "License key has expired",
"license": null
}