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

# Create Payment Transaction Endpoint

> The Create Payment Transaction endpoint enables the creation of a new payment transaction. The request should include details such as transaction ID, premium details, currency details, payment amount, and other relevant information. Upon successful creation, the API responds with the newly created payment transaction details, including the transaction ID, premium details, currency details, transaction type, amount, and other associated information.



## OpenAPI

````yaml post /transactions/payment-transactions/
openapi: 3.0.1
info:
  title: Trace Connect API
  version: v1
servers:
  - url: http://localhost:3000/connect/v1
security:
  - Bearer: []
paths:
  /transactions/payment-transactions/:
    post:
      tags:
        - transactions
      operationId: transactions_payment-transactions_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentTransactions'
        required: true
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentTransactions'
components:
  schemas:
    PaymentTransactions:
      required:
        - destination
        - source
      type: object
      properties:
        id:
          type: string
        premium_details:
          $ref: '#/components/schemas/Premium'
        currency_details:
          $ref: '#/components/schemas/Currency'
        type:
          title: Type
          type: string
          readOnly: true
        currency:
          title: Currency
          minLength: 1
          type: string
        updated_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        number:
          title: Number
          maxLength: 10
          type: string
          nullable: true
        created_on:
          title: Created On
          type: string
          format: date-time
        date:
          title: Date
          type: string
          format: date-time
        invoice:
          title: Invoice
          type: string
          format: uri
          nullable: true
          readOnly: true
        invoice_number:
          title: Invoice Number
          maxLength: 100
          type: string
          nullable: true
        verification_latitude:
          title: Verification Latitude
          type: number
        verification_longitude:
          title: Verification Longitude
          type: number
        method:
          title: Method
          type: string
          nullable: true
          enum:
            - CARD
            - INVOICE
            - NONE
        payment_type:
          title: Payment Type
          type: string
          enum:
            - TRANSACTION
            - PREMIUM
            - TRANSACTION_PREMIUM
        amount:
          title: Amount
          type: number
        selected_option:
          title: Selected Option
          maxLength: 100
          type: string
          nullable: true
        creator:
          type: string
        updater:
          type: string
        source:
          type: string
        destination:
          type: string
        card:
          type: string
        premium:
          type: string
        transaction:
          type: string
        submissions:
          uniqueItems: true
          type: array
          items:
            type: string
    Premium:
      required:
        - name
      type: object
      properties:
        id:
          type: string
        options:
          type: array
          items:
            $ref: '#/components/schemas/PremiumOptionSeriazer'
        updated_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        created_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        category:
          title: Premium Category
          type: string
          enum:
            - PAYOUT
            - TRANSACTION
        name:
          title: Premium Name
          maxLength: 100
          minLength: 1
          type: string
        type:
          title: Premium Type
          type: string
          enum:
            - PER_TRANSACTION
            - PER_KG
            - PER_UNIT_CURRENCY
            - PER_FARMER
        amount:
          title: Amount
          type: number
          nullable: true
        included:
          title: Included
          type: boolean
        dependant_on_card:
          title: Dependant on Card
          type: boolean
        applicable_activity:
          title: Applicable Activity
          type: string
          enum:
            - BUY
            - SELL
        calculation_type:
          title: Calculation Type
          type: string
          enum:
            - NORMAL
            - MANUAL
            - OPTIONS
        is_active:
          title: Is Active
          type: boolean
        creator:
          type: string
        updater:
          type: string
        owner:
          type: string
    Currency:
      required:
        - name
      type: object
      properties:
        id:
          type: string
        name:
          title: Currency Name
          maxLength: 1000
          minLength: 1
          type: string
        code:
          title: Currency Code
          maxLength: 100
          type: string
          nullable: true
    PremiumOptionSeriazer:
      required:
        - amount
        - name
      type: object
      properties:
        id:
          type: string
        updated_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        created_on:
          title: Updated On
          type: string
          format: date-time
          readOnly: true
        name:
          title: Option Name
          maxLength: 25
          minLength: 1
          type: string
        amount:
          title: Amount
          type: number
        is_active:
          title: Is Active
          type: boolean
        creator:
          type: string
        updater:
          type: string
  securitySchemes:
    Bearer:
      type: apiKey
      name: Authorization
      in: header

````