openapi: 3.0.0
info:
  title: Subscriptions
  description: A subscription enables you to charge customers at specified intervals for a plan of their choice.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.in/erp/v3
    description: API Endpoint
tags:
  - name: subscription
    description: Subscription Module
paths:
  /subscriptions:
    post:
      tags:
        - subscription
      operationId: create_subscription
      summary: Create a subscription
      description: Create a new subscription. To create a subscription for a new customer, you have to pass the customer object. To create a subscription for a existing customer pass the <code>customer_id</code> of that customer.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/create-a-subscription-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/create-a-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    get:
      tags:
        - subscription
      operationId: list_subscriptions
      summary: List all subscriptions
      description: List of subscriptions that match the given subscription status. <br/><br/> To list the subscriptions of a particular customer append a param <code>customer_id={customer_id}</code>. <br/><br/>To list subscriptions based on Reference#, append the param <code>reference_contains={reference_value}</code>.
      parameters:
        - name: filter_by
          in: query
          description: The possible values for SubscriptionStatus are <code>All</code>, <code>ACTIVE</code>, <code>LIVE</code>, <code>FUTURE</code>, <code>TRIAL</code>, <code>PAST_DUE</code>, <code>UNPAID</code>, <code>NON_RENEWING</code>, <code>CANCELLED_FROM_DUNNING</code>, <code>CANCELLED</code>, <code>EXPIRED</code>, <code>TRIAL_EXPIRED</code>, <code>CANCELLED_LAST_MONTH</code>, <code>CANCELLED_THIS_MONTH</code>. <br/><br/>To list subscriptions based on Online/Offline, pass the <code>filter_by</code> param value as <code>SubscriptionMode.ONLINE</code> or <code>SubscriptionMode.OFFLINE</code>. .
          required: false
          schema:
            type: string
          example: SubscriptionStatus.ACTIVE
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: Number of records to be fetched per page. Default value is 200.
          required: false
          schema:
            type: integer
            default: 200
          example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-all-subscriptions-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.READ
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}:
    get:
      tags:
        - subscription
      operationId: get_subscription
      summary: Retrieve a subscription
      description: Details of an existing subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/retrieve-a-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.READ
    put:
      tags:
        - subscription
      operationId: update_subscription
      summary: Update a subscription
      description: Update details of an existing subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-a-subscription-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-a-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.UPDATE
    delete:
      tags:
        - subscription
      operationId: delete_subscription
      summary: Delete a subscription
      description: Delete an existing subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.DELETE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/cancel:
    post:
      tags:
        - subscription
      operationId: cancel_subscription
      summary: Cancel a subscription
      description: Your subscription can be either cancelled immediately or at the end of the current term based on the value of `cancel_at_end`.
      parameters:
        - name: cancel_at_end
          in: query
          description: If `cancel_at_end` is set to <strong>true</strong> then the `status` of the subscription is changed to <strong>non_renewing</strong> and if it is <strong>false</strong>, the `status` would be <strong>cancelled</strong>.
          required: false
          schema:
            type: string
          example: PlanStatus.ACTIVE
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/cancel-a-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/reactivate:
    post:
      tags:
        - subscription
      operationId: reactivate_subscription
      summary: Reactivate subscription
      description: Reactivate a subscription. You can reactivate a subscription only if the `status` of the subscription is <strong>non-renewing</strong>.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/reactivate-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/scheduledchanges:
    get:
      tags:
        - subscription
      operationId: view_subscription_scheduled_changes
      summary: View Scheduled Changes
      description: To view  the End of Term changes.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/view-scheduled-changes-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.READ
    delete:
      tags:
        - subscription
      operationId: delete_subscription_scheduled_changes
      summary: Delete Scheduled Changes
      description: Delete the scheduled changes for a subscription. Use this to remove any end-of-term changes that have been queued.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-subscription-scheduled-changes-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.DELETE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/recentactivities:
    get:
      tags:
        - subscription
      operationId: subscription_recent_activities
      summary: Subscription Activities
      description: List of all the recent activities associated to a subscription.
      parameters:
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: Number of records to be fetched per page. Default value is 200.
          required: false
          schema:
            type: integer
            default: 200
          example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/subscription-activities-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.READ
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/buyonetimeaddon:
    post:
      tags:
        - subscription
      operationId: buy_one_time_addon
      summary: Buy one-time addon
      description: Include a one-time addon in the subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/buy-one-time-addon-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/buy-one-time-addon-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/coupons/{coupon_code}:
    post:
      tags:
        - subscription
      operationId: associate_coupon_to_subscription
      summary: Associate a coupon
      description: Apply a coupon to a subscription which has been already created.
      parameters:
        - name: coupon_code
          in: path
          required: true
          description: Unique code of the coupon.
          schema:
            type: string
          example: Flat10
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/associate-a-coupon-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/coupons:
    delete:
      tags:
        - subscription
      operationId: remove_coupon_from_subscription
      summary: Remove a coupon
      description: To remove coupon associated with a subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remove-a-coupon-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.DELETE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/card:
    post:
      tags:
        - subscription
      operationId: update_subscription_card
      summary: Update Card
      description: Update the card details of a customer. Once updated, the past card will no longer be charged.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-card-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-card-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    delete:
      tags:
        - subscription
      operationId: remove_subscription_card
      summary: Remove Card
      description: Delete a card associated with the subscription. The subscription will become an offline subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remove-card-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.DELETE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/charge:
    post:
      tags:
        - subscription
      operationId: add_subscription_charge
      summary: Add Charge
      description: Charge a one-time amount for the subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-charge-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-charge-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/contactpersons:
    post:
      tags:
        - subscription
      operationId: add_subscription_contact_person
      summary: Add contact person
      description: Associate a contact person with the subscription. Only an existing contact person can be associated.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-contact-person-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-contact-person-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/postpone:
    post:
      tags:
        - subscription
      operationId: postpone_subscription_renewal
      summary: Postpone renewal
      description: A subscription renewal date (billing date) can be postponed thereby extending the subscription term. Also, subscription renewal can only be postponed and not preponed.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postpone-renewal-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/postpone-renewal-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/lineitems/{plan_or_addon_code}:
    post:
      tags:
        - subscription
      operationId: add_plan_in_subscription
      summary: Add/Edit description for a item in line items list
      description: Add/Edit description to a particular plan or addon in the line items list.
      parameters:
        - name: plan_code
          in: path
          required: true
          description: Unique code of the plan.
          schema:
            type: string
          example: basic-monthly
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/addedit-description-for-a-item-in-line-items-list-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/addedit-description-for-a-item-in-line-items-list-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/autocollect:
    post:
      tags:
        - subscription
      operationId: autocollect_subscription
      summary: Change to Online/Offline mode
      description: Change the status of a particular subscription to Online/Offline mode. If <code>auto_collect</code> is false, the subscription is in <strong>Offline</strong> mode. If <code>auto_collect</code> is true, the subscription is in <strong>Online</strong> mode.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/change-to-onlineoffline-mode-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/change-to-onlineoffline-mode-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/reference:
    post:
      tags:
        - subscription
      operationId: update_subscription_reference
      summary: Update Reference
      description: Update reference id to easily identify and keep track of your subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-reference-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-reference-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/salesperson:
    post:
      tags:
        - subscription
      operationId: update_subscription_sales_person
      summary: Update Sales Person
      description: Update a sales person associated with a particular subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-sales-person-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-sales-person-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/customfields:
    get:
      tags:
        - subscription
      operationId: get_subscription_custom_fields
      summary: Get Custom Fields
      description: Retrieve the custom fields associated with a subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-subscription-custom-fields-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.READ
    post:
      tags:
        - subscription
      operationId: update_custom_fields_in_subscription
      summary: Update Custom Fields
      description: Update the custom fields associated with a particular subscription.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-custom-fields-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-custom-fields-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/notes:
    get:
      tags:
        - subscription
      operationId: list_subscription_notes
      summary: List Notes
      description: List all the notes associated with a subscription.
      parameters:
        - name: sort_column
          in: query
          description: 'Sort the notes. Allowed value: <code>commented_time</code>.'
          required: false
          schema:
            type: string
          example: commented_time
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-subscription-notes-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.READ
    post:
      tags:
        - subscription
      operationId: add_subscription_notes
      summary: Add a note
      description: Notes related to the subscription can be added by the user at anytime.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-a-note-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-a-note-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/notes/{note_id}:
    delete:
      tags:
        - subscription
      operationId: delete_subscription_notes
      summary: Delete a note
      description: Delete a specific note.
      parameters:
        - name: note_id
          in: path
          required: true
          description: Unique identifier of the note.
          schema:
            type: string
          example: '903000076543'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-note-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.DELETE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/extend:
    post:
      tags:
        - subscription
      operationId: extend_subscription_billing_cycle
      summary: Extend Billing Cycles
      description: Extend the billing cycles of a subscription. You can optionally record a payment along with the extension.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/extend-subscription-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/extend-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/meteredbilling/enable:
    post:
      tags:
        - subscription
      operationId: enable_subscription_metered_billing
      summary: Enable Metered Billing
      description: Enable metered billing for a subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/toggle-metered-billing-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/meteredbilling/disable:
    post:
      tags:
        - subscription
      operationId: disable_subscription_metered_billing
      summary: Disable Metered Billing
      description: Disable metered billing for a subscription.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/toggle-metered-billing-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/resume:
    post:
      tags:
        - subscription
      operationId: resume_subscription
      summary: Resume a Subscription
      description: Resume a paused subscription. You can optionally specify a <code>resume_at</code> date to schedule when the subscription should resume.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/resume-subscription-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/resume-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
  /subscriptions/{subscription_id}/pause:
    post:
      tags:
        - subscription
      operationId: pause_subscription
      summary: Pause a Subscription
      description: Pause an active subscription. You can optionally specify a <code>pause_at</code> date to schedule when the subscription should be paused, and set <code>credits_for_pause_period</code> to issue credits for the pause duration.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/pause-subscription-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pause-subscription-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.subscriptions.CREATE
    parameters:
      - name: subscription_id
        in: path
        required: true
        description: Unique identifier of the subscription.
        schema:
          type: string
        example: '90300000079200'
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: organization_id
      description: ID of the organization
      in: query
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    gendoc-attributes-schema:
      $ref: '#/components/schemas/subscription-response'
    subscription-response:
      type: object
      properties:
        subscription_id:
          $ref: '#/components/schemas/subscription_id'
        name:
          $ref: '#/components/schemas/name'
        status:
          $ref: '#/components/schemas/status'
        amount:
          $ref: '#/components/schemas/amount'
        created_at:
          $ref: '#/components/schemas/created_at'
        activated_at:
          $ref: '#/components/schemas/activated_at'
        current_term_starts_at:
          $ref: '#/components/schemas/current_term_starts_at'
        current_term_ends_at:
          $ref: '#/components/schemas/current_term_ends_at'
        last_billing_at:
          $ref: '#/components/schemas/last_billing_at'
        next_billing_at:
          $ref: '#/components/schemas/next_billing_at'
        expires_at:
          $ref: '#/components/schemas/expires_at'
        interval:
          $ref: '#/components/schemas/interval'
        interval_unit:
          $ref: '#/components/schemas/interval_unit'
        auto_collect:
          $ref: '#/components/schemas/auto_collect'
        created_time:
          $ref: '#/components/schemas/created_time'
        updated_time:
          $ref: '#/components/schemas/updated_time'
        reference_id:
          $ref: '#/components/schemas/reference_id'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        salesperson_id:
          $ref: '#/components/schemas/salesperson_id'
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
        child_invoice_id:
          $ref: '#/components/schemas/child_invoice_id'
        currency_code:
          $ref: '#/components/schemas/currency_code'
        currency_symbol:
          $ref: '#/components/schemas/currency_symbol'
        end_of_term:
          $ref: '#/components/schemas/end_of_term'
        product_id:
          $ref: '#/components/schemas/product_id'
        product_name:
          $ref: '#/components/schemas/product_name'
        plan:
          description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
          type: object
          properties:
            plan_code:
              $ref: '#/components/schemas/plan_code'
            name:
              $ref: '#/components/schemas/name'
            quantity:
              $ref: '#/components/schemas/quantity'
            price:
              $ref: '#/components/schemas/price'
            tags:
              $ref: '#/components/schemas/tags'
            item_custom_fields:
              $ref: '#/components/schemas/item_custom_fields'
            discount:
              $ref: '#/components/schemas/discount'
            total:
              $ref: '#/components/schemas/total'
            setup_fee:
              $ref: '#/components/schemas/setup_fee'
            plan_description:
              $ref: '#/components/schemas/plan_description'
            tax_id:
              $ref: '#/components/schemas/tax_id'
            trial_days:
              $ref: '#/components/schemas/trial_days'
        addons:
          description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
          type: array
          items:
            type: object
            properties:
              addon_code:
                $ref: '#/components/schemas/addon_code'
              name:
                description: Name of the addon.
                example: Monthly Addon
              addon_description:
                $ref: '#/components/schemas/addon_description'
              quantity:
                description: Required quantity of the chosen addon.
                type: integer
                example: 1
              tags:
                $ref: '#/components/schemas/tags'
              item_custom_fields:
                $ref: '#/components/schemas/item_custom_fields'
              price:
                description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                type: number
                format: double
                example: 50
              discount:
                description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
              total:
                description: Total amount for the addon.
              tax_id:
                description: Unique ID of the tax applied for the addon.
        coupon:
          description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
          type: object
          properties:
            coupon_code:
              $ref: '#/components/schemas/coupon_code'
            discount_amount:
              $ref: '#/components/schemas/discount_amount'
        card:
          description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
          type: object
          properties:
            card_id:
              description: Customer's card ID.
              example: '9030000079226'
            last_four_digits:
              $ref: '#/components/schemas/last_four_digits'
            payment_gateway:
              $ref: '#/components/schemas/payment_gateway'
            expiry_month:
              $ref: '#/components/schemas/expiry_month'
            expiry_year:
              $ref: '#/components/schemas/expiry_year'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
        can_add_bank_account:
          $ref: '#/components/schemas/can_add_bank_account'
        customer:
          description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
          type: object
          properties:
            customer_id:
              description: A unique ID generated by the server. This can be used as an identifier.
              example: '903000000000099'
            display_name:
              $ref: '#/components/schemas/display_name'
            salutation:
              $ref: '#/components/schemas/salutation'
            first_name:
              $ref: '#/components/schemas/first_name'
            last_name:
              $ref: '#/components/schemas/last_name'
            email:
              $ref: '#/components/schemas/email'
            company_name:
              $ref: '#/components/schemas/company_name'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
        custom_fields:
          description: Additional fields for the invoices.
          type: array
          items:
            type: object
            properties:
              index:
                $ref: '#/components/schemas/index'
              label:
                $ref: '#/components/schemas/label'
              value:
                $ref: '#/components/schemas/value'
              data_type:
                $ref: '#/components/schemas/data_type'
        taxes:
          description: Taxes associated wit the subscription.
          type: array
          items:
            type: object
            properties:
              tax_id:
                $ref: '#/components/schemas/tax_id'
              tax_name:
                $ref: '#/components/schemas/tax_name'
              tax_amount:
                $ref: '#/components/schemas/tax_amount'
        contact_persons_associated:
          $ref: '#/components/schemas/contact_persons_associated'
        notes:
          description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
          type: array
          items:
            type: object
            properties:
              note_id:
                $ref: '#/components/schemas/note_id'
              description:
                description: Comments about the subscription made by the user.
                type: string
                example: ''
              commented_by:
                $ref: '#/components/schemas/commented_by'
              commented_time:
                $ref: '#/components/schemas/commented_time'
        payment_gateways:
          description: List of payment gateways configured for the customer.
          type: array
          items:
            type: object
            properties:
              payment_gateway:
                description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                type: string
                example: test_gateway
        unbilled_charge_id:
          description: A unique ID if the subscription has any unbilled charges for the duration.
          type: string
          example: '903000000000099'
        can_charge_setup_fee_immediately:
          $ref: '#/components/schemas/can_charge_setup_fee_immediately'
    subscription_id:
      description: Unique ID generated for a subscription.
      type: string
      example: '90300000079200'
    name:
      description: Name generated by concatenation of the product name and the selected plan.
      type: string
      example: GatorHost-Basic
    customer_id:
      description: Customer ID of the customer for whom a subscription needs to be created.
      type: string
      example: '903000000000099'
    account_id:
      description: Account ID of the bank account from which payment is made by the customer.
      type: string
      example: '90300000792007'
      x-required_info: if <code>auto_collect</code> node is true and any other payment method is not specified
    bank_account:
      description: Customer's bank account object. This contains <code>payment_gateway</code>, <code>account_number</code>, <code>account_type</code>, <code>accept_license</code>, <code>first_name</code> and <code>last_name</code>.
      type: object
    customer_name:
      description: Name of the customer.
      type: string
      example: Benjamin
    customer:
      description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
      type: object
      properties:
        customer_id:
          description: A unique ID generated by the server. This can be used as an identifier.
          example: '903000000000099'
        display_name:
          $ref: '#/components/schemas/display_name'
        salutation:
          $ref: '#/components/schemas/salutation'
        first_name:
          $ref: '#/components/schemas/first_name'
        last_name:
          $ref: '#/components/schemas/last_name'
        email:
          $ref: '#/components/schemas/email'
        company_name:
          $ref: '#/components/schemas/company_name'
        billing_address:
          $ref: '#/components/schemas/billing_address'
        shipping_address:
          $ref: '#/components/schemas/shipping_address'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
    display_name:
      description: This will be name which will be displayed in the interface and invoices.
      type: string
      example: Zylker Inc
    salutation:
      description: Salutation of the customer.
      type: string
      example: Mr.
    first_name:
      description: First name of the customer.
      type: string
      example: Benjamin
    last_name:
      description: Last name of the customer.
      type: string
      example: George
    email:
      description: Email address of the customer.
      type: string
      example: benjamin.george@zylker.org
    tags:
      type: array
      description: List of tags to be associated.
      items:
        type: object
        properties:
          tag_id:
            $ref: '#/components/schemas/tag_id'
          tag_option_id:
            $ref: '#/components/schemas/tag_option_id'
    tag_id:
      description: ID of the Tag.
      type: string
    tag_option_id:
      description: Id of the Tag Option.
      type: string
    item_custom_fields:
      description: Custom fields for a item.
      type: array
      items:
        type: object
        properties:
          label:
            $ref: '#/components/schemas/label'
          value:
            $ref: '#/components/schemas/value'
    label:
      description: Label of the Custom Field.
      type: string
    value:
      description: Value of the Custom Field.
      type: string
    company_name:
      description: Registered name of the company the customer represents.
      type: string
      example: Zylker Inc
    currency_code:
      description: Currency code of the currency in which the customer wants to pay. If <code>currency_code</code> is not specified here, the currency chosen in your Zoho ERP organization will be used for billing. <code>currency_id</code> and <code>currency_symbol</code> are set automatically in accordance to the currency_code.
      type: string
      example: USD
    currency_symbol:
      description: Symbol of the customer's currency.
      type: string
      example: $
    phone:
      description: Customer's landline or fixed-line number.
      type: string
      example: 23467278
    mobile:
      description: Customer's mobile phone number.
      type: string
      example: 938237475
    department:
      description: Customer's department.
      type: string
      example: Marketing
    designation:
      description: Customer's designation.
      type: string
      example: Evangelist
    place_of_contact:
      description: Customer's place of contact.
      type: string
      example: TN
    tax_specification:
      description: Tax specification for the customer.
      type: string
      example: inter
    gst_no:
      description: GSTIN Number for the customer.
      type: string
      example: 33AAAAA0000A1Z5
    gst_treatment:
      description: 'GST Treatment for the customer.<br/>Allowed values for <strong><code>gst_treatment</code></strong> : <br/><code>business_gst</code>, <code>business_none</code>, <code>consumer</code>, <code>overseas</code><br/> <code>business_gst</code> - For a GST Registered business owner. <br/><code>business_none</code> - For a GST unregistered business owner. <br/><code>consumer</code> - For a consumer. <br/><code>overseas</code> - Customer for whom you export your goods/services.'
      type: string
      example: business_gst
    zcrm_account_id:
      description: This is the Zoho CRM account id of the customer if the customer is synced with the accounts in Zoho CRM.
      type: string
      example: '903000000069001'
    zcrm_contact_id:
      description: This is the Zoho CRM contact id of the customer if the customer is synced with the contacts in Zoho CRM.
      type: string
      example: '903000000098214'
    website:
      description: Customer's website if any.
      type: string
      example: www.zylker.in
    attention:
      description: Attention of the customer's billing address.
      type: string
      example: Benjamin George
    street:
      description: Street of the customer's billing address.
      type: string
      example: Harrington Bay Street
    city:
      description: City of the customer's billing address.
      type: string
      example: Salt Lake City
    state:
      description: State of the customer's billing address.
      type: string
      example: CA
    zip:
      description: Zip code of the customer's billing address.
      type: string
      example: 92612
    country:
      description: Country of the customer's billing address.
      type: string
      example: U.S.A
    fax:
      description: Fax number for the customer's billing address.
      type: string
      example: 4527389
    create_backdated_invoice:
      description: To allow creation of invoice for current billing cycle for back dated subscriptions.
      type: boolean
      example: true
    can_charge_setup_fee_immediately:
      description: If set to "true", a separate invoice will be raised for the setup fee as soon as the subscription's trial period starts. Set the value as "false", or remove this optional argument if you want the setup fee to be billed at the end of the trial period, along with the other subscription related charges.
      type: boolean
      example: false
    billing_address:
      description: Customer's billing address object. It contains <code>attention</code>, <code>street</code>, <code>city</code>, <code>state</code>,<code>zip</code>, <code>country</code> and <code>fax</code>.
      type: object
      properties:
        attention:
          $ref: '#/components/schemas/attention'
        street:
          $ref: '#/components/schemas/street'
        city:
          $ref: '#/components/schemas/city'
        state:
          $ref: '#/components/schemas/state'
        country:
          $ref: '#/components/schemas/country'
        zip:
          $ref: '#/components/schemas/zip'
        fax:
          $ref: '#/components/schemas/fax'
    shipping_address:
      description: Customer's shipping address object. It contains <code>attention</code>, <code>street</code>, <code>city</code>, <code>state</code>,<code>zip</code>, <code>country</code> and <code>fax</code>.
      type: object
      properties:
        attention:
          description: Attention of the customer's shipping address.
          type: string
          example: Benjamin George
        street:
          description: Street of the customer's shipping address.
          type: string
          example: Harrington Bay Street
        city:
          description: City of the customer's shipping address.
          type: string
          example: Salt Lake City
        state:
          description: State of the customer's shipping address.
          type: string
          example: CA
        zip:
          description: Zip code of the customer's shipping address.
          type: string
          example: 92612
        country:
          description: Country of the customer's shipping address.
          type: string
          example: U.S.A
        fax:
          description: Fax number of the customer's shipping address.
          type: string
          example: 4527389
    is_portal_enabled:
      description: Is Client portal enabled for the customer.
      type: boolean
      example: true
    language_code:
      description: Client portal language for the customer.
      example: en
    contact_person_name:
      description: Name of the Contact Person.
      type: string
      example: David
    contact_person_first_name:
      description: First Name of the Contact Person.
      type: string
      example: David
    contact_person_email:
      description: Email ID of the Contact Person.
      type: string
      example: willsmith@zylker.org
    contact_person_phone:
      description: Phone Number of the Contact Person.
      type: string
      example: +91-44-4567-8900
    contact_person_last_name:
      description: Last Name of the Contact Person.
      type: string
      example: David
    contact_person_id:
      description: Unique ID of the Contact Person.
      type: string
      example: 982000000567003
    contact_person_mobile:
      description: Mobile Number of the Contact Person.
      type: string
      example: +91-9876543210
    is_email_enabled:
      description: Used to check if Email communication preference is enabled for the contact person at transaction level.
      type: boolean
      example: true
    is_sms_enabled:
      description: Used to check if SMS communication preference is enabled for the contact person at transaction level.
      type: boolean
      example: true
    is_whatsapp_enabled:
      description: Used to check if WhatsApp communication preference is enabled for the contact person at transaction level.
      type: boolean
      example: true
    communication_preference:
      description: Preferred modes of communication for the contact person at transaction level.
      type: object
      properties:
        is_email_enabled:
          $ref: '#/components/schemas/is_email_enabled'
        is_sms_enabled:
          $ref: '#/components/schemas/is_sms_enabled'
        is_whatsapp_enabled:
          $ref: '#/components/schemas/is_whatsapp_enabled'
    contact_persons_associated:
      description: Contact persons associated with the transaction.
      type: array
      items:
        type: object
        properties:
          contact_person_id:
            $ref: '#/components/schemas/contact_person_id'
          contact_person_name:
            $ref: '#/components/schemas/contact_person_name'
          first_name:
            $ref: '#/components/schemas/contact_person_first_name'
          last_name:
            $ref: '#/components/schemas/contact_person_last_name'
          contact_person_email:
            $ref: '#/components/schemas/contact_person_email'
          phone:
            $ref: '#/components/schemas/contact_person_phone'
          mobile:
            $ref: '#/components/schemas/contact_person_mobile'
          communication_preference:
            $ref: '#/components/schemas/communication_preference'
    contact_persons_associated_payload:
      description: Contact persons associated with the transaction.
      type: array
      items:
        type: object
        properties:
          contact_person_id:
            $ref: '#/components/schemas/contact_person_id'
          communication_preference:
            $ref: '#/components/schemas/communication_preference'
    contactperson_id:
      description: Contact person ID of the customer's contact person.
      type: string
      example: '903000000000099'
    amount:
      description: The amount that needs to be charged for the subscription.
      type: number
      format: double
      example: 50
    description:
      description: Make a note of why the customer was charged so that if can be used for any future reference.
      type: string
      example: ''
    product_id:
      description: Product ID of the product to which the plan is associated with.
      type: string
      example: '90300000079065'
    product_name:
      description: Name of the product which the plan belongs to.
      type: string
      example: Zylker Inc
    plan:
      description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
      type: object
      properties:
        plan_code:
          $ref: '#/components/schemas/plan_code'
        name:
          $ref: '#/components/schemas/name'
        quantity:
          $ref: '#/components/schemas/quantity'
        price:
          $ref: '#/components/schemas/price'
        discount:
          $ref: '#/components/schemas/discount'
        total:
          $ref: '#/components/schemas/total'
        setup_fee:
          $ref: '#/components/schemas/setup_fee'
        plan_description:
          $ref: '#/components/schemas/plan_description'
        tax_id:
          description: Unique ID of Tax or Tax Group that must be associated with the plan. <code>tax_id</code> must be empty for applying tax Exemption.
          x-required_info: for applying tax or tax exemption to a plan
          type: string
          example: '903000002345'
        trial_days:
          $ref: '#/components/schemas/trial_days'
    plan_name:
      description: Name of the plan.
      type: string
      example: Basic Monthly
    plan_code:
      description: Plan code of the plan that is to be subscribed to the customer.
      type: string
      example: basic-monthly
    quantity:
      description: Required quantity of the chosen plan.
      type: integer
      example: 1
    price:
      description: Price of a plan for a particular subscription. If a value is provided here, the plan's price for this subscription will be changed to the given value. If no value is provided, the plan's price would be the same as what it was when it was created.
      type: number
      format: double
      example: 50
    plan_description:
      description: Description of the plan exclusive to this subscription. This will be displayed in place of the plan name in invoices generated for this subscription.
      type: string
      example: Monthly Basic plan
    billing_cycles:
      description: <code>billing_cycles</code> specified at the time of creation of the plan would be the default value. If this needs to be overridden for this particular subscription, a value can be provided here.
      type: integer
      example: -1
    exclude_trial:
      description: This is set to true if the respective plan's trial period needs to be excluded for this subscription.
      type: boolean
      example: false
    exclude_setup_fee:
      description: This is set to true if the respective plan's setup fee needs to be excluded for this subscription.
      type: boolean
      example: false
    trial_days:
      description: Number of free trial days granted to a customer subscribed to this plan. Trial days for the subscription mentioned here will override the number of trial days provided at the time plan creation. This will be applicable even if exclude_trial=true.
      type: integer
      example: 0
      default: 0 only if <code>exclude_trial</code> is true
    tds_tax_id:
      description: 'TDS (Tax Deducted at Source) tax or tax group ID for this line, as returned by the Taxes API. Applicable for India organizations. Note: This value is a set of numeric characters.'
      type: string
      example: '982000000557012'
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    allow_partial_payments:
      description: Whether partial payments are allowed for the contact or subscription context when supported.
      type: boolean
      example: true
      x-node_available_in:
        - in
      x-node_unavailable_in: []
    tax_id:
      description: Unique ID of the tax or tax group that can be collected from the contact. Tax can be given only if <code>is_taxable</code> is <code>true</code>.
      type: string
      example: '903000002345'
    tax_exemption_id:
      description: Unique ID of the tax exemption.
      type: string
      example: '903000006345'
    tax_exemption_code:
      description: Unique code of the tax exemption.
      type: string
      example: GST FREE
    is_taxable:
      description: Set to true if customer's transactions must be tax inclusive.
      type: string
      example: true
    tax_name:
      description: Name of the tax to which subscription is associated.
      type: string
      example: GST
    tax_amount:
      description: Tax amount applied to the subscription.
      type: string
      example: '2.50'
    setup_fee_tax_id:
      description: Unique ID for tax of setup fee. <code>setup_fee_tax_id</code> must be empty for applying tax Exemption.
      type: string
      example: '9030000123123'
    setup_fee_tax_exemption_id:
      description: Unique Tax Exemption ID that must be applied to setup fee.
      type: string
      example: '9030000123098'
    setup_fee_tax_exemption_code:
      description: Unique code of the tax exemption that must be applied to setup fee.
      type: string
      example: GST FREE
    place_of_supply:
      description: Place of Supply for the customer's subscription.
      type: string
      example: TN
    discount:
      description: Discount applied to the plan, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
      type: number
      format: double
      example: 20
    total:
      description: Total amount for the plan.
      type: number
      format: double
      example: 50
    sub_total:
      description: Subtotal for the subscription without including taxes.
      type: number
      format: double
      example: 40
    setup_fee:
      description: Setup fee for the plan.
      type: number
      format: double
      example: 20
      default: 0 only if <code>exclude_setup_fee</code>  is true
    addons:
      description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
      type: array
      items:
        type: object
        properties:
          addon_code:
            $ref: '#/components/schemas/addon_code'
          name:
            description: Name of the addon.
            example: Monthly Addon
          addon_description:
            $ref: '#/components/schemas/addon_description'
          quantity:
            description: Required quantity of the chosen addon.
            type: integer
            example: 1
            default: 1
          price:
            description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
            type: number
            format: double
            example: 0
            default: 10
          discount:
            description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
            type: number
            example: 20
          total:
            description: Total amount for the addon.
            type: number
            example: 20
          tax_id:
            description: Unique ID of the tax applied for the addon.
            type: string
            example: '903000002345'
            x-required_info: for applying tax or tax exemption to an addon
    addon_code:
      description: Addon code of the addon.
      type: string
      example: Email-basic
    addon_description:
      description: Description of the addon exclusive to this subscription. This will be displayed in place of the addon name in invoices generated for this subscription.
      type: string
      example: Monthly addon.
    taxes:
      description: Details of the taxes associated with the subscription.
      type: array
      items:
        type: object
        properties:
          tax_id:
            $ref: '#/components/schemas/tax_id'
          tax_name:
            $ref: '#/components/schemas/tax_name'
          tax_amount:
            $ref: '#/components/schemas/tax_amount'
    payment_terms:
      description: Payment Due details for the invoices.
      type: integer
      example: 0
    payment_terms_label:
      description: Label for the paymet due details.
      type: string
      example: Due On Receipt
    can_add_bank_account:
      description: Set to true if Bank account can be added for the customer to perform ACH transactions.
      type: boolean
      example: true
    coupon_code:
      description: The coupon code of the coupon which is to be applied to the subscription.
      type: string
      example: Flat10
    coupon_name:
      description: Name of the coupon applied to the subscription.
      type: string
      example: Flat 10
    coupon:
      description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
      type: object
      properties:
        coupon_code:
          $ref: '#/components/schemas/coupon_code'
        discount_amount:
          $ref: '#/components/schemas/discount_amount'
    discount_amount:
      description: The discount amount included in an invoice on applying a coupon.
      type: number
      format: double
      example: 44
    reference_id:
      description: A string of your choice is required to easily identify and keep track of your subscriptions.
      type: string
      example: zylker
    template_id:
      description: Defaulte Invoice Template ID for all the invoices created from the subscription.
      type: string
      example: 903000000063009
    salesperson_id:
      description: Unique Id of the sales person assigned for the subscription.
      type: string
      example: '903000000058001'
    salesperson_name:
      description: Name of the sales person assigned for the subscription.
      type: string
      example: Franklin
    end_of_term:
      description: If there are any changes in the plan's subscriptions, those subscription changes can be made immediately if <code>end_of_term</code> is set to false. If <code>end_of_term</code> is set to true, the subscription changes take effect only after the current term of the subscription ends.
      type: boolean
      example: false
    exchange_rate:
      description: This will be the exchange rate provided for the organization's currency and the customer's currency. The subscription fee would be the multiplicative product of the original price and the exchange rate.
      type: number
      format: double
      example: 2
      default: the exchange rate provided in settings.
    starts_at:
      description: Generally the subscription will start on the day it is created. But, the date can also be a future  or past date depending upon your usecase. For future dates, the subscription status would be Future till the starts_at date. And for past dates, the subscription status can be Trial, Live or Expired depending on the subscription interval that you have selected.
      type: string
      example: '2016-06-05'
    status:
      description: The status of the subscription. It can be <code>live</code>, <code>trial</code>, <code>dunning</code>, <code>unpaid</code>, <code>non_renewing</code>, <code>cancelled</code>, <code>creation_failed</code>, <code>cancelled_from_dunning</code>, <code>expired</code>, <code>trial_expired</code> or <code>future</code>.
      type: string
      example: live
    auto_collect:
      description: auto_collect is set to true for creating an online subscription which will charge the customer's card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.
      type: boolean
      example: true
    add_to_unbilled_charges:
      description: When the value is given as true, the subscription would be created and charges for the current billing cycle will be put as unbilled. This can be converted to invoice at any later point of time.
      type: boolean
      example: true
    card_id:
      description: Enter the card_id of the card which has to be updated.
      type: string
      example: '9030000079226'
      x-required_info: if <code>auto_collect</code> node is true and any other payment method is not specified
    card:
      description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
      type: object
      properties:
        card_id:
          description: Customer's card ID.
          example: '9030000079226'
        last_four_digits:
          $ref: '#/components/schemas/last_four_digits'
        payment_gateway:
          $ref: '#/components/schemas/payment_gateway'
        expiry_month:
          $ref: '#/components/schemas/expiry_month'
        expiry_year:
          $ref: '#/components/schemas/expiry_year'
    payment_gateway:
      description: 'Payment gateway through which payment needs to be made. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
      type: string
      example: stripe
    last_four_digits:
      description: Last four digits of the customer's card.
      type: integer
      example: 2145
    card_number:
      description: Customer's card number.
      type: string
      example: 4111111111112145
    cvv_number:
      description: CVV number of the customer's card.
      type: integer
      example: 234
    expiry_month:
      description: Expiry month of the customer's card.
      type: integer
      example: 9
    expiry_year:
      description: Expiry year of the customer's card.
      type: integer
      example: 2030
    is_primary:
      description: Card is marked as Primary.
      type: boolean
      example: true
    is_backup:
      description: Card is marked as Backup.
      type: boolean
      example: false;
    child_invoice_id:
      description: Invoice ID of the most recent invoice to which the subscription is associated with.
      type: string
      example: '90300000079210'
    interval:
      description: Indicates the number of intervals between each billing. If interval=2, the customer would be billed every two months or years depending on the value for interval_unit.
      type: string
      example: 1
    interval_unit:
      description: It can be either <code>months</code> or <code>years</code>. For interval=2 and interval_unit=months, the customer is billed every two months.
      type: string
      example: months
    current_term_starts_at:
      description: Date on which the current term of the subscription started.
      type: string
      example: '2016-06-05'
    current_term_ends_at:
      description: Date on which the current term of the subscription ends.
      type: string
      example: '2016-06-05'
    expires_at:
      description: This is applicable only when <code>billing_cycle</code> is set for a plan. A subscription expires on the last day of the last billing cycle.
      type: string
      example: '2016-06-05'
    last_billing_at:
      description: The date on which the customer was billed last.
      type: string
      example: '2016-06-05'
    next_billing_at:
      description: The date on which the customer will be billed next. This will also be the date on which the next term of the subscription starts.
      type: string
      example: '2016-06-30'
    cancelled_at:
      description: The date on which a subscription is cancelled. Customers can cancel a subscription themselves. It can also be cancelled if a customer's card couldn't be charged even after multiple attempts.
      type: string
      example: ''
    source:
      description: This is applicable only when a subscription is cancelled. It is set to <code>user</code> when customers cancel the subscription themselves. It is set to <code>scheduler</code> if it gets cancelled by the customer due to payment failures during renewal.
      type: string
      example: ''
    next_retry_at:
      description: If payment fails at the time of renewing a subscription, there will be another attempt made to process at a later *date* which is to be specified here.
      type: string
      example: ''
    notes:
      description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
      type: array
      items:
        type: object
        properties:
          note_id:
            $ref: '#/components/schemas/note_id'
          description:
            description: Comments about the subscription made by the user.
          commented_by:
            $ref: '#/components/schemas/commented_by'
          commented_time:
            $ref: '#/components/schemas/commented_time'
    note_id:
      description: Unique ID generated for a note.
      type: string
      example: '903000076543'
    commented_by:
      description: Name of the user who added the comment.
      type: string
      example: Benjamin
    commented_time:
      description: Time at which the comment was added.
      type: string
      example: 2016-06-11T17:57:13+0530
    created_time:
      description: Time at which the subscription was created.
      type: string
      example: 2016-06-11T17:57:13+0530
    updated_time:
      description: Time at which the subscription details were last updated.
      type: string
      example: 2016-06-04T16:44:15+0530
    renewal_at:
      description: Enter the future date to which the subscription renewal has to be postponed.
      type: string
      example: '2016-06-24'
    created_at:
      description: Date at which the subscription was created.
      type: string
      example: '2016-06-11'
    updated_at:
      description: Date at which the subscription was last updated.
      type: string
      example: '2016-06-04'
    activated_at:
      description: Date at which the subscription was activated.
      type: string
      example: '2016-06-15'
    payment_gateways:
      description: List of payment gateways configured for the customer.
      type: array
      items:
        type: object
        properties:
          payment_gateway:
            description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
            type: string
            example: stripe
    customfield_id:
      description: Unique ID to denote the custom field.
      type: string
      example: '9030000089798'
    custom_fields:
      description: Additional fields for the invoices.
      type: array
      items:
        type: object
        properties:
          value:
            $ref: '#/components/schemas/value'
          label:
            $ref: '#/components/schemas/label'
          data_type:
            $ref: '#/components/schemas/data_type'
    index:
      description: Index of the custom field. It can hold any value from 1 to 10.
      type: integer
      example: 1
    ach_supported:
      description: Set to true if ACH payments is supported for the subscription.
      type: boolean
      example: true
    comments:
      description: Lists the comments added by the system or by user.
      type: array
      items:
        type: object
        properties:
          comment_id:
            $ref: '#/components/schemas/comment_id'
          description:
            description: Small description about the comment.
            example: Invoice has been marked as void
          commented_by_id:
            $ref: '#/components/schemas/commented_by_id'
          commented_by:
            $ref: '#/components/schemas/commented_by'
          comment_type:
            $ref: '#/components/schemas/comment_type'
          date:
            description: Date on which the comment was created.
          time:
            $ref: '#/components/schemas/time'
          operation_type:
            $ref: '#/components/schemas/operation_type'
          transaction_id:
            $ref: '#/components/schemas/transaction_id'
          transaction_type:
            description: Small description about the type of transaction.
            example: invoice
    comment_id:
      description: Unique Id to denote the comment fro the particular invoice.
      type: string
      example: '90300000003133'
    commented_by_id:
      description: Unique Id to denote who has commented.
      type: string
      example: '90300000002099'
    comment_type:
      description: It denotes whether user comment or system comment.
      type: string
      example: system
    reference_number:
      description: Reference number of the invoice for which payment is made.
      type: string
      example: INV-384
    payments:
      description: List of payment objects. Each object will contain <code>payment_id</code>, <code>payment_mode</code>, <code>invoice_payment_id</code>, <code>gateway_transaction_id</code>, <code>description</code>, <code>date</code>, <code>reference_number</code> and <code>amount</code>.
      type: array
      items:
        type: object
        properties:
          payment_id:
            $ref: '#/components/schemas/payment_id'
          payment_mode:
            $ref: '#/components/schemas/payment_mode'
          invoice_payment_id:
            $ref: '#/components/schemas/invoice_payment_id'
          gateway_transaction_id:
            $ref: '#/components/schemas/gateway_transaction_id'
          description:
            $ref: '#/components/schemas/description'
          date:
            $ref: '#/components/schemas/date'
          reference_number:
            $ref: '#/components/schemas/reference_number'
          amount:
            description: Total amount of the payment made.
          exchange_rate:
            $ref: '#/components/schemas/exchange_rate'
    payment_id:
      description: The payment ID of the payment made for the invoice.
      type: string
      example: '90300000079467'
    payment_mode:
      description: The mode in which payment is made for the invoice. This can be <code>check</code>, <code>cash</code>, <code>creditcard</code>, <code>banktransfer</code>, <code>bankremittance</code>, <code>autotransaction</code> or <code>others</code>.
      type: string
      example: autotransaction
    invoice_payment_id:
      description: Unique ID generated for an instalment of payment made for a particular invoice.
      type: string
      example: '9030000079469'
    gateway_transaction_id:
      description: Gateway transaction ID provided for the payment made to the invoice. This is applicable only if <code>payment_mode</code> is autotransaction.
      type: string
      example: '9030000056453'
    invoice_items:
      description: The list of items which are all included in the invoice. Each item object will have <code>item_id</code>, <code>name</code>, <code>code</code>, <code>price</code>, <code>quantity</code> and <code>item_total</code>.
      type: array
      items:
        type: object
        properties:
          item_id:
            $ref: '#/components/schemas/item_id'
          name:
            description: Name which denotes the invoice.
            example: INV-384
          description:
            description: Small description about the Invoice item.
            example: Charges for this duration (from 16-April-2016 to 8-June-2016)
          code:
            $ref: '#/components/schemas/code'
          price:
            $ref: '#/components/schemas/price'
          quantity:
            $ref: '#/components/schemas/quantity'
          discount_amount:
            $ref: '#/components/schemas/discount_amount'
          item_total:
            $ref: '#/components/schemas/item_total'
          tax_id:
            $ref: '#/components/schemas/tax_id'
          tax_exemption_id:
            $ref: '#/components/schemas/tax_exemption_id'
          tax_exemption_code:
            $ref: '#/components/schemas/tax_exemption_code'
    item_id:
      description: The ID of the item included in the invoice.
      type: string
      example: '90300000079434'
    code:
      description: Item code of the item included in the invoice.
      type: string
      example: basic-monthly
    item_total:
      description: Cost of an item included in the invoice. This would be the product of quantity of the item included and the price of that item.
      type: integer
      example: 50
    invoice_id:
      description: Unique ID generated for an invoice.
      type: string
      example: '9030000079426'
    number:
      description: Unique number generated for the invoice.
      type: string
      example: INV-384
    invoice_date:
      description: Date in which the invoice was generated.
      type: string
      example: '2016-06-15'
    due_date:
      description: Date on which the payment is due for the invoice.
      type: string
      example: '2016-06-15'
    payment_expected_date:
      description: A date to specify the expected payment date.
      type: string
      example: 10-05-2016
    ach_payment_initiated:
      description: Set to true if ACH payment is initiated.
      type: boolean
      example: true
    coupons:
      description: The array of objects which contains the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> are applied to the invoice total.
      type: object
    payment_made:
      description: Payments can be made in multiple instalments. payment_made refers to the amount paid for the invoice in the respective instalment.
      type: number
      format: double
      example: 370
    balance:
      description: The unpaid amount of an invoice.
      type: number
      format: double
      example: 0
    credits_applied:
      description: Credits applied for the invoice.
      type: number
      format: double
      example: 0
    write_off_amount:
      description: The unpaid amount of an invoice that is written off.
      type: number
      format: double
      example: 0
    transaction_type:
      description: Small description about the type of transaction.
      type: string
      example: invoice
    date:
      description: Date at which the comment was commented.
      type: string
      example: '2016-06-15'
    time:
      description: Time at which the comment was commented.
      type: string
      example: 2016-06-11T17:57:13+0530
    operation_type:
      description: Type of operation performed on the invoice.
      type: string
      example: add
    transaction_id:
      description: Unique ID to denote the transaction.
      type: string
      example: '9030000079467'
    data_type:
      description: Data type of the custom field.
      type: string
      example: text
    creditnote_id:
      description: Unique ID denoting the credit note.
      type: string
      example: '9030000079876'
    creditnotes_number:
      description: Reference number for the credit note.
      type: string
      example: CN-26
    credited_date:
      description: Date on which the credit were applied.
      type: string
      example: '2016-06-15'
    credited_amount:
      description: Credited amount for the invoice.
      type: string
      example: 15
    activity_id:
      description: Unique ID to represent the activity.
      type: string
      example: '90300000745213'
    activity_time:
      description: Time in which the activity was recorded.
      type: string
      example: 2016-06-11T17:57:13+0530
    create-a-subscription-request:
      required:
        - customer
        - customer_id
        - card_id
        - account_id
        - plan
      type: object
      properties:
        add_to_unbilled_charges:
          description: When the value is given as true, the subscription would be created and charges for the current billing cycle will be put as unbilled. This can be converted to invoice at any later point of time.
          type: boolean
          example: true
        customer:
          description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
          type: object
          required:
            - display_name
            - email
          properties:
            display_name:
              $ref: '#/components/schemas/display_name'
            salutation:
              $ref: '#/components/schemas/salutation'
            first_name:
              $ref: '#/components/schemas/first_name'
            last_name:
              $ref: '#/components/schemas/last_name'
            email:
              $ref: '#/components/schemas/email'
            company_name:
              $ref: '#/components/schemas/company_name'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                required:
                  - label
                  - value
                properties:
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
            place_of_contact:
              $ref: '#/components/schemas/place_of_contact'
            gst_no:
              $ref: '#/components/schemas/gst_no'
            gst_treatment:
              $ref: '#/components/schemas/gst_treatment'
            is_taxable:
              $ref: '#/components/schemas/is_taxable'
            tax_id:
              $ref: '#/components/schemas/tax_id'
            tax_exemption_id:
              $ref: '#/components/schemas/tax_exemption_id'
            tax_exemption_code:
              $ref: '#/components/schemas/tax_exemption_code'
          x-required_info: for creating a subscription for new customer.
        customer_id:
          description: Customer ID of the customer for whom a subscription needs to be created.
          x-required_info: for creating a subscription for existing customer.
          type: string
          example: '90300000009456'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
        custom_fields:
          description: Additional fields for the invoices.
          type: array
          items:
            type: object
            properties:
              label:
                $ref: '#/components/schemas/label'
              value:
                $ref: '#/components/schemas/value'
        contact_persons_associated:
          $ref: '#/components/schemas/contact_persons_associated_payload'
        card_id:
          description: Enter the card_id of the card which has to be updated.
          example: '9030000079226'
          type: string
          x-required_info: if <code>auto_collect</code> is true
        starts_at:
          $ref: '#/components/schemas/starts_at'
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        place_of_supply:
          $ref: '#/components/schemas/place_of_supply'
        plan:
          description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
          type: object
          required:
            - plan_code
            - tax_id
          properties:
            plan_code:
              $ref: '#/components/schemas/plan_code'
            plan_description:
              $ref: '#/components/schemas/plan_description'
            price:
              $ref: '#/components/schemas/price'
            setup_fee:
              $ref: '#/components/schemas/setup_fee'
            setup_fee_tax_id:
              $ref: '#/components/schemas/setup_fee_tax_id'
            tags:
              $ref: '#/components/schemas/tags'
            item_custom_fields:
              $ref: '#/components/schemas/item_custom_fields'
            quantity:
              $ref: '#/components/schemas/quantity'
            tax_id:
              description: Unique ID of Tax or Tax Group that must be associated with the plan. <code>tax_id</code> must be empty for applying tax Exemption.
              x-required_info: for applying tax or tax exemption to a plan
              type: string
              example: '90300000009456'
            tax_exemption_id:
              $ref: '#/components/schemas/tax_exemption_id'
            tax_exemption_code:
              $ref: '#/components/schemas/tax_exemption_code'
            setup_fee_tax_exemption_id:
              $ref: '#/components/schemas/setup_fee_tax_exemption_id'
            setup_fee_tax_exemption_code:
              $ref: '#/components/schemas/setup_fee_tax_exemption_code'
            exclude_trial:
              $ref: '#/components/schemas/exclude_trial'
            exclude_setup_fee:
              $ref: '#/components/schemas/exclude_setup_fee'
            billing_cycles:
              $ref: '#/components/schemas/billing_cycles'
            trial_days:
              $ref: '#/components/schemas/trial_days'
        addons:
          description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
          type: array
          items:
            type: object
            required:
              - addon_code
              - tax_id
            properties:
              addon_code:
                $ref: '#/components/schemas/addon_code'
              addon_description:
                $ref: '#/components/schemas/addon_description'
              price:
                $ref: '#/components/schemas/price'
              quantity:
                description: Required quantity of the chosen addon.
                type: integer
                default: 1
              tags:
                $ref: '#/components/schemas/tags'
              item_custom_fields:
                $ref: '#/components/schemas/item_custom_fields'
              tax_id:
                description: Unique ID of Tax or Tax Group that must be associated with the addon. <code>tax_id</code> must be empty for applying tax Exemption.
                x-required_info: for applying tax or tax exemption to a addon
                type: string
                example: '90300000009456'
              tax_exemption_id:
                $ref: '#/components/schemas/tax_exemption_id'
              tax_exemption_code:
                $ref: '#/components/schemas/tax_exemption_code'
        coupon_code:
          $ref: '#/components/schemas/coupon_code'
        auto_collect:
          $ref: '#/components/schemas/auto_collect'
        reference_id:
          $ref: '#/components/schemas/reference_id'
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
        payment_gateways:
          description: List of payment gateways configured for the customer.
          type: array
          items:
            type: object
            properties:
              payment_gateway:
                description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                type: string
                example: test_gateway
        create_backdated_invoice:
          $ref: '#/components/schemas/create_backdated_invoice'
        can_charge_setup_fee_immediately:
          $ref: '#/components/schemas/can_charge_setup_fee_immediately'
        template_id:
          $ref: '#/components/schemas/template_id'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        account_id:
          $ref: '#/components/schemas/account_id'
    create-a-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Subscription has been created successfully.
          readOnly: true
        subscription:
          $ref: '#/components/schemas/subscription-response'
    list-all-subscriptions-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        subscriptions:
          type: array
          items:
            type: object
            properties:
              customer_id:
                $ref: '#/components/schemas/customer_id'
              customer_name:
                $ref: '#/components/schemas/customer_name'
              email:
                $ref: '#/components/schemas/email'
              plan_name:
                $ref: '#/components/schemas/plan_name'
              subscription_id:
                $ref: '#/components/schemas/subscription_id'
              name:
                $ref: '#/components/schemas/name'
              status:
                $ref: '#/components/schemas/status'
              amount:
                $ref: '#/components/schemas/amount'
              created_at:
                $ref: '#/components/schemas/created_at'
              activated_at:
                $ref: '#/components/schemas/activated_at'
              current_term_ends_at:
                $ref: '#/components/schemas/current_term_ends_at'
              current_term_starts_at:
                $ref: '#/components/schemas/current_term_starts_at'
              last_billing_at:
                $ref: '#/components/schemas/last_billing_at'
              next_billing_at:
                $ref: '#/components/schemas/next_billing_at'
              expires_at:
                $ref: '#/components/schemas/expires_at'
              interval:
                $ref: '#/components/schemas/interval'
              interval_unit:
                $ref: '#/components/schemas/interval_unit'
              auto_collect:
                $ref: '#/components/schemas/auto_collect'
              created_time:
                $ref: '#/components/schemas/created_time'
              updated_time:
                $ref: '#/components/schemas/updated_time'
              reference_id:
                $ref: '#/components/schemas/reference_id'
              salesperson_id:
                $ref: '#/components/schemas/salesperson_id'
              salesperson_name:
                $ref: '#/components/schemas/salesperson_name'
              currency_code:
                $ref: '#/components/schemas/currency_code'
              currency_symbol:
                $ref: '#/components/schemas/currency_symbol'
    retrieve-a-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            unbilled_charge_id:
              description: A unique ID if the subscription has any unbilled charges for the duration.
              type: string
              example: '903000000000099'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                item_custom_fields:
                  $ref: '#/components/schemas/item_custom_fields'
                price:
                  $ref: '#/components/schemas/price'
                tags:
                  $ref: '#/components/schemas/tags'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  tags:
                    $ref: '#/components/schemas/tags'
                  item_custom_fields:
                    $ref: '#/components/schemas/item_custom_fields'
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
                is_primary:
                  $ref: '#/components/schemas/is_primary'
                is_backup:
                  $ref: '#/components/schemas/is_backup'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    update-a-subscription-request:
      required:
        - customer_id
        - card_id
        - account_id
        - plan
      type: object
      properties:
        card_id:
          description: Enter the card_id of the card which has to be updated.
          example: '9030000079226'
          type: string
          x-required_info: if <code>auto_collect</code> is true.
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        plan:
          description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
          type: object
          required:
            - plan_code
            - tax_id
          properties:
            plan_code:
              $ref: '#/components/schemas/plan_code'
            plan_description:
              $ref: '#/components/schemas/plan_description'
            price:
              $ref: '#/components/schemas/price'
            setup_fee:
              $ref: '#/components/schemas/setup_fee'
            quantity:
              $ref: '#/components/schemas/quantity'
            tags:
              $ref: '#/components/schemas/tags'
            item_custom_fields:
              $ref: '#/components/schemas/item_custom_fields'
            tax_id:
              description: Unique ID of Tax or Tax Group that must be associated with the plan. <code>tax_id</code> must be empty for applying tax Exemption.
              x-required_info: for applying tax or tax exemption to a plan
              type: string
              example: '90300000009456'
            tax_exemption_id:
              $ref: '#/components/schemas/tax_exemption_id'
            tax_exemption_code:
              $ref: '#/components/schemas/tax_exemption_code'
            setup_fee_tax_exemption_id:
              $ref: '#/components/schemas/setup_fee_tax_exemption_id'
            setup_fee_tax_exemption_code:
              $ref: '#/components/schemas/setup_fee_tax_exemption_code'
            exclude_trial:
              $ref: '#/components/schemas/exclude_trial'
            exclude_setup_fee:
              $ref: '#/components/schemas/exclude_setup_fee'
            billing_cycles:
              $ref: '#/components/schemas/billing_cycles'
            trial_days:
              $ref: '#/components/schemas/trial_days'
        addons:
          description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
          type: array
          items:
            type: object
            required:
              - addon_code
              - tax_id
            properties:
              addon_code:
                $ref: '#/components/schemas/addon_code'
              addon_description:
                $ref: '#/components/schemas/addon_description'
              price:
                $ref: '#/components/schemas/price'
              quantity:
                description: Required quantity of the chosen addon.
                type: integer
              tags:
                $ref: '#/components/schemas/tags'
              item_custom_fields:
                $ref: '#/components/schemas/item_custom_fields'
              tax_id:
                description: Unique ID of Tax or Tax Group that must be associated with the addon. <code>tax_id</code> must be empty for applying tax Exemption.
                x-required_info: for applying tax or tax exemption to a addon
                type: string
                example: '90300000009456'
              tax_exemption_id:
                $ref: '#/components/schemas/tax_exemption_id'
              tax_exemption_code:
                $ref: '#/components/schemas/tax_exemption_code'
        auto_collect:
          $ref: '#/components/schemas/auto_collect'
        coupon_code:
          $ref: '#/components/schemas/coupon_code'
        reference_id:
          $ref: '#/components/schemas/reference_id'
        salesperson_id:
          $ref: '#/components/schemas/salesperson_id'
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
        end_of_term:
          $ref: '#/components/schemas/end_of_term'
        contact_persons_associated:
          $ref: '#/components/schemas/contact_persons_associated_payload'
        payment_terms:
          $ref: '#/components/schemas/payment_terms'
        payment_terms_label:
          $ref: '#/components/schemas/payment_terms_label'
        payment_gateways:
          description: List of payment gateways configured for the customer.
          type: array
          items:
            type: object
            properties:
              payment_gateway:
                description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                type: string
                example: test_gateway
        custom_fields:
          description: Additional fields for the invoices.
          type: array
          items:
            type: object
            properties:
              index:
                $ref: '#/components/schemas/index'
              label:
                $ref: '#/components/schemas/label'
              value:
                $ref: '#/components/schemas/value'
              data_type:
                $ref: '#/components/schemas/data_type'
        template_id:
          $ref: '#/components/schemas/template_id'
        can_charge_setup_fee_immediately:
          $ref: '#/components/schemas/can_charge_setup_fee_immediately'
        allow_partial_payments:
          $ref: '#/components/schemas/allow_partial_payments'
        customer_id:
          $ref: '#/components/schemas/customer_id'
        account_id:
          $ref: '#/components/schemas/account_id'
    update-a-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Subscription has been updated successfully.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                tags:
                  $ref: '#/components/schemas/tags'
                item_custom_fields:
                  $ref: '#/components/schemas/item_custom_fields'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  tags:
                    $ref: '#/components/schemas/tags'
                  item_custom_fields:
                    $ref: '#/components/schemas/item_custom_fields'
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                display_name:
                  $ref: '#/components/schemas/display_name'
                salutation:
                  $ref: '#/components/schemas/salutation'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
            can_charge_setup_fee_immediately:
              $ref: '#/components/schemas/can_charge_setup_fee_immediately'
    delete-a-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The subscription has been deleted.
          readOnly: true
    cancel-a-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Your subscription will be canceled at the end of this term.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '9030000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                salutation:
                  $ref: '#/components/schemas/salutation'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    reactivate-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Subscription has been reactivated successfully.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                tags:
                  $ref: '#/components/schemas/tags'
                item_custom_fields:
                  $ref: '#/components/schemas/item_custom_fields'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                billing_cycles:
                  $ref: '#/components/schemas/billing_cycles'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  tags:
                    $ref: '#/components/schemas/tags'
                  item_custom_fields:
                    $ref: '#/components/schemas/item_custom_fields'
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated with the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    view-scheduled-changes-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            product_id:
              $ref: '#/components/schemas/product_id'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            taxes:
              $ref: '#/components/schemas/taxes'
            coupon:
              $ref: '#/components/schemas/coupon'
            tax_id:
              $ref: '#/components/schemas/tax_id'
    subscription-activities-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        activities:
          type: array
          items:
            type: object
            properties:
              activity_id:
                $ref: '#/components/schemas/activity_id'
              description:
                description: Make a note of why the customer was charged so that if can be used for any future reference.
                type: string
                example: Invoice created - INV-000241
              activity_time:
                $ref: '#/components/schemas/activity_time'
              commented_by:
                description: Name of the user who added the comment.
                example: Zoho ERP
    buy-one-time-addon-request:
      required:
        - addons
      type: object
      properties:
        addons:
          description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
          type: array
          items:
            type: object
            required:
              - addon_code
              - tax_id
            properties:
              addon_code:
                $ref: '#/components/schemas/addon_code'
              quantity:
                description: Required quantity of the chosen addon.
                type: integer
                example: 1
              tags:
                $ref: '#/components/schemas/tags'
              item_custom_fields:
                $ref: '#/components/schemas/item_custom_fields'
              price:
                description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                type: number
                format: double
                example: 10
              tax_id:
                description: Unique ID of Tax or Tax Group that must be associated with the addon. <code>tax_id</code> must be empty for applying tax Exemption.
                x-required_info: for applying tax or tax exemption to a addon
                type: string
                example: '90300000000001234'
              tds_tax_id:
                $ref: '#/components/schemas/tds_tax_id'
              tax_exemption_id:
                description: Unique ID of the tax exemption applied for the addon. To apply tax exemption also include tax_id as empty string.
                type: string
                example: '90300000000000123'
              tax_exemption_code:
                description: Unique Code of the tax exemption applied for the addon. To apply tax exemption also include tax_id as empty string.
                type: string
        exchange_rate:
          $ref: '#/components/schemas/exchange_rate'
        coupon_code:
          description: The coupon code of the coupon which is to be applied to the one-time addon.
          type: string
        add_to_unbilled_charges:
          description: When the value is given as true, the charges for the add-on will be put as unbilled. If the subscription already has unbilled-charges, this will be added as another line item to it. The unbilled charge can be converted to invoice at any later point of time.
          type: boolean
          example: true
    buy-one-time-addon-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: One-time addon has been purchased successfully.
          readOnly: true
        invoice:
          type: object
          properties:
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            number:
              $ref: '#/components/schemas/number'
            status:
              $ref: '#/components/schemas/status'
            invoice_date:
              $ref: '#/components/schemas/invoice_date'
            due_date:
              $ref: '#/components/schemas/due_date'
            payment_expected_date:
              $ref: '#/components/schemas/payment_expected_date'
            ach_payment_initiated:
              $ref: '#/components/schemas/ach_payment_initiated'
            invoice_items:
              description: The list of items which are all included in the invoice. Each item object will have <code>item_id</code>, <code>name</code>, <code>code</code>, <code>price</code>, <code>quantity</code> and <code>item_total</code>.
              type: array
              items:
                type: object
                properties:
                  item_id:
                    $ref: '#/components/schemas/item_id'
                  name:
                    $ref: '#/components/schemas/name'
                  description:
                    description: Small description about the Invoice item.
                    example: One time addon purchased
                  code:
                    $ref: '#/components/schemas/code'
                  price:
                    $ref: '#/components/schemas/price'
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  tags:
                    $ref: '#/components/schemas/tags'
                  item_custom_fields:
                    $ref: '#/components/schemas/item_custom_fields'
                  discount_amount:
                    $ref: '#/components/schemas/discount_amount'
                  item_total:
                    $ref: '#/components/schemas/item_total'
            transaction_type:
              $ref: '#/components/schemas/transaction_type'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            email:
              $ref: '#/components/schemas/email'
            total:
              $ref: '#/components/schemas/total'
            payment_made:
              $ref: '#/components/schemas/payment_made'
            balance:
              $ref: '#/components/schemas/balance'
            coupons:
              description: The array of objects which contains the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> are applied to the invoice total.
              type: array
              items:
                type: object
                properties:
                  coupon_code:
                    $ref: '#/components/schemas/coupon_code'
                  coupon_name:
                    $ref: '#/components/schemas/coupon_name'
                  discount_amount:
                    $ref: '#/components/schemas/discount_amount'
            credits_applied:
              $ref: '#/components/schemas/credits_applied'
            credits:
              type: array
              items:
                type: object
                properties:
                  creditnote_id:
                    $ref: '#/components/schemas/creditnote_id'
                  creditnotes_number:
                    $ref: '#/components/schemas/creditnotes_number'
                  credited_date:
                    $ref: '#/components/schemas/credited_date'
                  credited_amount:
                    $ref: '#/components/schemas/credited_amount'
            taxes:
              description: Taxes associated with the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            write_off_amount:
              $ref: '#/components/schemas/write_off_amount'
            payments:
              description: List of payment objects. Each object will contain <code>payment_id</code>, <code>payment_mode</code>, <code>invoice_payment_id</code>, <code>gateway_transaction_id</code>, <code>description</code>, <code>date</code>, <code>reference_number</code> and <code>amount</code>.
              type: array
              items:
                type: object
                properties:
                  payment_id:
                    $ref: '#/components/schemas/payment_id'
                  payment_mode:
                    $ref: '#/components/schemas/payment_mode'
                  invoice_payment_id:
                    $ref: '#/components/schemas/invoice_payment_id'
                  gateway_transaction_id:
                    $ref: '#/components/schemas/gateway_transaction_id'
                  description:
                    $ref: '#/components/schemas/description'
                  date:
                    $ref: '#/components/schemas/date'
                  reference_number:
                    $ref: '#/components/schemas/reference_number'
                  amount:
                    $ref: '#/components/schemas/amount'
                  exchange_rate:
                    $ref: '#/components/schemas/exchange_rate'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            shipping_address:
              $ref: '#/components/schemas/shipping_address'
            comments:
              description: Lists the comments added by the system or by user.
              type: array
              items:
                type: object
                properties:
                  comment_id:
                    $ref: '#/components/schemas/comment_id'
                  description:
                    description: Small description about the comment.
                    example: Invoice has been marked as void
                  commented_by_id:
                    $ref: '#/components/schemas/commented_by_id'
                  commented_by:
                    description: Denotes who has added the comment. It will either <code> Zoho ERP </code> or the user name.
                  comment_type:
                    $ref: '#/components/schemas/comment_type'
                  date:
                    description: Date on which the comment was created.
                  time:
                    $ref: '#/components/schemas/time'
                  operation_type:
                    $ref: '#/components/schemas/operation_type'
                  transaction_id:
                    $ref: '#/components/schemas/transaction_id'
                  transaction_type:
                    $ref: '#/components/schemas/transaction_type'
    associate-a-coupon-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The coupon has been added to the subscription.
          readOnly: true
    remove-a-coupon-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The coupon has been removed from the subscription.
          readOnly: true
    update-card-request:
      required:
        - card_id
      type: object
      properties:
        card_id:
          $ref: '#/components/schemas/card_id'
        auto_collect:
          $ref: '#/components/schemas/auto_collect'
    update-card-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Card has been updated successfully.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '903000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '9030000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    remove-card-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Card has been successfully removed from the subscription.
          readOnly: true
    add-charge-request:
      required:
        - amount
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/amount'
        description:
          description: Make a note of why the customer was charged so that if can be used for any future reference.
          type: string
          example: Charges for Additional usage
        tags:
          $ref: '#/components/schemas/tags'
        item_custom_fields:
          $ref: '#/components/schemas/item_custom_fields'
        account_id:
          description: Account ID which the add charge is associated.
          type: string
          example: '90300000791111'
        add_to_unbilled_charges:
          description: When the value is given as true, the charges will be put as unbilled. If the subscription already has unbilled-charges, this will be added as another line item to it. The unbilled charge can be converted to invoice at any later point of time.
          type: boolean
          example: true
    add-charge-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: One time charge has been added successfully.
          readOnly: true
        invoice:
          type: object
          properties:
            invoice_id:
              $ref: '#/components/schemas/invoice_id'
            number:
              $ref: '#/components/schemas/number'
            status:
              $ref: '#/components/schemas/status'
            invoice_items:
              description: The list of items which are all included in the invoice. Each item object will have <code>item_id</code>, <code>name</code>, <code>code</code>, <code>price</code>, <code>quantity</code> and <code>item_total</code>.
              type: array
              items:
                type: object
                properties:
                  item_id:
                    $ref: '#/components/schemas/item_id'
                  name:
                    description: Name generated by concatenation of the product name and the selected plan.
                    example: One-time charge
                  description:
                    description: Small description about the Invoice item.
                    example: Charges for Additional usage
                  code:
                    $ref: '#/components/schemas/code'
                  price:
                    description: Price of a plan for a particular subscription. If a value is provided here, the plan's price for this subscription will be changed to the given value. If no value is provided, the plan's price would be the same as what it was when it was created.
                    type: number
                    format: double
                    example: 50
                  quantity:
                    $ref: '#/components/schemas/quantity'
                  tags:
                    $ref: '#/components/schemas/tags'
                  item_custom_fields:
                    $ref: '#/components/schemas/item_custom_fields'
                  item_total:
                    $ref: '#/components/schemas/item_total'
                  account_id:
                    description: Account ID which the add charge is associated.
                    type: string
                    example: '90300000791111'
                  account_name:
                    description: Account Name which the add charge is associated.
                    type: string
                    example: General Income
            invoice_date:
              $ref: '#/components/schemas/invoice_date'
            due_date:
              $ref: '#/components/schemas/due_date'
            payment_expected_date:
              $ref: '#/components/schemas/payment_expected_date'
            ach_payment_initiated:
              $ref: '#/components/schemas/ach_payment_initiated'
            transaction_type:
              $ref: '#/components/schemas/transaction_type'
            customer_id:
              $ref: '#/components/schemas/customer_id'
            customer_name:
              $ref: '#/components/schemas/customer_name'
            email:
              $ref: '#/components/schemas/email'
            total:
              $ref: '#/components/schemas/total'
            payment_made:
              description: Payments can be made in multiple instalments. payment_made refers to the amount paid for the invoice in the respective instalment.
              example: 50
            balance:
              $ref: '#/components/schemas/balance'
            credits_applied:
              $ref: '#/components/schemas/credits_applied'
            write_off_amount:
              $ref: '#/components/schemas/write_off_amount'
            payments:
              description: List of payment objects. Each object will contain <code>payment_id</code>, <code>payment_mode</code>, <code>invoice_payment_id</code>, <code>gateway_transaction_id</code>, <code>description</code>, <code>date</code>, <code>reference_number</code> and <code>amount</code>.
              type: array
              items:
                type: object
                properties:
                  payment_id:
                    $ref: '#/components/schemas/payment_id'
                  payment_mode:
                    $ref: '#/components/schemas/payment_mode'
                  invoice_payment_id:
                    $ref: '#/components/schemas/invoice_payment_id'
                  gateway_transaction_id:
                    $ref: '#/components/schemas/gateway_transaction_id'
                  description:
                    $ref: '#/components/schemas/description'
                  date:
                    $ref: '#/components/schemas/date'
                  reference_number:
                    $ref: '#/components/schemas/reference_number'
                  amount:
                    $ref: '#/components/schemas/amount'
                  exchange_rate:
                    $ref: '#/components/schemas/exchange_rate'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            billing_address:
              $ref: '#/components/schemas/billing_address'
            comments:
              description: Lists the comments added by the system or by user.
              type: array
              items:
                type: object
                properties:
                  comment_id:
                    $ref: '#/components/schemas/comment_id'
                  description:
                    description: Small description about the comment.
                    example: Invoice created from subscription - GatorHost-Basic.
                  commented_by_id:
                    $ref: '#/components/schemas/commented_by_id'
                  commented_by:
                    description: Denotes who has added the comment. It will either <code> Zoho ERP </code> or the user name.
                  comment_type:
                    $ref: '#/components/schemas/comment_type'
                  date:
                    description: Date on which the comment was created.
                  time:
                    $ref: '#/components/schemas/time'
                  operation_type:
                    $ref: '#/components/schemas/operation_type'
                  transaction_id:
                    $ref: '#/components/schemas/transaction_id'
                  transaction_type:
                    $ref: '#/components/schemas/transaction_type'
    add-contact-person-request:
      required:
        - contactpersons
      type: object
      properties:
        contactpersons:
          description: List of contact person objects. Each object contains <code>contactperson_id</code>.
          type: array
          items:
            type: object
            required:
              - contactperson_id
            properties:
              contactperson_id:
                $ref: '#/components/schemas/contactperson_id'
              communication_preference:
                $ref: '#/components/schemas/communication_preference'
    add-contact-person-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The contact person's information has been added.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 50
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '9030000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '9030000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    postpone-renewal-request:
      required:
        - renewal_at
      type: object
      properties:
        renewal_at:
          $ref: '#/components/schemas/renewal_at'
    postpone-renewal-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Billing date of the subscription has been changed.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    addedit-description-for-a-item-in-line-items-list-request:
      required:
        - description
      type: object
      properties:
        description:
          description: Make a note of why the customer was charged so that if can be used for any future reference.
          type: string
          example: ''
    addedit-description-for-a-item-in-line-items-list-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Item description has been updated successfully.
          readOnly: true
    change-to-onlineoffline-mode-request:
      required:
        - auto_collect
      type: object
      properties:
        auto_collect:
          description: auto_collect is set to true for creating an online subscription which will charge the customer's card automatically on every renewal. To create an offline subscriptions, set auto_collect to false.
          type: boolean
          example: true
    change-to-onlineoffline-mode-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Auto charge Status has been changed successfully.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    update-reference-request:
      required:
        - reference_id
      type: object
      properties:
        reference_id:
          description: A string of your choice is required to easily identify and keep track of your subscriptions.
          type: string
          example: zylker
    update-reference-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Subscription has been updated successfully.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    update-sales-person-request:
      required:
        - salesperson_id
        - salesperson_name
      type: object
      properties:
        salesperson_id:
          description: Unique Id of the sales person assigned for the subscription.
          type: string
          example: ''
        salesperson_name:
          $ref: '#/components/schemas/salesperson_name'
    update-sales-person-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Sales Person has been updated successfully.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
            amount:
              $ref: '#/components/schemas/amount'
            created_at:
              $ref: '#/components/schemas/created_at'
            activated_at:
              $ref: '#/components/schemas/activated_at'
            current_term_starts_at:
              $ref: '#/components/schemas/current_term_starts_at'
            current_term_ends_at:
              $ref: '#/components/schemas/current_term_ends_at'
            last_billing_at:
              $ref: '#/components/schemas/last_billing_at'
            next_billing_at:
              $ref: '#/components/schemas/next_billing_at'
            expires_at:
              $ref: '#/components/schemas/expires_at'
            interval:
              $ref: '#/components/schemas/interval'
            interval_unit:
              $ref: '#/components/schemas/interval_unit'
            auto_collect:
              $ref: '#/components/schemas/auto_collect'
            created_time:
              $ref: '#/components/schemas/created_time'
            updated_time:
              $ref: '#/components/schemas/updated_time'
            reference_id:
              $ref: '#/components/schemas/reference_id'
            salesperson_id:
              $ref: '#/components/schemas/salesperson_id'
            salesperson_name:
              $ref: '#/components/schemas/salesperson_name'
            child_invoice_id:
              $ref: '#/components/schemas/child_invoice_id'
            currency_code:
              $ref: '#/components/schemas/currency_code'
            currency_symbol:
              $ref: '#/components/schemas/currency_symbol'
            end_of_term:
              $ref: '#/components/schemas/end_of_term'
            product_id:
              $ref: '#/components/schemas/product_id'
            product_name:
              $ref: '#/components/schemas/product_name'
            plan:
              description: Plan object for which the subscription is to be created. This contains <code>plan_code</code>, <code>name</code>, <code>price</code>, <code>quantity</code>.
              type: object
              properties:
                plan_code:
                  $ref: '#/components/schemas/plan_code'
                name:
                  $ref: '#/components/schemas/name'
                quantity:
                  $ref: '#/components/schemas/quantity'
                price:
                  $ref: '#/components/schemas/price'
                discount:
                  $ref: '#/components/schemas/discount'
                total:
                  $ref: '#/components/schemas/total'
                setup_fee:
                  $ref: '#/components/schemas/setup_fee'
                plan_description:
                  $ref: '#/components/schemas/plan_description'
                tax_id:
                  $ref: '#/components/schemas/tax_id'
                trial_days:
                  $ref: '#/components/schemas/trial_days'
            addons:
              description: List of addon objects which are to be included in the subscription. Each object contains <code>addon_code</code>, <code>name</code>, <code>price</code> and <code>quantity</code>.
              type: array
              items:
                type: object
                properties:
                  addon_code:
                    $ref: '#/components/schemas/addon_code'
                  name:
                    description: Name of the addon.
                    example: Monthly Addon
                  addon_description:
                    $ref: '#/components/schemas/addon_description'
                  quantity:
                    description: Required quantity of the chosen addon.
                    type: integer
                    example: 1
                  price:
                    description: A value can be provided here if the per unit addon price has to be overridden for this subscription.
                    type: number
                    format: double
                    example: 10
                  discount:
                    description: Discount applied to the addon, which can be either a percentage or a flat amount. For percentage discounts, the value should include the % symbol (e.g., 10%). For example, on Rs.1000, a 10% discount results in Rs.900, while a flat Rs.200 discount results in Rs.800.
                  total:
                    description: Total amount for the addon.
                  tax_id:
                    description: Unique ID of the tax applied for the addon.
            coupon:
              description: The object containing the details of the added coupon. <code>coupon_code</code> and <code>discount_amount</code> applied to the invoice total.
              type: object
              properties:
                coupon_code:
                  $ref: '#/components/schemas/coupon_code'
                discount_amount:
                  $ref: '#/components/schemas/discount_amount'
            card:
              description: Customer's card object. This contains <code>payment_gateway</code>, <code>last_four_digits</code>, <code>expiry_month</code> and <code>expiry_year</code>.
              type: object
              properties:
                card_id:
                  description: Customer's card ID.
                  example: '90300000079226'
                last_four_digits:
                  $ref: '#/components/schemas/last_four_digits'
                payment_gateway:
                  $ref: '#/components/schemas/payment_gateway'
                expiry_month:
                  $ref: '#/components/schemas/expiry_month'
                expiry_year:
                  $ref: '#/components/schemas/expiry_year'
            payment_terms:
              $ref: '#/components/schemas/payment_terms'
            payment_terms_label:
              $ref: '#/components/schemas/payment_terms_label'
            can_add_bank_account:
              $ref: '#/components/schemas/can_add_bank_account'
            customer:
              description: Customer object of the customer for whom you want to create a subscription. Each object contains <code>display_name</code>, <code>company_name</code>, <code>first_name</code>, <code>last_name</code>, <code>email</code>, <code>fax</code>, <code>currency_code</code> and <code>billing_address</code>.
              type: object
              properties:
                customer_id:
                  description: A unique ID generated by the server. This can be used as an identifier.
                  example: '903000000000099'
                display_name:
                  $ref: '#/components/schemas/display_name'
                first_name:
                  $ref: '#/components/schemas/first_name'
                last_name:
                  $ref: '#/components/schemas/last_name'
                email:
                  $ref: '#/components/schemas/email'
                company_name:
                  $ref: '#/components/schemas/company_name'
                billing_address:
                  $ref: '#/components/schemas/billing_address'
                shipping_address:
                  $ref: '#/components/schemas/shipping_address'
                payment_terms:
                  $ref: '#/components/schemas/payment_terms'
                payment_terms_label:
                  $ref: '#/components/schemas/payment_terms_label'
            custom_fields:
              description: Additional fields for the invoices.
              type: array
              items:
                type: object
                properties:
                  index:
                    $ref: '#/components/schemas/index'
                  label:
                    $ref: '#/components/schemas/label'
                  value:
                    $ref: '#/components/schemas/value'
                  data_type:
                    $ref: '#/components/schemas/data_type'
            taxes:
              description: Taxes associated wit the subscription.
              type: array
              items:
                type: object
                properties:
                  tax_id:
                    $ref: '#/components/schemas/tax_id'
                  tax_name:
                    $ref: '#/components/schemas/tax_name'
                  tax_amount:
                    $ref: '#/components/schemas/tax_amount'
            contact_persons_associated:
              $ref: '#/components/schemas/contact_persons_associated'
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
            payment_gateways:
              description: List of payment gateways configured for the customer.
              type: array
              items:
                type: object
                properties:
                  payment_gateway:
                    description: 'Payment gateway associated with the subscription. Supported payment gateway values: <code>stripe</code>, <code>razorpay</code>, <code>ccavenue</code>, <code>payu</code>, <code>icici_eazypay</code>, <code>test_gateway</code>.'
                    type: string
                    example: test_gateway
    update-custom-fields-request:
      required:
        - custom_fields
      type: object
      properties:
        custom_fields:
          description: Additional fields for the invoices.
          type: array
          items:
            type: object
            required:
              - label
              - value
            properties:
              label:
                $ref: '#/components/schemas/label'
              value:
                $ref: '#/components/schemas/value'
    update-custom-fields-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Custom Fields Updated Successfully.
          readOnly: true
        data:
          type: object
          properties:
            index:
              $ref: '#/components/schemas/index'
            value:
              $ref: '#/components/schemas/value'
            label:
              $ref: '#/components/schemas/label'
            data_type:
              $ref: '#/components/schemas/data_type'
            customfield_id:
              $ref: '#/components/schemas/customfield_id'
    add-a-note-request:
      type: object
      properties:
        description:
          type: string
          description: Small description about the note.
          example: Subscription renewed after customer request.
    add-a-note-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Notes added.
          readOnly: true
        note:
          type: object
          properties:
            notes:
              description: List of objects containing <code>note_id</code>, <code>description</code>, <code>commented_by</code> and <code>commented_time</code>
              type: array
              items:
                type: object
                properties:
                  note_id:
                    $ref: '#/components/schemas/note_id'
                  description:
                    description: Comments about the subscription made by the user.
                    type: string
                    example: ''
                  commented_by:
                    $ref: '#/components/schemas/commented_by'
                  commented_time:
                    $ref: '#/components/schemas/commented_time'
    delete-a-note-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The note has been deleted.
          readOnly: true
    get-subscription-custom-fields-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        customfields:
          type: array
          description: List of custom fields associated with the subscription.
          items:
            type: object
            properties:
              customfield_id:
                type: string
                description: Unique identifier of the custom field.
                example: '90300000000301'
              label:
                type: string
                description: Display label of the custom field.
                example: Account Manager
              value:
                type: string
                description: Value of the custom field.
                example: John Smith
    list-subscription-notes-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        notes:
          type: array
          description: List of notes associated with the subscription.
          items:
            type: object
            properties:
              note_id:
                $ref: '#/components/schemas/note_id'
              description:
                type: string
                description: Content of the note.
                example: Subscription renewed after customer request.
              commented_by:
                $ref: '#/components/schemas/commented_by'
              commented_time:
                $ref: '#/components/schemas/commented_time'
    delete-subscription-scheduled-changes-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Scheduled changes have been deleted.
          readOnly: true
    extend-subscription-request:
      type: object
      properties:
        billing_cycles:
          type: integer
          description: Number of billing cycles to extend the subscription by.
          example: 2
        payment:
          type: object
          description: Payment details to record along with the extension.
          properties:
            amount:
              type: number
              description: Amount received for the payment.
              example: 100
            payment_mode:
              type: string
              description: Mode of payment.
              example: cash
            date:
              type: string
              description: 'Date of the payment. Format: <code>yyyy-MM-dd</code>.'
              example: '2026-04-06'
            description:
              type: string
              description: Description for the payment.
              example: Payment for subscription extension.
            reference_number:
              type: string
              description: Reference number for the payment.
              example: REF-001
            deposit_to_account_id:
              type: string
              description: Unique identifier of the account to which the payment is deposited.
              example: '90300000000403'
    extend-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Expiration date updated
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
    toggle-metered-billing-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Metered Billing status changed
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
    resume-subscription-request:
      type: object
      properties:
        resume_at:
          type: string
          description: 'Date on which the subscription should resume. Format: <code>yyyy-MM-dd</code>.'
          example: '2026-04-10'
    resume-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The subscription has been resumed.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
    pause-subscription-request:
      type: object
      properties:
        pause_at:
          type: string
          description: 'Date on which the subscription should be paused. Format: <code>yyyy-MM-dd</code>.'
          example: '2026-05-01'
        credits_for_pause_period:
          type: boolean
          description: Set to <code>true</code> to issue credits for the pause period.
          example: false
    pause-subscription-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: The subscription has been paused.
          readOnly: true
        subscription:
          type: object
          properties:
            subscription_id:
              $ref: '#/components/schemas/subscription_id'
            name:
              $ref: '#/components/schemas/name'
            status:
              $ref: '#/components/schemas/status'
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.in/oauth/v2/auth
          scopes:
            ERP.subscriptions.CREATE: Create Subscriptions
            ERP.subscriptions.READ: Read Subscriptions
            ERP.subscriptions.UPDATE: Update Subscriptions
            ERP.subscriptions.DELETE: Delete Subscriptions
