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

> [accordion] Business Central
>
> > [!NOTE]
> >
> > If you're not using the [Interactive Authentication Flow](https://docs.maesn.com/authentication.md#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.
>
> Supported request fields:
>
> **journalCode** `string` *required*
>
> Code of the supplier or customer payment journal in Business Central (e.g. `CASH`).
>
> **paymentLines** `PaymentLine[]` *required*
>
> **properties**
>
> **contactId** `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.
>
> **amount** `number` *required*
>
> **paymentDate** `string` *required*
>
> For date format details visit the [Standardized Data](https://docs.maesn.com/standardization.md) section
>
> **invoiceId** `string`
>
> GUID of the purchase or sales invoice to apply the payment to.
>
> **description** `string`

> [accordion] Exact Online
>
> > [!NOTE]
> >
> > If you're not using the [Interactive Authentication Flow](https://docs.maesn.com/authentication.md#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.
>
> Supported request fields:
>
> **currency** `string`
>
> **exchangeRate** `number`
>
> **journalCode** `string` *required*
>
> **paymentLines** `PaymentLine[]`
>
> **properties**
>
> **amount** `number` *required*
>
> **accountId** `string` *required*
>
> **contactId** `string`
>
> **description** `string`
>
> **invoiceId** `string`
>
> **paymentDate** `string`

> [accordion] Lexware Office
>
> Supported request fields:
>
> **paymentLines** `PaymentLine[]` *required*
>
> **properties**
>
> **accountId** `string` *required*
>
> **amount** `number` *required*
>
> **contactName** `string`
>
> **description** `string` *required*
>
> **paymentDate** `string` *required*

> [accordion] Sevdesk
>
> Supported request fields:
>
> **paymentLines** `PaymentLine[]` *required*
>
> **properties**
>
> **accountId** `string` *required*
>
> **amount** `number` *required*
>
> **contactName** `string` *required*
>
> **invoiceId** `string` *required*
>
> **paymentDate** `string` *required*

> [accordion] Snelstart
>
> > [!NOTE]
> >
> > Payments are created as bank bookings (`bankboekingen`) in Snelstart and are always applied to an existing booking proposal.
> > Use the id returned by the `POST Booking Proposals` endpoint as the `invoiceId` of the payment line.
>
> Supported request fields:
>
> **description** `string`
>
> **documentType** `enum` *required*
>
> Available options: `INVOICE_BOOKING_PROPOSAL`, `BILL_BOOKING_PROPOSAL`
>
> `INVOICE_BOOKING_PROPOSAL` books the payment against a sales booking proposal and is recorded as an amount received.
> `BILL_BOOKING_PROPOSAL` books it against a purchase booking proposal and is recorded as an amount paid out.
>
> **journalId** `string` *required*
>
> Id of the daybook (`dagboek`) the payment is booked in.
>
> To get the journal id, you can use the `GET /Journals` endpoint.
>
> **paymentDate** `string` *required*
>
> For date format details visit the [Standardized Data](https://docs.maesn.com/standardization.md) section
>
> **paymentLines** `PaymentLine[]` *required*
>
> **properties**
>
> **amount** `number` *required*
>
> **description** `string`
>
> **invoiceId** `string` *required*
>
> Id of the booking proposal the payment is applied to.

> [accordion] Visma e-conomic
>
> Supported request fields:
>
> **currency** `string` *required*
>
> **journalCode** `string` *required*
>
> **paymentLines** `PaymentLine[]` *required*
>
> **properties**
>
> **accountId** `string` *required*
>
> **amount** `number` *required*
>
> **customerId** `string` *required*
>
> **description** `string`
>
> **invoiceId** `string` *required*
>
> **paymentDate** `string` *required*

> [accordion] Xero
>
> Supported request fields:
>
> **exchangeRate** `number`
>
> **paymentLines** `PaymentLine[]`
>
> **properties**
>
> **amount** `number` *required*
>
> **accountId** `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.
>
> **description** `string`
>
> **invoiceId** `string` *required*
>
> **paymentDate** `string` *required*


## 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
        description:
          type: string
          example: Payment of bill
        documentType:
          type: string
          enum:
            - INVOICE
            - BILL
            - BOOKING_PROPOSAL
            - INVOICE_BOOKING_PROPOSAL
            - BILL_BOOKING_PROPOSAL
          example: BILL_BOOKING_PROPOSAL
        exchangeRate:
          type: number
          example: 1
        fiscalYear:
          type: string
          example: '2025'
        journalCode:
          type: string
          example: '30'
        journalId:
          type: string
          example: 8df2df10-0fae-40ad-9d22-f25e5ab0ba23
        paymentDate:
          type: string
          example: '2025-01-01'
        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'
        description:
          type: string
          example: Payment of bill
        documentType:
          type: string
          enum:
            - INVOICE
            - BILL
            - BOOKING_PROPOSAL
            - INVOICE_BOOKING_PROPOSAL
            - BILL_BOOKING_PROPOSAL
          example: BILL_BOOKING_PROPOSAL
        exchangeRate:
          type: number
          example: 1
        fiscalYear:
          type: string
          example: '2025'
        journalCode:
          type: string
          example: '30'
        journalId:
          type: string
          example: 8df2df10-0fae-40ad-9d22-f25e5ab0ba23
        updatedDate:
          type: string
          example: '2021-01-01T00:00:00Z'
        paymentDate:
          type: string
          example: '2025-01-01'
        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:
          description: Amount of the payment line, in the document currency.
          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'
        partialErrors:
          type: array
          description: >-
            Secondary operations that failed after the main operation succeeded.
            See [Partial Errors](/guides/partial-errors).
          items:
            type: object
            properties:
              code:
                type: string
                example: FILE_UPLOAD_FAILED
              message:
                type: string
                example: >-
                  Attachment invoice.pdf could not be uploaded to the target
                  system.
    PaginationResponse:
      type: object
      properties:
        total:
          type: number
          example: 125
        perPage:
          type: number
          example: 50
        currentPage:
          type: number
          example: 1
        totalPages:
          type: number
          example: 3

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.