User Subscription

Retrieve the authenticated user's current subscription details including plan, status, and expiration.

Get User Subscription

Retrieve the current subscription details for the authenticated user, including the active plan, group information, status, duration, and device limits.

GET/api/v1/users/me/subscription

Get the authenticated user's active subscription

Authentication:Bearer Token

Response Fields

FieldTypeDescription
has_subscriptionbooleanWhether the user has any subscription
subscription.idintegerUnique subscription ID
subscription.plan_idintegerID of the subscribed plan
subscription.plan_namestringDisplay name of the plan (e.g., "Premium")
subscription.plan_tag_namestringInternal tag for the plan
subscription.group_idintegerServer group ID associated with the plan
subscription.group_namestringServer group name
subscription.group_tag_namestringInternal tag for the server group
subscription.statusstringSubscription status: active, expired, cancelled, suspended
subscription.durationintegerTotal subscription duration in days
subscription.expires_atstringISO 8601 expiration timestamp
subscription.days_remainingintegerNumber of days until expiration
subscription.max_devicesintegerMaximum simultaneous device connections allowed
curl -X GET https://api.orbai.world/api/v1/users/me/subscription \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
200Subscription details retrieved successfully
{
  "success": true,
  "data": {
    "has_subscription": true,
    "subscription": {
      "id": 5001,
      "plan_id": 3,
      "plan_name": "Premium",
      "plan_tag_name": "premium_monthly",
      "group_id": 2,
      "group_name": "Premium Servers",
      "group_tag_name": "premium_servers",
      "status": "active",
      "duration": 30,
      "expires_at": "2026-03-10T00:00:00Z",
      "days_remaining": 30,
      "max_devices": 10
    }
  }
}
200User has no active subscription
{
  "success": true,
  "data": {
    "has_subscription": false,
    "subscription": null
  }
}
401Authentication required
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or expired access token"
  }
}

Subscription Status Values

The status field can be one of:

  • active -- The subscription is valid and the user can connect to VPN servers.
  • expired -- The subscription has passed its expiration date. Renew to restore access.
  • cancelled -- The user has cancelled the subscription. It remains active until the expiration date.
  • suspended -- The subscription has been administratively suspended.

Auto-Renewal

To enable or disable automatic renewal for your subscription, use the Update Profile endpoint and set auto_renew to true or false.