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

# Create payment

## Field support per integration

<AccordionGroup>
  <Accordion title="Business Central" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/businesscentral.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=9cdc50aa9f467133e9e9372eab83f38b" width="24" height="24" data-path="logo/businesscentral.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameters `environmentName` and `companyId` are correctly populated.
      You can obtain these values by using the `GET Environments` and `GET Companies` endpoints available under the Authentication section.
    </Note>

    <br />

    Supported request fields:

    <ResponseField name="journalCode" type="string" required>
      Code of the supplier or customer payment journal in Business Central (e.g. `CASH`).
    </ResponseField>

    <ResponseField name="paymentLines" type="PaymentLine[]" required>
      <Expandable title="properties">
        <ResponseField name="contactId" type="string" required>
          GUID of the supplier or customer in Business Central. The type is auto-detected — if the ID matches a customer, a customer payment is created; if it matches a vendor, a vendor payment is created.
        </ResponseField>

        <ResponseField name="amount" type="number" required />

        <ResponseField name="paymentDate" type="string" required>
          For date format details visit the [Standardized Data](/standardization) section
        </ResponseField>

        <ResponseField name="invoiceId" type="string">
          GUID of the purchase or sales invoice to apply the payment to.
        </ResponseField>

        <ResponseField name="description" type="string" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Exact Online" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/exact.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=afa1af7a261b22f843ac73ee60896ede" width="24" height="24" data-path="logo/exact.svg">
    <Note>
      If you're not using the [Interactive Authentication Flow](/authentication#interactive-authentication-flow), make sure the query parameter `companyId` is correctly populated.
      You can obtain this value by using the `GET Companies` endpoint available under the Authentication section.
    </Note>

    <br />

    Supported Request Fields:

    <ResponseField name="currency" type="string" />

    <ResponseField name="exchangeRate" type="number" />

    <ResponseField name="journalCode" type="string" required />

    <ResponseField name="paymentLines" type="PaymentLine[]">
      <Expandable title="properties">
        <ResponseField name="amount" type="number" required />

        <ResponseField name="accountId" type="string" required />

        <ResponseField name="contactId" type="string" />

        <ResponseField name="description" type="string" />

        <ResponseField name="invoiceId" type="string" />

        <ResponseField name="paymentDate" type="string" />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Lexware Office" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/lexoffice.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=efe4da1d7b59a552d1938ec981ccbc1e" width="24" height="24" data-path="logo/lexoffice.svg">
    <br />

    Supported Request Fields:

    <ResponseField name="paymentLines" type="PaymentLine[]" required>
      <Expandable title="properties">
        <ResponseField name="accountId" type="string" required />

        <ResponseField name="amount" type="number" required />

        <ResponseField name="contactName" type="string" />

        <ResponseField name="description" type="string" required />

        <ResponseField name="paymentDate" type="string" required />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Sevdesk" icon="https://mintcdn.com/maesn/gCd41Ws3USFubam4/logo/sevdesk.svg?fit=max&auto=format&n=gCd41Ws3USFubam4&q=85&s=2b266052b2531cf2995f78c2aecf6019" width="24" height="24" data-path="logo/sevdesk.svg">
    Supported Request Fields:

    <ResponseField name="paymentLines" type="PaymentLine[]" required>
      <Expandable title="properties">
        <ResponseField name="accountId" type="string" required />

        <ResponseField name="amount" type="number" required />

        <ResponseField name="contactName" type="string" required />

        <ResponseField name="invoiceId" type="string" required />

        <ResponseField name="paymentDate" type="string" required />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Visma e-conomic" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/vismaeconomic.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=4b629e8bc1bfd12c3bedaaaf9cc03ef3" width="20" height="24" data-path="logo/vismaeconomic.svg">
    Supported Request Fields:

    <ResponseField name="currency" type="string" required />

    <ResponseField name="journalCode" type="string" required />

    <ResponseField name="paymentLines" type="PaymentLine[]" required>
      <Expandable title="properties">
        <ResponseField name="accountId" type="string" required />

        <ResponseField name="amount" type="number" required />

        <ResponseField name="customerId" type="string" required />

        <ResponseField name="description" type="string" />

        <ResponseField name="invoiceId" type="string" required />

        <ResponseField name="paymentDate" type="string" required />
      </Expandable>
    </ResponseField>
  </Accordion>

  <Accordion title="Xero" icon="https://mintcdn.com/maesn/51AaCYhZi3VILsjj/logo/xero.svg?fit=max&auto=format&n=51AaCYhZi3VILsjj&q=85&s=4496b21aab750469b3d5e96a1588d9f0" width="45" height="46" data-path="logo/xero.svg">
    Supported Request Fields:

    <ResponseField name="exchangeRate" type="number" />

    <ResponseField name="paymentLines" type="PaymentLine[]">
      <Expandable title="properties">
        <ResponseField name="amount" type="number" required />

        <ResponseField name="accountId" type="string" required>
          Id of the bank account to which the payment is made. Needs to be type `BANK`.

          To get the correct id, you can use the  `GET Accounts` endpoint.
        </ResponseField>

        <ResponseField name="description" type="string" />

        <ResponseField name="invoiceId" type="string" required />

        <ResponseField name="paymentDate" type="string" required />
      </Expandable>
    </ResponseField>
  </Accordion>
