> ## Documentation Index
> Fetch the complete documentation index at: https://ownpay.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> OwnPay is licensed under AGPL-3.0 and is completely free - no licensing fees.
> Production docs URL: https://ownpay.org/docs - append .md to any page URL for clean markdown.
> OwnPay requires PHP 8.3+, MySQL/MariaDB, and Redis.
> MCP server available at https://ownpay.org/docs/mcp for programmatic documentation queries.
> Use root-relative links (e.g. /quickstart) for internal navigation - do NOT include /docs prefix.
> Plugin development: consult /developer/plugin-types/ pages for correct interfaces and manifests.

# System Health Check

> Performs a system-wide diagnostic check. Checks database connectivity, active gateways configuration,
and counts the active paired mobile companion devices (devices that posted a heartbeat within the last 10 minutes).




## OpenAPI

````yaml /api/merchant_api.yaml get /health
openapi: 3.1.0
info:
  title: OwnPay Merchant API
  description: >
    The OwnPay Merchant API enables merchants to programmatically interface with
    their white-labeled payment gateway.

    It exposes endpoints to initiate payments (creating payment intents), query
    transaction statuses, issue full or partial refunds, manage customer
    profiles securely in compliance with GDPR and OWASP, generate and revoke API
    keys, and test/audit webhook delivery attempts.


    ### Authentication

    Authentication is performed via HTTP Bearer token in the `Authorization`
    header.

    ```http

    Authorization: Bearer your_api_key_here

    ```

    API keys carry specific privilege scopes (e.g., `read`, `write`, `admin`).

    Some administrative operations (like listing/generating API keys) require
    **both** `write` and `admin` scopes, as well as passing a valid platform
    super-administrator's email address in the `X-Super-Admin-Email` header for
    safety.
  version: 1.0.0
servers:
  - url: https://{brand_domain}/api/v1
    description: Sandbox or Production white-labeled brand gateway API server.
    variables:
      brand_domain:
        default: ownpay.org
        description: The custom domain configured for your white-labeled brand.
security:
  - BearerAuth: []
paths:
  /health:
    get:
      summary: System Health Check
      description: >
        Performs a system-wide diagnostic check. Checks database connectivity,
        active gateways configuration,

        and counts the active paired mobile companion devices (devices that
        posted a heartbeat within the last 10 minutes).
      operationId: checkSystemHealth
      responses:
        '200':
          description: System is fully operational and healthy.
          headers:
            X-API-Version:
              schema:
                type: string
              description: The active application core version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
        '503':
          description: System is degraded (e.g. database connectivity has failed).
          headers:
            X-API-Version:
              schema:
                type: string
              description: The active application core version.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthCheckResponse'
components:
  schemas:
    HealthCheckResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            status:
              type: string
              enum:
                - healthy
                - degraded
              example: healthy
            version:
              type: string
              example: 0.1.0
            db:
              type: string
              enum:
                - connected
                - error
              example: connected
            mobile:
              type: object
              properties:
                connected:
                  type: boolean
                  description: >-
                    True if at least one paired device heartbeat was recorded
                    within 10 minutes.
                  example: true
                active_devices:
                  type: integer
                  description: >-
                    Total count of active paired companion devices under status
                    active.
                  example: 2
            gateways:
              type: integer
              description: Count of active payment gateways configured.
              example: 3
            customers:
              type: integer
              description: Total customers registered.
              example: 142
            time:
              type: string
              format: date-time
              example: '2026-06-23T14:15:45Z'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Provide the Bearer API Key generated for your brand.

````

## Related topics

- [Node.js SDK - TypeScript-First Payment Integration](/docs/developer/integration/nodejs.md)
- [Verify Custom Domain](/docs/api-reference/verify-custom-domain.md)
- [Create Customer](/docs/api-reference/create-customer.md)
- [Retrieve Transaction](/docs/api-reference/retrieve-transaction.md)
- [List Transactions](/docs/api-reference/list-transactions.md)
