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

# Subscriptions Overview

> Manage user premium subscriptions, RevenueCat mobile receipts, and feature gating.

# Subscriptions Overview

LearnWay Premium grants unlimited access to Specialization learning paths, priority AI tutoring, custom tournament lobbies, and fee discounts.

***

## Get Current User Subscription

Returns the active subscription state for the authenticated user.

### Endpoint

```http theme={null}
GET /api/v2/subscriptions/me
```

### Headers

```http theme={null}
Authorization: Bearer <jwt_access_token>
```

### Response (200 OK - Active Subscription)

```json theme={null}
{
  "success": true,
  "data": {
    "id": "sub-uuid-1",
    "status": "ACTIVE",
    "plan": "ANNUAL",
    "startsAt": "2026-01-01T00:00:00.000Z",
    "expiresAt": "2027-01-01T00:00:00.000Z",
    "isAutoRenewing": true,
    "provider": "REVENUECAT"
  }
}
```

### Response (200 OK - Free Tier User)

```json theme={null}
{
  "success": true,
  "data": null,
  "message": "User does not have an active subscription"
}
```

***

## In-App Purchase Sync (RevenueCat)

Mobile clients purchase subscriptions through Apple App Store or Google Play Store, and RevenueCat webhooks sync status with the backend automatically via `/api/v2/webhooks/revenuecat`.
