Skip to main content

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..."
}
FieldTypeRequiredDescription
license_keystringYesJWT license key to activate

Response (200):

{
"license_key": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Error Responses:

CodeDescription
400Invalid license key format
409License 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

FieldTypeDescription
idstringUnique license ID (JWT jti claim)
statusstringactive, expired, or invalid
issued_tostringEntity the license was issued to (JWT sub claim)
issuerstringEntity that issued the license (JWT iss claim)
issued_attimestampWhen the license was issued
expires_attimestampWhen the license expires
capabilitiesstring[]List of granted permissions
metadatamapAdditional 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
}