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

# Create Single Plan

> Create a subscription plan under your integration.

## Mobile Money

<Info>
  When it is a `mobile_money`payment  and a `planId` is included, Spotflow will automatically send a mandate approval request to the customer's phone. The subscription will only activate once the mandate is approved.

  See the full guide on [Mobile Money Subscriptions](/features/mobile-money-subscriptions).
</Info>

To learn on payment states, go to [this page](/developer-resources/payment-states)


## OpenAPI

````yaml openapi.json POST /plans
openapi: 3.1.0
info:
  title: Spotflow
  description: ''
  license:
    name: MIT
  version: 1.0.0
servers:
  - description: Production server
    url: https://api.spotflow.co/api/v1
security:
  - bearerAuth: []
paths:
  /plans:
    post:
      description: Create a subscription plan under your integration.
      operationId: singleSubsciptionsPlan
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  example: Standard Monthly Plan
                  description: Name or title of the plan
                cycleCount:
                  type: integer
                  example: '3'
                  description: Maximum billing cycles before the plan completes
                retrial:
                  type: integer
                  example: '3'
                  description: >-
                    ***Note that retrial only applies to card subscriptions, not
                    mobile money.*** Retry count for failed card payments.
                endDate:
                  type: integer
                  example: '2026-10-29'
                  description: The date all subscription cycles end
                frequency:
                  type: string
                  enum:
                    - DAILY
                    - WEEKLY
                    - MONTHLY
                    - '  QUARTERLY'
                    - ANNUAL
                  description: Billing frequency for the plan
                internalReference:
                  type: string
                  description: Internal reference code for the plan
                  example: PLAN-STD-001
                pricingOptions:
                  type: array
                  description: Pricing options for the plan
                  items:
                    type: object
                    properties:
                      amount:
                        type: number
                        description: >-
                          Amount to be charged per billing cycle. ***If you plan
                          to use this subscription plan for mobile money
                          payments, make sure the currency matches a supported
                          mobile money region. See [Mobile Money
                          Subscriptions](/features/mobile-money-subscriptions)
                          for supported currencies and providers.***
                      currency:
                        type: string
                        description: >-
                          Currency code for the plan (e.g. USD, NGN). ***If you
                          plan to use this subscription plan for mobile money
                          payments, make sure the currency matches a supported
                          mobile money region. See [Mobile Money
                          Subscriptions](/features/mobile-money-subscriptions)
                          for supported currencies and providers.***
                        example: NGN
                    required:
                      - amount
                      - currency
                trial:
                  type: object
                  properties:
                    periodInDays:
                      type: number
                      default: 0
                    pricingList:
                      type: array
                      description: Pricing options for the trial period
                      items:
                        type: object
                        properties:
                          amount:
                            type: number
                            description: Amount to be charged during the trial period
                          currency:
                            type: string
                            description: Currency code for the trial period (e.g. USD, NGN)
                            example: NGN
                        required:
                          - amount
                          - currency
      responses:
        '200':
          description: A JSON array of subscription objects.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SubscriptionPlanDetailsResponse'
        '400':
          description: Not Found - No subscriptions found for the given plan ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error400'
        '401':
          description: Unauthorized - Invalid or missing authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubscriptionError401'
components:
  schemas:
    SubscriptionPlanDetailsResponse:
      type: object
      description: >-
        Represents detailed information about a subscription plan including
        pricing, trial, and region availability.
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the subscription plan (UUID).
        title:
          type: string
          example: string
          description: The title or name of the subscription plan.
        frequency:
          type: string
          enum:
            - DAILY
            - WEEKLY
            - MONTHLY
            - QUARTERLY
            - BIANNUAL
            - ANNUAL
          description: Billing frequency for the subscription plan.
        internalReference:
          type: string
          example: string
          description: Internal reference code or identifier for the plan.
        amount:
          type: number
          description: The cost amount for the subscription plan.
        currency:
          type: string
          example: NGN
          description: The currency of the subscription plan (e.g., NGN, USD).
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
            - ARCHIVED
          description: The current status of the subscription plan.
        regions:
          type: array
          items:
            type: string
          description: List of regions where this plan is available.
        subscribers:
          type: integer
          description: Total number of active subscribers under this plan.
        subscriptions:
          type: integer
          description: Total number of subscriptions created for this plan.
        createdAt:
          type: string
          format: date-time
          description: Date and time when the plan was created.
        trial:
          type: object
          description: Details about the trial period associated with this plan.
          properties:
            id:
              type: string
              format: uuid
              description: Unique identifier for the trial configuration.
            planId:
              type: string
              format: uuid
              description: The plan ID this trial configuration is associated with.
            periodInDays:
              type: integer
              description: Number of days for the trial period.
            pricingList:
              type: array
              items:
                type: object
                properties:
                  type:
                    type: string
                    enum:
                      - FLAT
                      - TIERED
                    description: The pricing model for the trial period.
                  amount:
                    type: number
                    description: The cost amount during the trial period.
                  currency:
                    type: string
                    example: NGN
                    description: Currency used for the trial pricing.
              description: List of pricing configurations for the trial.
        pricingOptions:
          type: array
          description: Different pricing options available for the plan.
          items:
            type: object
            properties:
              amount:
                type: number
                description: The cost amount for this pricing option.
              currency:
                type: string
                example: NGN
                description: The currency code for this pricing option (e.g., NGN, USD).
      required:
        - id
        - title
        - frequency
        - amount
        - currency
        - status
        - createdAt
    Error400:
      type: object
      properties:
        error:
          type: string
          example: Missing Parameter
        message:
          type: string
          example: missing_parameter
        status:
          type: integer
          format: float
          example: 400
    SubscriptionError401:
      type: object
      properties:
        code:
          type: string
          example: AUTH_ERROR
        message:
          type: string
          example: Authorization token is required.
        statusCode:
          type: integer
          format: float
          example: 401
        requestMarker:
          type: string
          format: uuid
      required:
        - status
        - statusCode
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````