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

# Preview recurring schedule change

> Call this when the consumer changes the Payment Frequency dropdown in the Update Recurring Date modal. The response contains the numbers shown by the preview card: current payment amount, new payment amount, current/new monthly totals, percentage change, and increase/decrease direction. Returns `data: null` when the requested frequency is the same, invalid, or cannot be previewed for the current plan; the frontend should hide the preview card in that case.




## OpenAPI

````yaml /api/consumer.openapi.yaml get /accounts/{consumer}/payments/recurring-date/preview
openapi: 3.1.0
info:
  title: YouNegotiate Consumer API
  version: '2.0'
  description: >-
    Stateless API endpoints for consumer portal authentication and account
    access.
servers:
  - url: https://api.consumer.younegotiate.com
    description: Production
security: []
tags:
  - name: System
    description: Public consumer domain system and health endpoints.
  - name: Authentication
    description: >-
      Consumer identity matching, contact capture, OTP verification, token
      creation, and logout endpoints.
  - name: Profile - My ecoAddress
    description: Consumer profile tab for signed-in identity / ecoAddress context.
  - name: Profile - Communication Controls
    description: >-
      Consumer profile tab for communication permissions, email/mobile changes,
      and email/mobile verification.
  - name: Profile - My Billing Details
    description: >-
      Consumer profile tab for billing name and billing address details used for
      payment verification.
  - name: Profile - Personalize My Portal
    description: Consumer profile tab for portal colors and profile image personalization.
  - name: Accounts
    description: Consumer-owned account list and account detail endpoints.
  - name: Bill Pay Wallet
    description: >-
      Consumer Bill Pay Wallet saved payment profiles and scheduled payment
      method update endpoints.
  - name: Upcoming Payments
    description: >-
      Consumer My Bill Pay Calendar upcoming-payment rows and calendar display
      data.
  - name: Calendar Sync
    description: >-
      Consumer Google and Microsoft calendar connection, OAuth callback, and
      live-update endpoints.
  - name: Gift Registry
    description: >-
      Consumer Bill Pay Gift Registry account list, shared registry, and Helping
      Hand link endpoints.
  - name: EcoMailbox
    description: Consumer MyEcoMailBox list endpoints and unread sidebar badge state.
  - name: Notice Responses
    description: >-
      Consumer My Account notice-response wizard endpoints for sender details
      and account details.
paths:
  /accounts/{consumer}/payments/recurring-date/preview:
    get:
      tags:
        - Accounts
      summary: Preview recurring schedule change
      description: >
        Call this when the consumer changes the Payment Frequency dropdown in
        the Update Recurring Date modal. The response contains the numbers shown
        by the preview card: current payment amount, new payment amount,
        current/new monthly totals, percentage change, and increase/decrease
        direction. Returns `data: null` when the requested frequency is the
        same, invalid, or cannot be previewed for the current plan; the frontend
        should hide the preview card in that case.
      operationId: consumerPreviewRecurringSchedule
      parameters:
        - $ref: '#/components/parameters/ConsumerAccountId'
        - name: installment_type
          in: query
          required: true
          schema:
            type: string
            enum:
              - weekly
              - bimonthly
              - monthly
      responses:
        '200':
          description: Recurring schedule preview returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerRecurringSchedulePreviewResponse'
        '401':
          $ref: '#/components/responses/Unauthenticated'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/ProfileIncomplete'
      security:
        - bearerAuth: []
components:
  parameters:
    ConsumerAccountId:
      name: consumer
      in: path
      required: true
      description: Consumer account ID.
      schema:
        type: integer
  schemas:
    ConsumerRecurringSchedulePreviewResponse:
      type: object
      required:
        - data
      properties:
        data:
          anyOf:
            - $ref: '#/components/schemas/ConsumerRecurringSchedulePreview'
            - type: 'null'
    ConsumerRecurringSchedulePreview:
      type: object
      description: >-
        Numeric preview values for the Update Recurring Date dropdown. Money
        values are decimal strings so the frontend can format them consistently.
      properties:
        current_amount:
          type: string
          description: Current recurring payment amount before changing the dropdown.
          example: '100.00'
        current_frequency:
          $ref: '#/components/schemas/ConsumerInstallmentType'
        current_frequency_label:
          type: string
          description: Display label for the current recurring frequency.
          example: Monthly
        current_monthly_total:
          type: string
          description: >-
            Current estimated monthly total, calculated from amount times
            frequency multiplier.
          example: '100.00'
        new_amount:
          type: string
          description: New recurring payment amount for the selected dropdown frequency.
          example: '25.00'
        new_frequency:
          $ref: '#/components/schemas/ConsumerInstallmentType'
        new_frequency_label:
          type: string
          description: Display label for the selected dropdown frequency.
          example: Weekly
        new_monthly_total:
          type: string
          description: >-
            New estimated monthly total, calculated from new amount times
            selected frequency multiplier.
          example: '100.00'
        show_monthly_total_transition:
          type: boolean
          description: >-
            Whether the frontend should display current monthly total -> new
            monthly total.
          example: false
        percentage_change:
          type: number
          description: Percentage change between the current and new monthly totals.
          example: 0
        is_increase:
          type: boolean
          description: >-
            Whether the monthly total increased; use this only for display
            styling/copy.
          example: false
    MessageResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    ProfileIncompleteResponse:
      type: object
      required:
        - code
        - message
        - required_steps
      properties:
        code:
          type: string
          example: profile_incomplete
        message:
          type: string
          example: Please complete your communication profile before viewing accounts.
        required_steps:
          type: array
          items:
            type: string
          example:
            - profile_communication
    ConsumerInstallmentType:
      type:
        - string
        - 'null'
      enum:
        - weekly
        - bimonthly
        - monthly
        - null
  responses:
    Unauthenticated:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    Forbidden:
      description: Authenticated consumer cannot access the resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    NotFound:
      description: Resource not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageResponse'
    ProfileIncomplete:
      description: >-
        The authenticated consumer profile must complete communication setup
        before My Account can be shown.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ProfileIncompleteResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Sanctum token

````