APIAPI Overview

API Overview

This API provides endpoints for managing projects, users, subscriptions, payments, and related resources. All endpoints require authentication unless explicitly specified otherwise.

Authentication

Include your authentication token in the Authorization header:

Authorization: Bearer YOUR_TOKEN

Language Selection

Specify the language for translated messages by sending an Accept-Language header:

Accept-Language: bg

If the header is omitted, English (en) is used.

Common Response Format

All API responses follow this format:

{
  "request_id": "uuid",
  "method": "HTTP_METHOD",
  "path": "/api/path",
  "code": 200,
  "data": {} // or [] for list responses
}

Error Responses

Error responses follow this format:

{
  "request_id": "uuid",
  "method": "HTTP_METHOD",
  "path": "/api/path",
  "code": 400,
  "error": {
    "message": "Error description",
    "code": "ERROR_CODE"
  }
}

Error Codes

CodeDescription
400Bad Request - Invalid input parameters
401Unauthorized - Missing or invalid authentication
404Not Found - Resource doesn't exist
422Validation Error - Invalid data format
500Server Error - Internal server error

Pagination

List endpoints support pagination using the following query parameters:

ParameterDescription
limitNumber of items per page (default varies by endpoint)
offsetNumber of items to skip (default: 0)

Live Updates (WebSocket)

For real-time updates, connect to the WebSocket endpoint using a Socket.IO client:

  • Path: wss://<api-host>/live-updates/{project_id}
  • Purpose: Push realtime events such as payment request updates
  • Client: Requires Socket.IO client library (available for JavaScript, Python, PHP, etc.)

Health Check

  • GET /ping
  • No authentication required
  • Returns: { "ok": true }

Development Notes

  1. All endpoints are versioned. The version prefix may change in future releases.
  2. The API supports both gzip and brotli compression for responses.

Last updated: