<!-- ZenPays documentation · https://docs.zenpays.com/docs/rest-api/endpoints/health/health-check -->

# Health Check Endpoints

Health check endpoints for monitoring service status.

## Basic Health Check

<EndpointHeader verb="GET" path="/health" />

Returns basic service health status. No authentication required.

### Response

```json
{
  "status": "ok",
  "timestamp": "2024-01-15T10:30:00.000Z"
}
```

---

## Readiness Probe

<EndpointHeader verb="GET" path="/ready" />

Kubernetes readiness probe. Returns 200 if service is ready to accept traffic.

### Response

```json
{
  "status": "ready",
  "checks": {
    "database": "ok",
    "cache": "ok",
    "queue": "ok"
  }
}
```

---

## Liveness Probe

<EndpointHeader verb="GET" path="/live" />

Kubernetes liveness probe. Returns 200 if service is alive.

### Response

```json
{
  "status": "alive",
  "uptime": 86400
}
```

---

## Service Info

<EndpointHeader verb="GET" path="/info" />

Returns service version and build information.

### Response

```json
{
  "service": "zenpay-merchant-service",
  "version": "1.0.0",
  "environment": "production",
  "buildTime": "2024-01-15T00:00:00.000Z"
}
```

<CodeRail>

## Examples

<Tabs groupId="language">
  <TabItem value="curl" label="cURL" default>

```bash
# Basic health check
curl -X GET "https://api.zenpays.com/health"

# Readiness probe
curl -X GET "https://api.zenpays.com/ready"

# Liveness probe
curl -X GET "https://api.zenpays.com/live"

# Service info
curl -X GET "https://api.zenpays.com/info"
```

  </TabItem>
</Tabs>

</CodeRail>

## HTTP Status Codes

| Status | Meaning |
|--------|---------|
| `200` | Service is healthy/ready |
| `503` | Service is unhealthy/not ready |
