Skip to main content
POST
/
miniapp
/
subscription
Get Subscription Details
curl --request POST \
  --url http://localhost:8080/miniapp/subscription \
  --header 'Content-Type: application/json' \
  --data '
{
  "initData": "<string>"
}
'
{
  "user": {
    "display_name": "<string>",
    "status": "<string>",
    "subscription_status": "<string>",
    "subscription_actual_status": "<string>",
    "status_label": "<string>",
    "traffic_used_label": "<string>",
    "traffic_limit_label": "<string>",
    "telegram_id": 123,
    "username": "<string>",
    "first_name": "<string>",
    "last_name": "<string>",
    "language": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "device_limit": 123,
    "traffic_used_gb": 0,
    "traffic_limit_gb": 123,
    "lifetime_used_traffic_gb": 0,
    "has_active_subscription": false,
    "promo_offer_discount_percent": 0,
    "promo_offer_discount_expires_at": "2023-11-07T05:31:56Z",
    "promo_offer_discount_source": "<string>",
    "is_daily_tariff": false,
    "is_daily_paused": false,
    "daily_tariff_name": "<string>",
    "daily_price_kopeks": 123,
    "daily_price_label": "<string>",
    "daily_next_charge_at": "2023-11-07T05:31:56Z"
  },
  "subscription_type": "<string>",
  "success": true,
  "subscription_id": 123,
  "remnawave_short_uuid": "<string>",
  "traffic_purchases": [
    {
      "id": 123,
      "traffic_gb": 123,
      "expires_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "days_remaining": 123,
      "progress_percent": 123
    }
  ],
  "subscription_url": "<string>",
  "hide_subscription_link": false,
  "subscription_crypto_link": "<string>",
  "subscription_purchase_url": "<string>",
  "links": [
    "<string>"
  ],
  "ss_conf_links": {},
  "connected_squads": [
    "<string>"
  ],
  "connected_servers": [
    {
      "uuid": "<string>",
      "name": "<string>"
    }
  ],
  "connected_devices_count": 0,
  "connected_devices": [
    {
      "hwid": "<string>",
      "platform": "<string>",
      "device_model": "<string>",
      "app_version": "<string>",
      "last_seen": "<string>",
      "last_ip": "<string>"
    }
  ],
  "happ": {},
  "happ_link": "<string>",
  "happ_crypto_link": "<string>",
  "happ_cryptolink_redirect_link": "<string>",
  "happ_cryptolink_redirect_template": "<string>",
  "balance_kopeks": 0,
  "balance_rubles": 0,
  "balance_currency": "<string>",
  "transactions": [
    {
      "id": 123,
      "type": "<string>",
      "amount_kopeks": 123,
      "amount_rubles": 123,
      "is_completed": true,
      "created_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "payment_method": "<string>",
      "external_id": "<string>",
      "completed_at": "2023-11-07T05:31:56Z"
    }
  ],
  "promo_offers": [
    {
      "id": 123,
      "status": "<string>",
      "notification_type": "<string>",
      "offer_type": "<string>",
      "effect_type": "<string>",
      "discount_percent": 0,
      "bonus_amount_kopeks": 0,
      "bonus_amount_label": "<string>",
      "expires_at": "2023-11-07T05:31:56Z",
      "claimed_at": "2023-11-07T05:31:56Z",
      "is_active": false,
      "template_id": 123,
      "template_name": "<string>",
      "button_text": "<string>",
      "title": "<string>",
      "message_text": "<string>",
      "icon": "<string>",
      "test_squads": [
        {
          "uuid": "<string>",
          "name": "<string>"
        }
      ],
      "active_discount_expires_at": "2023-11-07T05:31:56Z",
      "active_discount_started_at": "2023-11-07T05:31:56Z",
      "active_discount_duration_seconds": 123
    }
  ],
  "promo_group": {
    "id": 123,
    "name": "<string>",
    "server_discount_percent": 0,
    "traffic_discount_percent": 0,
    "device_discount_percent": 0,
    "period_discounts": {},
    "apply_discounts_to_addons": true
  },
  "auto_assign_promo_groups": [
    {
      "id": 123,
      "name": "<string>",
      "threshold_kopeks": 123,
      "threshold_rubles": 123,
      "threshold_label": "<string>",
      "is_reached": false,
      "is_current": false,
      "server_discount_percent": 0,
      "traffic_discount_percent": 0,
      "device_discount_percent": 0,
      "period_discounts": {},
      "apply_discounts_to_addons": true
    }
  ],
  "total_spent_kopeks": 0,
  "total_spent_rubles": 0,
  "total_spent_label": "<string>",
  "autopay_enabled": false,
  "autopay_days_before": 123,
  "autopay_days_options": [
    123
  ],
  "autopay": {
    "enabled": false,
    "autopay_enabled": true,
    "autopay_enabled_at": "2023-11-07T05:31:56Z",
    "days_before": 123,
    "autopay_days_before": 123,
    "default_days_before": 123,
    "autopay_days_options": [
      123
    ],
    "days_options": [
      123
    ],
    "options": [
      123
    ]
  },
  "autopay_settings": {
    "enabled": false,
    "autopay_enabled": true,
    "autopay_enabled_at": "2023-11-07T05:31:56Z",
    "days_before": 123,
    "autopay_days_before": 123,
    "default_days_before": 123,
    "autopay_days_options": [
      123
    ],
    "days_options": [
      123
    ],
    "options": [
      123
    ]
  },
  "branding": {
    "service_name": {},
    "service_description": {}
  },
  "faq": {
    "requested_language": "<string>",
    "language": "<string>",
    "is_enabled": true,
    "total": 0,
    "items": [
      {
        "id": 123,
        "title": "<string>",
        "content": "<string>",
        "display_order": 123
      }
    ]
  },
  "legal_documents": {
    "public_offer": {
      "requested_language": "<string>",
      "language": "<string>",
      "title": "<string>",
      "is_enabled": true,
      "content": "",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "service_rules": {
      "requested_language": "<string>",
      "language": "<string>",
      "title": "<string>",
      "is_enabled": true,
      "content": "",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    },
    "privacy_policy": {
      "requested_language": "<string>",
      "language": "<string>",
      "title": "<string>",
      "is_enabled": true,
      "content": "",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  },
  "referral": {
    "referral_code": "<string>",
    "referral_link": "<string>",
    "terms": {
      "minimum_topup_kopeks": 0,
      "minimum_topup_label": "<string>",
      "first_topup_bonus_kopeks": 0,
      "first_topup_bonus_label": "<string>",
      "inviter_bonus_kopeks": 0,
      "inviter_bonus_label": "<string>",
      "commission_percent": 0
    },
    "stats": {
      "invited_count": 0,
      "paid_referrals_count": 0,
      "active_referrals_count": 0,
      "total_earned_kopeks": 0,
      "total_earned_label": "<string>",
      "month_earned_kopeks": 0,
      "month_earned_label": "<string>",
      "conversion_rate": 0
    },
    "recent_earnings": [
      {
        "amount_kopeks": 0,
        "amount_label": "<string>",
        "reason": "<string>",
        "referral_name": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      }
    ],
    "referrals": {
      "total_count": 0,
      "has_next": false,
      "has_prev": false,
      "current_page": 1,
      "total_pages": 1,
      "items": [
        {
          "id": 123,
          "telegram_id": 123,
          "full_name": "<string>",
          "username": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "last_activity": "2023-11-07T05:31:56Z",
          "has_made_first_topup": false,
          "balance_kopeks": 0,
          "balance_label": "<string>",
          "total_earned_kopeks": 0,
          "total_earned_label": "<string>",
          "topups_count": 0,
          "days_since_registration": 123,
          "days_since_activity": 123,
          "status": "<string>"
        }
      ]
    }
  },
  "subscription_missing": false,
  "subscription_missing_reason": "<string>",
  "trial_available": false,
  "trial_duration_days": 123,
  "trial_status": "<string>",
  "trialPaymentRequired": false,
  "trialPriceKopeks": 123,
  "trialPriceLabel": "<string>",
  "salesMode": "classic",
  "currentTariff": {
    "id": 123,
    "name": "<string>",
    "traffic_limit_gb": 123,
    "traffic_limit_label": "<string>",
    "device_limit": 123,
    "servers_count": 123,
    "description": "<string>",
    "tier_level": 1,
    "is_unlimited_traffic": false,
    "monthly_price_kopeks": 0,
    "traffic_topup_enabled": false,
    "traffic_topup_packages": [
      {
        "gb": 123,
        "price_kopeks": 123,
        "price_label": "<string>",
        "original_price_kopeks": 123,
        "original_price_label": "<string>",
        "discount_percent": 0
      }
    ],
    "max_topup_traffic_gb": 0,
    "available_topup_gb": 123,
    "is_daily": false,
    "daily_price_kopeks": 0,
    "daily_price_label": "<string>"
  }
}

Body

application/json
initData
string
required

Response

Successful Response

user
MiniAppSubscriptionUser · object
required
subscription_type
string
required
success
boolean
default:true
subscription_id
integer | null
remnawave_short_uuid
string | null
traffic_purchases
MiniAppTrafficPurchase · object[]
subscription_url
string | null
subscription_purchase_url
string | null
connected_squads
string[]
connected_servers
MiniAppConnectedServer · object[]
connected_devices_count
integer
default:0
connected_devices
MiniAppDevice · object[]
happ
Happ · object
balance_kopeks
integer
default:0
balance_rubles
number
default:0
balance_currency
string | null
transactions
MiniAppTransaction · object[]
promo_offers
MiniAppPromoOffer · object[]
promo_group
MiniAppPromoGroup · object
auto_assign_promo_groups
MiniAppAutoPromoGroupLevel · object[]
total_spent_kopeks
integer
default:0
total_spent_rubles
number
default:0
total_spent_label
string | null
autopay_enabled
boolean
default:false
autopay_days_before
integer | null
autopay_days_options
integer[]
autopay
MiniAppSubscriptionAutopay · object
autopay_settings
MiniAppSubscriptionAutopay · object
branding
MiniAppBranding · object
faq
MiniAppFaq · object
referral
MiniAppReferralInfo · object
subscription_missing
boolean
default:false
subscription_missing_reason
string | null
trial_available
boolean
default:false
trial_duration_days
integer | null
trial_status
string | null
trialPaymentRequired
boolean
default:false
trialPriceKopeks
integer | null
trialPriceLabel
string | null
salesMode
string
default:classic
currentTariff
MiniAppCurrentTariff · object

Текущий тариф пользователя.