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

# Изменить дату платежа

> Переносит дату следующего платежа активной подписки на дату или вперёд на количество дней.



## OpenAPI

````yaml PATCH /api/v1/bot/{bot}/subscriptions/{subscription}/renewal-date
openapi: 3.1.0
info:
  title: Zenedu API v1
  description: >-
    API for managing Telegram bots, subscribers, products, funnels, offers, and
    orders on the Zenedu platform. API v1 returns JSON by default; the Accept:
    application/json header is optional. File downloads return the file content,
    and 204 responses have no body. Errors returned by the application use JSON
    even when Accept is omitted.
  version: 1.0.0
servers:
  - url: https://app.zenedu.io
security:
  - bearerAuth: []
tags:
  - name: User
    description: Current user profile
  - name: Bots
    description: Bot management
  - name: Subscribers
    description: Subscriber management
  - name: Orders
    description: Order management
  - name: Products
    description: Product management
  - name: Funnels
    description: Funnel management
  - name: Offers
    description: Offer management
  - name: Links
    description: Link generation
  - name: Files
    description: File downloads
  - name: Zapier
    description: Zapier webhook management
  - name: Webhooks
    description: Account webhook subscriptions
  - name: Payment systems
    description: Account payment methods
  - name: Bot settings
    description: 'Bot configuration: email, branding, integrations, legal documents'
  - name: Commands
    description: Bot menu commands
  - name: Custom fields
    description: Subscriber custom fields
  - name: Tags
    description: Subscriber tags of the bot
  - name: Folders
    description: Folders for products, funnels, channels and groups
  - name: Slugs
    description: Public link slugs
  - name: Funnel links
    description: Subscription links of a funnel
  - name: Coupons
    description: Coupon management
  - name: Subscriptions
    description: Recurring subscription management
  - name: Tasks
    description: Student task review
  - name: Broadcasts
    description: Broadcast messages
  - name: Automations
    description: Event-based automations
  - name: Affiliate
    description: Affiliate program management
  - name: Shop
    description: Bot shop draft and publication
  - name: Channels
    description: Telegram channels connected to the bot
  - name: Groups
    description: Telegram groups connected to the bot
  - name: Mini-app
    description: Telegram mini app configuration
  - name: Web
    description: Web app configuration
  - name: Telegram files
    description: Telegram file attachments for steps and broadcasts
paths:
  /api/v1/bot/{bot}/subscriptions/{subscription}/renewal-date:
    patch:
      tags:
        - Subscriptions
      summary: Change next payment date
      description: >-
        Moves the next payment date of an active subscription, like «Change
        payment date» in the Subscriptions list: either to an exact date or
        forward by a number of days from the current payment date. The new date
        must be in the future. Subscriptions with charge retries in progress and
        cancelled subscriptions cannot be changed. Access to products and
        channels follows the subscription, so it is extended together with the
        payment date.
      operationId: changeSubscriptionRenewalDate
      parameters:
        - name: bot
          in: path
          required: true
          description: Bot ID
          schema:
            type: integer
        - name: subscription
          in: path
          required: true
          description: Subscription ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: Pass exactly one of renewal_date or days.
              properties:
                renewal_date:
                  type: string
                  format: date-time
                  description: >-
                    New next payment date (ISO 8601; a timezone offset is
                    converted to UTC, a date without an offset is read as UTC).
                    Must be in the future and no later than 3650 days from now.
                days:
                  type: integer
                  minimum: 1
                  maximum: 3650
                  description: >-
                    Number of days to move the next payment date forward from
                    the current one
            examples:
              byDays:
                summary: Move forward by 30 days
                value:
                  days: 30
              toDate:
                summary: Set an exact date
                value:
                  renewal_date: '2027-01-10T09:00:00Z'
      responses:
        '200':
          description: Subscription with the new payment date in expired_at
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Subscription'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden — lacks access to this bot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Subscription not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Subscription is not active, charge retries are in progress, or the
            date is in the past
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation error — both or neither of renewal_date and days passed,
            days out of range, or renewal_date later than 3650 days from now
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Subscription:
      type: object
      properties:
        id:
          type: integer
          description: Subscription ID
        number:
          type: string
          description: Subscription number
        offer_id:
          type: integer
          description: Offer ID
        offer_name:
          type: string
          description: Offer name
        price:
          type: number
          description: Price
        currency:
          type: string
          description: Currency code
        status:
          type: string
          description: Subscription status
        is_trial:
          type: boolean
          description: Whether the subscription is in trial
        cancel_reason:
          type:
            - string
            - 'null'
          description: Cancellation reason
        payment_system_type:
          type:
            - string
            - 'null'
          description: Payment system type
        payment_system_name:
          type:
            - string
            - 'null'
          description: Payment system name
        coupon_id:
          type:
            - integer
            - 'null'
          description: Applied coupon ID
        trial_ended_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Trial end timestamp
        expired_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Expiration timestamp
        cancelled_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Cancellation timestamp
        created_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Creation timestamp
        subscriber:
          $ref: '#/components/schemas/Subscriber'
    Error:
      type: object
      properties:
        message:
          type: string
          description: Error message
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Validation errors keyed by field name
        code:
          type: string
          description: >-
            Machine-readable code of a business error: unauthorized, not_found,
            conflict, limit_exceeded, quota_exceeded, pro_required. Absent on
            validation errors.
        current_plan:
          type:
            - string
            - 'null'
          description: >-
            Only with code pro_required: the current plan as the dashboard names
            it (Pro, Basic, Trial), null without an active subscription.
        upgrade_url:
          type: string
          description: >-
            Only with code pro_required: the dashboard page where the plan can
            be upgraded.
    Subscriber:
      type: object
      properties:
        id:
          type: integer
          description: Subscriber ID
        user_id:
          type: integer
          description: Telegram user ID
        first_name:
          type: string
          description: First name
        last_name:
          type:
            - string
            - 'null'
          description: Last name
        username:
          type:
            - string
            - 'null'
          description: Telegram username
        phone:
          type:
            - string
            - 'null'
          description: Phone number
        email:
          type:
            - string
            - 'null'
          description: Email address
        notes:
          type:
            - string
            - 'null'
          description: Notes about the subscriber
        tags:
          type: string
          description: Comma-separated list of tag names, empty string if none
        is_active:
          type: boolean
          description: Whether the subscriber is active
        is_blocked:
          type: boolean
          description: Whether the subscriber is blocked
        last_active_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Last activity timestamp
        created_at:
          type: string
          format: date-time
          description: Subscription timestamp
        utm_tags:
          type: object
          additionalProperties:
            type:
              - string
              - 'null'
          description: UTM tags keyed by type
        custom_fields:
          type: object
          additionalProperties:
            type:
              - string
              - 'null'
          description: Custom field values keyed by field name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API token from the Zenedu dashboard

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.