> ## 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 payment link 

> Create a new payment link for your school

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-payment-link-digital-product
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-payment-link-digital-product:
    post:
      tags:
        - Product
      summary: 'Create payment link '
      description: >-
        Create a new payment link for your school


        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:
                          productData:
                            type: object
                            properties:
                              title:
                                type: string
                                minLength: 1
                                description: Name of the payment link
                              shortDescription:
                                type: string
                                minLength: 1
                                description: Brief description of the payment link
                              thumbnailUrl:
                                type: string
                                format: uri
                                description: >-
                                  URL of the payment link thumbnail image
                                  (optional, will use default if not provided)
                              status:
                                type: string
                                enum:
                                  - Draft
                                  - Active
                                  - Unlisted
                                description: Initial status of the payment link
                            required:
                              - title
                              - shortDescription
                              - status
                            description: Payment link information
                          pricingPlan:
                            anyOf:
                              - type: object
                                properties:
                                  planType:
                                    type: string
                                    enum:
                                      - OneTimePaymentPlan
                                    description: Type of pricing plan
                                  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
                                    description: Pricing plan configuration
                                required:
                                  - planType
                                  - config
                              - nullable: true
                              - nullable: true
                            description: >-
                              Optional pricing plan configuration. If not
                              provided, no pricing will be set up.
                        required:
                          - productData
                    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:
                                fermionDigitalProductId:
                                  type: string
                                  description: >-
                                    Unique identifier of the created payment
                                    link
                                paymentLinkUrl:
                                  type: string
                                  description: >-
                                    The payment link URL that can be shared with
                                    customers
                              required:
                                - fermionDigitalProductId
                                - paymentLinkUrl
                          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

````