</AccordionGroup>


## OpenAPI

````yaml post /accounting/payments
openapi: 3.0.0
info:
  title: Maesn unified API
  description: The Maesn unified API description
  version: '1.0'
  contact: {}
servers:
  - url: https://api.maesn.dev
security: []
tags:
  - name: maesn
    description: ''
paths:
  /accounting/payments:
    post:
      tags:
        - accounting
      operationId: createPayment
      parameters:
        - name: companyId
          required: false
          in: query
          schema:
            type: string
        - name: environmentName
          in: query
          schema:
            type: string
          required: false
        - name: X-API-KEY
          description: API key
          in: header
          schema:
            type: string
            example: example value
          required: true
        - name: X-ACCOUNT-KEY
          description: Account key
          in: header
          schema:
            type: string
            example: example value
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentRequestDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/BaseResponseDto'
                  - properties:
                      data:
                        $ref: '#/components/schemas/PaymentResponseDto'
components:
  schemas:
    PaymentRequestDto:
      type: object
      properties:
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        exchangeRate:
          type: number
          example: 1
        fiscalYear:
          type: string
          example: '2025'
        journalCode:
          type: string
          example: '30'
        paymentLines:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLine'
        paymentType:
          type: string
          example: CREDITOR
    BaseResponseDto:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/MetaResponse'
        data:
          oneOf:
            - type: object
            - type: array
    PaymentResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 94a5ab44-3218-4492-8b5d-a31bc0288c0b
        currency:
          type: string
          enum:
            - AED
            - AFN
            - ALL
            - AMD
            - ANG
            - AOA
            - ARS
            - AUD
            - AWG
            - AZN
            - BAM
            - BBD
            - BDT
            - BGN
            - BHD
            - BIF
            - BMD
            - BND
            - BOB
            - BRL
            - BSD
            - BTN
            - BWP
            - BYR
            - BZD
            - CAD
            - CDF
            - CHF
            - CLP
            - CNY
            - COP
            - CRC
            - CUC
            - CVE
            - CZK
            - DJF
            - DKK
            - DOP
            - DZD
            - EEK
            - EGP
            - ERN
            - ETB
            - EUR
            - FJD
            - FKP
            - GBP
            - GEL
            - GHS
            - GIP
            - GMD
            - GNF
            - GQE
            - GTQ
            - GYD
            - HKD
            - HNL
            - HRK
            - HTG
            - HUF
            - IDR
            - ILS
            - INR
            - IQD
            - IRR
            - ISK
            - JMD
            - JOD
            - JPY
            - KES
            - KGS
            - KHR
            - KMF
            - KPW
            - KRW
            - KWD
            - KYD
            - KZT
            - LAK
            - LBP
            - LKR
            - LRD
            - LSL
            - LTL
            - LVL
            - LYD
            - MAD
            - MDL
            - MGA
            - MKD
            - MMK
            - MNT
            - MOP
            - MRO
            - MUR
            - MVR
            - MWK
            - MXN
            - MYR
            - MZM
            - NAD
            - NGN
            - NIO
            - NOK
            - NPR
            - NZD
            - OMR
            - PAB
            - PEN
            - PGK
            - PHP
            - PKR
            - PLN
            - PYG
            - QAR
            - RON
            - RSD
            - RUB
            - SAR
            - SBD
            - SCR
            - SDG
            - SEK
            - SGD
            - SHP
            - SLL
            - SOS
            - SRD
            - SYP
            - SZL
            - THB
            - TJS
            - TMT
            - TND
            - TRY
            - TTD
            - TWD
            - TZS
            - UAH
            - UGX
            - USD
            - UYU
            - UZS
            - VEB
            - VND
            - VUV
            - WST
            - XAF
            - XCD
            - XDR
            - XOF
            - XPF
            - YER
            - ZAR
            - ZMK
            - ZWR
          example: EUR
        createdDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        exchangeRate:
          type: number
          example: 1
        fiscalYear:
          type: string
          example: '2025'
        journalCode:
          type: string
          example: '30'
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        paymentLines:
          type: array
          items:
            $ref: '#/components/schemas/PaymentLine'
        paymentType:
          type: string
          example: CREDITOR
    PaymentLine:
      type: object
      properties:
        accountId:
          type: string
          example: 4a6b5e92-a261-4be9-814d-84dec9636c16
        amount:
          type: number
          example: 100
        contactName:
          type: string
          example: John Doe
        contactId:
          type: string
          example: 6532708-12e3-4ff5-bf39-02698e959963
        customerId:
          type: string
          example: 6532708-12e3-4ff5-bf39-02698e959963
        description:
          type: string
          example: payment of bill
        invoiceId:
          type: string
          example: a44f5af1-8310-4f97-b945-26e35288b35f
        paymentDate:
          type: string
          example: '2025-01-01'
        supplierId:
          type: string
          example: 6532708-12e3-4ff5-bf39-02698e959963
    MetaResponse:
      type: object
      properties:
        warnings:
          type: array
          items:
            type: string
            example: Field not used by target system
        pagination:
          $ref: '#/components/schemas/PaginationResponse'
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````