Skip to main content
POST
/
users
/
{user_id}
/
balance
Update Balance
curl --request POST \
  --url http://localhost:8080/users/{user_id}/balance \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount_kopeks": 123,
  "description": "Корректировка через веб-API",
  "create_transaction": true
}
'
{
  "id": 123,
  "status": "<string>",
  "language": "<string>",
  "balance_kopeks": 123,
  "balance_rubles": 123,
  "has_had_paid_subscription": true,
  "has_made_first_topup": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "telegram_id": 123,
  "username": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "referral_code": "<string>",
  "referred_by_id": 123,
  "last_activity": "2023-11-07T05:31:56Z",
  "promo_group": {
    "id": 123,
    "name": "<string>",
    "server_discount_percent": 123,
    "traffic_discount_percent": 123,
    "device_discount_percent": 123,
    "apply_discounts_to_addons": true
  },
  "subscription": {
    "id": 123,
    "status": "<string>",
    "actual_status": "<string>",
    "is_trial": true,
    "start_date": "2023-11-07T05:31:56Z",
    "end_date": "2023-11-07T05:31:56Z",
    "traffic_limit_gb": 123,
    "traffic_used_gb": 123,
    "device_limit": 123,
    "autopay_enabled": true,
    "autopay_days_before": 123,
    "subscription_url": "<string>",
    "subscription_crypto_link": "<string>",
    "connected_squads": [
      "<string>"
    ]
  }
}

Path Parameters

user_id
integer
required

Body

application/json
amount_kopeks
integer
required
description
string | null
default:Корректировка через веб-API
create_transaction
boolean
default:true

Response

Successful Response

id
integer
required
status
string
required
language
string
required
balance_kopeks
integer
required
balance_rubles
number
required
has_had_paid_subscription
boolean
required
has_made_first_topup
boolean
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
telegram_id
integer | null
username
string | null
first_name
string | null
last_name
string | null
referral_code
string | null
referred_by_id
integer | null
last_activity
string<date-time> | null
promo_group
PromoGroupSummary · object
subscription
SubscriptionSummary · object