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

# Create custom pricing plan for a product 

> Create a new pricing plan (one-time payment or partial payment) for a digital product using the product slug. The plan will be created in draft status.

Authentication with the "FERMION-API-KEY" header is required to use this endpoint.

Rate limit: Maximum 60 requests in a window of 1m.



## OpenAPI

````yaml https://backend.codedamn.com/webhook/fermion-backend-openapi.yaml post /public/create-digital-product-pricing-plan
openapi: 3.0.0
info:
  version: 1.0.0
  title: Fermion Backend API
  description: Documentation for interacting with the Fermion API
  contact:
    name: Fermion Support
    email: support@codedamn.com
servers:
  - url: https://backend.codedamn.com/api
    description: Fermion primary backend server
security: []
externalDocs:
  description: Fermion Docs
  url: https://docs.fermion.app
paths:
  /public/create-digital-product-pricing-plan:
    post:
      tags:
        - Product
      summary: 'Create custom pricing plan for a product '
      description: >-
        Create a new pricing plan (one-time payment or partial payment) for a
        digital product using the product slug. The plan will be created in
        draft status.


        Authentication with the "FERMION-API-KEY" header is required to use this
        endpoint.


        Rate limit: Maximum 60 requests in a window of 1m.
      requestBody:
        description: API Request Body
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: array
                  items:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          fermionDigitalProductSlug:
                            type: string
                            description: >-
                              Slug of the digital product. You can set custom
                              slugs when creating the product.
                          newPlanData:
                            anyOf:
                              - type: object
                                properties:
                                  fermionDigitalProductPriceId:
                                    type: string
                                  fermionDigitalProductId:
                                    type: string
                                  createdAt:
                                    type: string
                                    format: date-time
                                  updatedAt:
                                    type: string
                                    format: date-time
                                  planStatus:
                                    type: string
                                    enum:
                                      - Published
                                      - Unlisted
                                      - Draft
                                      - Deleted
                                  planType:
                                    type: string
                                    enum:
                                      - OneTimePaymentPlan
                                  config:
                                    type: object
                                    properties:
                                      friendlyPlanName:
                                        type: string
                                      prices:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            currencyType:
                                              type: string
                                              enum:
                                                - Aud
                                                - Aed
                                                - Bdt
                                                - Brl
                                                - Cad
                                                - Cop
                                                - Dop
                                                - Etb
                                                - Eur
                                                - Gbp
                                                - Idr
                                                - Inr
                                                - Kes
                                                - Lkr
                                                - Mad
                                                - Myr
                                                - Mxn
                                                - Ngn
                                                - Npr
                                                - Nzd
                                                - Pkr
                                                - Pln
                                                - Rub
                                                - Thb
                                                - Try
                                                - Usd
                                                - Sgd
                                                - Cny
                                                - Sar
                                                - Twd
                                                - Jpy
                                                - Krw
                                                - Vnd
                                            currencySymbol:
                                              type: string
                                            priceInLowestCurrencyUnit:
                                              type: number
                                              minimum: 0
                                          required:
                                            - currencyType
                                            - currencySymbol
                                            - priceInLowestCurrencyUnit
                                      inrCurrencySpecificData:
                                        anyOf:
                                          - type: object
                                            properties:
                                              isAmountExclusiveOfGst:
                                                type: boolean
                                            required:
                                              - isAmountExclusiveOfGst
                                          - nullable: true
                                          - nullable: true
                                      defaultFallbackCurrency:
                                        type: string
                                        enum:
                                          - Aud
                                          - Aed
                                          - Bdt
                                          - Brl
                                          - Cad
                                          - Cop
                                          - Dop
                                          - Etb
                                          - Eur
                                          - Gbp
                                          - Idr
                                          - Inr
                                          - Kes
                                          - Lkr
                                          - Mad
                                          - Myr
                                          - Mxn
                                          - Ngn
                                          - Npr
                                          - Nzd
                                          - Pkr
                                          - Pln
                                          - Rub
                                          - Thb
                                          - Try
                                          - Usd
                                          - Sgd
                                          - Cny
                                          - Sar
                                          - Twd
                                          - Jpy
                                          - Krw
                                          - Vnd
                                      additionalDataToCollectOnCheckout:
                                        type: object
                                        properties:
                                          customFields:
                                            type: array
                                            items:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    fieldType:
                                                      type: string
                                                      enum:
                                                        - string
                                                    label:
                                                      type: string
                                                    sublabel:
                                                      type: string
                                                    isRequired:
                                                      type: boolean
                                                      default: false
                                                  required:
                                                    - fieldType
                                                    - label
                                                    - sublabel
                                                - type: object
                                                  properties:
                                                    fieldType:
                                                      type: string
                                                      enum:
                                                        - select
                                                    label:
                                                      type: string
                                                    sublabel:
                                                      type: string
                                                    isRequired:
                                                      type: boolean
                                                    options:
                                                      type: array
                                                      items:
                                                        type: string
                                                      minItems: 1
                                                  required:
                                                    - fieldType
                                                    - label
                                                    - sublabel
                                                    - isRequired
                                                    - options
                                        required:
                                          - customFields
                                    required:
                                      - friendlyPlanName
                                      - prices
                                      - inrCurrencySpecificData
                                      - defaultFallbackCurrency
                                required:
                                  - fermionDigitalProductPriceId
                                  - fermionDigitalProductId
                                  - createdAt
                                  - updatedAt
                                  - planStatus
                                  - planType
                                  - config
                              - type: object
                                properties:
                                  fermionDigitalProductPriceId:
                                    type: string
                                  fermionDigitalProductId:
                                    type: string
                                  createdAt:
                                    type: string
                                    format: date-time
                                  updatedAt:
                                    type: string
                                    format: date-time
                                  planStatus:
                                    type: string
                                    enum:
                                      - Published
                                      - Unlisted
                                      - Draft
                                      - Deleted
                                  planType:
                                    type: string
                                    enum:
                                      - PartialPaymentPlan
                                  config:
                                    type: object
                                    properties:
                                      friendlyPlanName:
                                        type: string
                                      currencySpecificPlanInformation:
                                        type: array
                                        items:
                                          type: object
                                          properties:
                                            currencySymbol:
                                              type: string
                                            currencyType:
                                              type: string
                                              enum:
                                                - Aud
                                                - Aed
                                                - Bdt
                                                - Brl
                                                - Cad
                                                - Cop
                                                - Dop
                                                - Etb
                                                - Eur
                                                - Gbp
                                                - Idr
                                                - Inr
                                                - Kes
                                                - Lkr
                                                - Mad
                                                - Myr
                                                - Mxn
                                                - Ngn
                                                - Npr
                                                - Nzd
                                                - Pkr
                                                - Pln
                                                - Rub
                                                - Thb
                                                - Try
                                                - Usd
                                                - Sgd
                                                - Cny
                                                - Sar
                                                - Twd
                                                - Jpy
                                                - Krw
                                                - Vnd
                                            realFullPriceOfProductInLowestCurrencyUnitIrrespectiveOfTaxAndExclusiveOfDiscount:
                                              type: number
                                            minimumMandatoryPaymentAmountInLowestCurrencyUnitIrrespectiveOfDiscountAndTax:
                                              type: number
                                              minimum: 0
                                            emiIntervalInDays:
                                              type: number
                                              minimum: 0
                                              maximum: 180
                                            totalNumberOfInstallmentOptions:
                                              type: array
                                              items:
                                                type: number
                                                minimum: 1
                                                maximum: 50
                                              minItems: 1
                                          required:
                                            - currencySymbol
                                            - currencyType
                                            - >-
                                              realFullPriceOfProductInLowestCurrencyUnitIrrespectiveOfTaxAndExclusiveOfDiscount
                                            - >-
                                              minimumMandatoryPaymentAmountInLowestCurrencyUnitIrrespectiveOfDiscountAndTax
                                            - emiIntervalInDays
                                            - totalNumberOfInstallmentOptions
                                      defaultFallbackCurrency:
                                        type: string
                                        enum:
                                          - Aud
                                          - Aed
                                          - Bdt
                                          - Brl
                                          - Cad
                                          - Cop
                                          - Dop
                                          - Etb
                                          - Eur
                                          - Gbp
                                          - Idr
                                          - Inr
                                          - Kes
                                          - Lkr
                                          - Mad
                                          - Myr
                                          - Mxn
                                          - Ngn
                                          - Npr
                                          - Nzd
                                          - Pkr
                                          - Pln
                                          - Rub
                                          - Thb
                                          - Try
                                          - Usd
                                          - Sgd
                                          - Cny
                                          - Sar
                                          - Twd
                                          - Jpy
                                          - Krw
                                          - Vnd
                                      inrCurrencySpecificData:
                                        anyOf:
                                          - type: object
                                            properties:
                                              isAmountExclusiveOfGst:
                                                type: boolean
                                            required:
                                              - isAmountExclusiveOfGst
                                          - nullable: true
                                          - nullable: true
                                      additionalDataToCollectOnCheckout:
                                        type: object
                                        properties:
                                          customFields:
                                            type: array
                                            items:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    fieldType:
                                                      type: string
                                                      enum:
                                                        - string
                                                    label:
                                                      type: string
                                                    sublabel:
                                                      type: string
                                                    isRequired:
                                                      type: boolean
                                                      default: false
                                                  required:
                                                    - fieldType
                                                    - label
                                                    - sublabel
                                                - type: object
                                                  properties:
                                                    fieldType:
                                                      type: string
                                                      enum:
                                                        - select
                                                    label:
                                                      type: string
                                                    sublabel:
                                                      type: string
                                                    isRequired:
                                                      type: boolean
                                                    options:
                                                      type: array
                                                      items:
                                                        type: string
                                                      minItems: 1
                                                  required:
                                                    - fieldType
                                                    - label
                                                    - sublabel
                                                    - isRequired
                                                    - options
                                        required:
                                          - customFields
                                    required:
                                      - friendlyPlanName
                                      - currencySpecificPlanInformation
                                      - defaultFallbackCurrency
                                      - inrCurrencySpecificData
                                required:
                                  - fermionDigitalProductPriceId
                                  - fermionDigitalProductId
                                  - createdAt
                                  - updatedAt
                                  - planStatus
                                  - planType
                                  - config
                        required:
                          - fermionDigitalProductSlug
                          - newPlanData
                    required:
                      - data
              required:
                - data
      responses:
        '200':
          description: API Response Body
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    output:
                      anyOf:
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - ok
                            data:
                              type: object
                              properties:
                                newPricingPlan:
                                  anyOf:
                                    - type: object
                                      properties:
                                        fermionDigitalProductPriceId:
                                          type: string
                                        fermionDigitalProductId:
                                          type: string
                                        createdAt:
                                          type: string
                                          format: date-time
                                        updatedAt:
                                          type: string
                                          format: date-time
                                        planStatus:
                                          type: string
                                          enum:
                                            - Published
                                            - Unlisted
                                            - Draft
                                            - Deleted
                                        planType:
                                          type: string
                                          enum:
                                            - OneTimePaymentPlan
                                        config:
                                          type: object
                                          properties:
                                            friendlyPlanName:
                                              type: string
                                            prices:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  currencyType:
                                                    type: string
                                                    enum:
                                                      - Aud
                                                      - Aed
                                                      - Bdt
                                                      - Brl
                                                      - Cad
                                                      - Cop
                                                      - Dop
                                                      - Etb
                                                      - Eur
                                                      - Gbp
                                                      - Idr
                                                      - Inr
                                                      - Kes
                                                      - Lkr
                                                      - Mad
                                                      - Myr
                                                      - Mxn
                                                      - Ngn
                                                      - Npr
                                                      - Nzd
                                                      - Pkr
                                                      - Pln
                                                      - Rub
                                                      - Thb
                                                      - Try
                                                      - Usd
                                                      - Sgd
                                                      - Cny
                                                      - Sar
                                                      - Twd
                                                      - Jpy
                                                      - Krw
                                                      - Vnd
                                                  currencySymbol:
                                                    type: string
                                                  priceInLowestCurrencyUnit:
                                                    type: number
                                                    minimum: 0
                                                required:
                                                  - currencyType
                                                  - currencySymbol
                                                  - priceInLowestCurrencyUnit
                                            inrCurrencySpecificData:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    isAmountExclusiveOfGst:
                                                      type: boolean
                                                  required:
                                                    - isAmountExclusiveOfGst
                                                - nullable: true
                                                - nullable: true
                                            defaultFallbackCurrency:
                                              type: string
                                              enum:
                                                - Aud
                                                - Aed
                                                - Bdt
                                                - Brl
                                                - Cad
                                                - Cop
                                                - Dop
                                                - Etb
                                                - Eur
                                                - Gbp
                                                - Idr
                                                - Inr
                                                - Kes
                                                - Lkr
                                                - Mad
                                                - Myr
                                                - Mxn
                                                - Ngn
                                                - Npr
                                                - Nzd
                                                - Pkr
                                                - Pln
                                                - Rub
                                                - Thb
                                                - Try
                                                - Usd
                                                - Sgd
                                                - Cny
                                                - Sar
                                                - Twd
                                                - Jpy
                                                - Krw
                                                - Vnd
                                            additionalDataToCollectOnCheckout:
                                              type: object
                                              properties:
                                                customFields:
                                                  type: array
                                                  items:
                                                    anyOf:
                                                      - type: object
                                                        properties:
                                                          fieldType:
                                                            type: string
                                                            enum:
                                                              - string
                                                          label:
                                                            type: string
                                                          sublabel:
                                                            type: string
                                                          isRequired:
                                                            type: boolean
                                                            default: false
                                                        required:
                                                          - fieldType
                                                          - label
                                                          - sublabel
                                                      - type: object
                                                        properties:
                                                          fieldType:
                                                            type: string
                                                            enum:
                                                              - select
                                                          label:
                                                            type: string
                                                          sublabel:
                                                            type: string
                                                          isRequired:
                                                            type: boolean
                                                          options:
                                                            type: array
                                                            items:
                                                              type: string
                                                            minItems: 1
                                                        required:
                                                          - fieldType
                                                          - label
                                                          - sublabel
                                                          - isRequired
                                                          - options
                                              required:
                                                - customFields
                                          required:
                                            - friendlyPlanName
                                            - prices
                                            - inrCurrencySpecificData
                                            - defaultFallbackCurrency
                                      required:
                                        - fermionDigitalProductPriceId
                                        - fermionDigitalProductId
                                        - createdAt
                                        - updatedAt
                                        - planStatus
                                        - planType
                                        - config
                                    - type: object
                                      properties:
                                        fermionDigitalProductPriceId:
                                          type: string
                                        fermionDigitalProductId:
                                          type: string
                                        createdAt:
                                          type: string
                                          format: date-time
                                        updatedAt:
                                          type: string
                                          format: date-time
                                        planStatus:
                                          type: string
                                          enum:
                                            - Published
                                            - Unlisted
                                            - Draft
                                            - Deleted
                                        planType:
                                          type: string
                                          enum:
                                            - PartialPaymentPlan
                                        config:
                                          type: object
                                          properties:
                                            friendlyPlanName:
                                              type: string
                                            currencySpecificPlanInformation:
                                              type: array
                                              items:
                                                type: object
                                                properties:
                                                  currencySymbol:
                                                    type: string
                                                  currencyType:
                                                    type: string
                                                    enum:
                                                      - Aud
                                                      - Aed
                                                      - Bdt
                                                      - Brl
                                                      - Cad
                                                      - Cop
                                                      - Dop
                                                      - Etb
                                                      - Eur
                                                      - Gbp
                                                      - Idr
                                                      - Inr
                                                      - Kes
                                                      - Lkr
                                                      - Mad
                                                      - Myr
                                                      - Mxn
                                                      - Ngn
                                                      - Npr
                                                      - Nzd
                                                      - Pkr
                                                      - Pln
                                                      - Rub
                                                      - Thb
                                                      - Try
                                                      - Usd
                                                      - Sgd
                                                      - Cny
                                                      - Sar
                                                      - Twd
                                                      - Jpy
                                                      - Krw
                                                      - Vnd
                                                  realFullPriceOfProductInLowestCurrencyUnitIrrespectiveOfTaxAndExclusiveOfDiscount:
                                                    type: number
                                                  minimumMandatoryPaymentAmountInLowestCurrencyUnitIrrespectiveOfDiscountAndTax:
                                                    type: number
                                                    minimum: 0
                                                  emiIntervalInDays:
                                                    type: number
                                                    minimum: 0
                                                    maximum: 180
                                                  totalNumberOfInstallmentOptions:
                                                    type: array
                                                    items:
                                                      type: number
                                                      minimum: 1
                                                      maximum: 50
                                                    minItems: 1
                                                required:
                                                  - currencySymbol
                                                  - currencyType
                                                  - >-
                                                    realFullPriceOfProductInLowestCurrencyUnitIrrespectiveOfTaxAndExclusiveOfDiscount
                                                  - >-
                                                    minimumMandatoryPaymentAmountInLowestCurrencyUnitIrrespectiveOfDiscountAndTax
                                                  - emiIntervalInDays
                                                  - totalNumberOfInstallmentOptions
                                            defaultFallbackCurrency:
                                              type: string
                                              enum:
                                                - Aud
                                                - Aed
                                                - Bdt
                                                - Brl
                                                - Cad
                                                - Cop
                                                - Dop
                                                - Etb
                                                - Eur
                                                - Gbp
                                                - Idr
                                                - Inr
                                                - Kes
                                                - Lkr
                                                - Mad
                                                - Myr
                                                - Mxn
                                                - Ngn
                                                - Npr
                                                - Nzd
                                                - Pkr
                                                - Pln
                                                - Rub
                                                - Thb
                                                - Try
                                                - Usd
                                                - Sgd
                                                - Cny
                                                - Sar
                                                - Twd
                                                - Jpy
                                                - Krw
                                                - Vnd
                                            inrCurrencySpecificData:
                                              anyOf:
                                                - type: object
                                                  properties:
                                                    isAmountExclusiveOfGst:
                                                      type: boolean
                                                  required:
                                                    - isAmountExclusiveOfGst
                                                - nullable: true
                                                - nullable: true
                                            additionalDataToCollectOnCheckout:
                                              type: object
                                              properties:
                                                customFields:
                                                  type: array
                                                  items:
                                                    anyOf:
                                                      - type: object
                                                        properties:
                                                          fieldType:
                                                            type: string
                                                            enum:
                                                              - string
                                                          label:
                                                            type: string
                                                          sublabel:
                                                            type: string
                                                          isRequired:
                                                            type: boolean
                                                            default: false
                                                        required:
                                                          - fieldType
                                                          - label
                                                          - sublabel
                                                      - type: object
                                                        properties:
                                                          fieldType:
                                                            type: string
                                                            enum:
                                                              - select
                                                          label:
                                                            type: string
                                                          sublabel:
                                                            type: string
                                                          isRequired:
                                                            type: boolean
                                                          options:
                                                            type: array
                                                            items:
                                                              type: string
                                                            minItems: 1
                                                        required:
                                                          - fieldType
                                                          - label
                                                          - sublabel
                                                          - isRequired
                                                          - options
                                              required:
                                                - customFields
                                          required:
                                            - friendlyPlanName
                                            - currencySpecificPlanInformation
                                            - defaultFallbackCurrency
                                            - inrCurrencySpecificData
                                      required:
                                        - fermionDigitalProductPriceId
                                        - fermionDigitalProductId
                                        - createdAt
                                        - updatedAt
                                        - planStatus
                                        - planType
                                        - config
                              required:
                                - newPricingPlan
                          required:
                            - status
                            - data
                        - type: object
                          properties:
                            status:
                              type: string
                              enum:
                                - error
                            errorMessage:
                              type: string
                          required:
                            - status
                            - errorMessage
                  required:
                    - output
      security:
        - FERMION-API-KEY: []
components:
  securitySchemes:
    FERMION-API-KEY:
      name: FERMION-API-KEY
      type: apiKey
      in: header

````