---
title: "Update Subscription Autopay Endpoint"
method: POST
path: "/miniapp/subscription/autopay"
tags: ["miniapp"]
---

# Update Subscription Autopay Endpoint

`POST /miniapp/subscription/autopay`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/docs/miniapp/subscription/autopay/post.ts> (a function with typed inputs; its response is checked against the schema)

Обновление настройки автоплатежа для подписки.

## Request body

- MiniAppSubscriptionAutopayRequest
  - `initData` string, required
  - `subscriptionId` integer, nullable
  - `enabled` boolean, nullable
  - `daysBefore` integer, nullable

## Response `200`

Successful Response

- MiniAppSubscriptionAutopayResponse
  - `success` boolean
  - `subscriptionId` integer, nullable
  - `autopay_enabled` boolean
  - `autopay_days_before` integer, nullable
  - `autopay_days_options` integer[]
  - `autopay` MiniAppSubscriptionAutopay
    - `enabled` boolean
    - `autopay_enabled` boolean, nullable
    - `autopay_enabled_at` string, date-time, nullable
    - `days_before` integer, nullable
    - `autopay_days_before` integer, nullable
    - `default_days_before` integer, nullable
    - `autopay_days_options` integer[]
    - `days_options` integer[]
    - `options` integer[]
  - `autopay_settings` MiniAppSubscriptionAutopay
    - `enabled` boolean
    - `autopay_enabled` boolean, nullable
    - `autopay_enabled_at` string, date-time, nullable
    - `days_before` integer, nullable
    - `autopay_days_before` integer, nullable
    - `default_days_before` integer, nullable
    - `autopay_days_options` integer[]
    - `days_options` integer[]
    - `options` integer[]

## Other responses

- `422`: Validation Error

## Changes

- **2026-11-03** `2360876ff9c5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/changes/miniapp/subscription/autopay/post.md)

---

[API](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api.md) - [All operations](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bedolagam/apis/remnawave-bot-admin-api/revisions/2360876ff9c5?raw)
