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

> Initiate a recurring subscription payment on Cardano using NFT-based subscription management and automated billing.

# Initiate a subscription



## OpenAPI

````yaml cardano/managed-contracts-api/openapi.json post /contracts/subscription/initSubscription
openapi: 3.0.3
info:
  title: Cardano - Managed Contracts API
  description: https://docs.gomaestro.org/getting-started
  contact:
    name: Maestro
    email: info@gomaestro.org
    url: https://gomaestro.org/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.txt
  version: v1.9.0
servers:
  - url: https://mainnet.gomaestro-api.org/v1
    description: Cardano Mainnet
  - url: https://preprod.gomaestro-api.org/v1
    description: Cardano Preprod
  - url: https://preview.gomaestro-api.org/v1
    description: Cardano Preview
security:
  - api-key: []
paths:
  /contracts/subscription/initSubscription:
    post:
      tags:
        - Subscription
      summary: Initiate a subscription
      description: Initiate a new subscription
      operationId: initSubscription
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InitSubscriptionDto'
      responses:
        '202':
          description: Subscription initiated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transaction'
        '400':
          description: Error initiating subscription
components:
  schemas:
    InitSubscriptionDto:
      type: object
      properties:
        service_nft_tn:
          type: string
          description: Service NFT token name
        account_nft_tn:
          type: string
          description: Account NFT token name
        subscription_fee:
          $ref: '#/components/schemas/FeeDto'
        total_subscription_fee:
          type: string
          description: Total subscription fee
        subscription_start:
          type: string
          description: Subscription start timestamp
        subscription_end:
          type: string
          description: Subscription end timestamp
        interval_length:
          type: string
          description: Length of the interval
        interval_amount:
          type: string
          description: Amount per interval
        num_intervals:
          type: string
          description: Number of intervals
        last_claimed:
          type: string
          description: Last claimed timestamp
        penalty_fee:
          $ref: '#/components/schemas/FeeDto'
        penalty_fee_qty:
          type: string
          description: Quantity of the penalty fee
        minimum_ada:
          type: string
          description: Minimum ADA required
      required:
        - service_nft_tn
        - account_nft_tn
        - subscription_fee
        - total_subscription_fee
        - subscription_start
        - subscription_end
        - interval_length
        - interval_amount
        - num_intervals
        - last_claimed
        - penalty_fee
        - penalty_fee_qty
        - minimum_ada
    Transaction:
      type: object
      description: Unsigned transaction
      properties:
        cbor_hex:
          type: string
          description: CBOR hexadecimal representation of the transaction
        tx_hash:
          type: string
          description: Transaction hash
      required:
        - cbor_hex
        - tx_hash
    FeeDto:
      type: object
      properties:
        policy_id:
          type: string
          description: Policy ID
        asset_name:
          type: string
          description: Asset name
      required:
        - policy_id
        - asset_name
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: api-key
      description: Project API Key

````