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

# Create an invoice payment

> Create invoice payment



## OpenAPI

````yaml post /consumers/{consumer_id}/accounting/invoices/payments
openapi: 3.1.0
info:
  title: Chift API
  description: >-
    The Chift API is a universal API giving you access to financial data from
    the software of your clients. It helps software companies to offer native
    integrations to their clients without the effort needed to maintain those
    native integrations. By using the APIs (Accounting, POS, eCommerce) of
    Chift, you connect once and allow your clients to use their software
    packages.
  version: 1.0.0
servers:
  - url: https://api.chift.eu
    description: Chift
security:
  - bearerAuth: []
paths:
  /consumers/{consumer_id}/accounting/invoices/payments:
    post:
      tags:
        - Accounting
        - Invoices
      summary: Create an invoice payment
      description: Create invoice payment
      operationId: accounting_create_invoice_payment
      parameters:
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
        - name: folder_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Folder Id
          description: >-
            Id of the accounting folder instance. A folder represents a legal
            entity within the system. Required when the multiple folders feature
            is enabled.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingInvoicePaymentIn'
      responses:
        '204':
          description: Successful Response
        '400':
          content:
            application/json:
              example:
                message: Error while trying to perform your request
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - mcp_auth:
            - accounting
            - accounting.invoices
components:
  schemas:
    AccountingInvoicePaymentIn:
      properties:
        date:
          type: string
          format: date
          title: Date
          description: The date of the payment
        payment_method_id:
          type: string
          title: Payment Method Id
          description: Technical ID of the payment method in the accounting system.
        currency:
          type: string
          title: Currency
          description: Payment currency
        currency_exchange_rate:
          anyOf:
            - type: number
            - type: 'null'
          title: Currency Exchange Rate
          description: >-
            Exchange rate applicable at the payment date. Required when the
            currency is different from the system's currency.
          default: 1
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: External reference of the payment.
        number:
          anyOf:
            - type: string
            - type: 'null'
          title: Number
          description: Unique Payment number (if managed by the software).
        items:
          items:
            $ref: '#/components/schemas/AccountingInvoicePaymentItemIn'
          type: array
          title: Items
          description: Payment's repartition
      type: object
      required:
        - date
        - payment_method_id
        - currency
        - items
      title: AccountingInvoicePaymentIn
    ChiftError:
      properties:
        message:
          type: string
          title: Message
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: error
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          default: ''
      type: object
      required:
        - message
      title: ChiftError
    HTTPValidationError:
      title: Validation Error
      required:
        - message
      type: object
      properties:
        message:
          title: Message
          type: string
          default: Validation error
        status:
          title: Status
          type: string
          default: error
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    AccountingInvoicePaymentItemIn:
      properties:
        invoice_id:
          type: string
          title: Invoice Id
          description: Technical ID of the invoice in the accounting system.
        amount:
          type: number
          exclusiveMinimum: 0
          title: Amount
          description: >-
            Paid amount dedicated to the invoice. The amount must be positive
            and follows the sign of the linked invoice.
      type: object
      required:
        - invoice_id
        - amount
      title: AccountingInvoicePaymentItemIn
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This access token needs to be included in each of your request to the
        Chift API.

````