SikaaHub API Health Check

Developer Documentation

Authentication

Authentication

Protected endpoints require:

Authorization: Bearer {access_token}
Content-Type: application/json
Accept: application/json
X-Device-ID: {device-id}
X-App-Version: {app-version}

Access tokens are HMAC-signed JWTs with a short TTL configured by JWT_ACCESS_TTL. Refresh tokens are random opaque secrets, stored as SHA-256 hashes in refresh_tokens, and rotated on every refresh.

New customer and merchant accounts start as pending_verification. Use POST /auth/verify-phone with the OTP code before login and financial access.

Financial POST endpoints also require:

Idempotency-Key: {unique-client-generated-key}

The same user, endpoint, and idempotency key can only be processed once. If the same request body is repeated, the original response is returned. If the same key is reused with a different body, the API returns 409 IDEMPOTENCY_CONFLICT.

Roles:

Passwords and transaction PINs are hashed separately with password_hash(). Hashes are never returned.

Transaction PIN confirmation is required for: