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

# Mark Customer Invoice paid

> Set the Customer Invoice as paid. This will, if connected, also update the integration



## OpenAPI

````yaml /openapi.yaml patch /customer-invoices/{invoiceId}
openapi: 3.1.1
info:
  title: MijnKlantportaal API
  version: v1
servers:
  - url: https://api.mijnklantportaal.nl/v1
security:
  - APIKey: []
tags:
  - name: Agreements API
  - name: Appointments API
  - name: Customers API
  - name: Customer Groups API
  - name: Customer Invoices API
  - name: Customer Offers API
  - name: Customer Subscriptions API
  - name: Customer Subscription Packages API
  - name: Files API
  - name: File Request API
  - name: File Share API
  - name: Invoices API
  - name: Payment Links API
  - name: Punch Cards API
  - name: Tickets API
  - name: Webhooks API
paths:
  /customer-invoices/{invoiceId}:
    patch:
      tags:
        - Customer Invoices API
      summary: Mark Customer Invoice paid
      description: >-
        Set the Customer Invoice as paid. This will, if connected, also update
        the integration
      operationId: mark-customer-invoice-paid
      parameters:
        - name: invoiceId
          in: path
          description: ID of the Customer Invoice to mark
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - paidAt
              properties:
                paidAt:
                  type: string
                  example: '2024-04-31 14:00:00'
                  description: >-
                    Date (and time) when the invoice got paid in `YYYY-mm-dd
                    H:i:s` format.
      responses:
        '200':
          description: Getting the marked Customer Invoice
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerInvoice'
        '422':
          description: Something is wrong with the posted data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error_ApiError'
components:
  schemas:
    CustomerInvoice:
      type: object
      description: Customer Invoice
      properties:
        id:
          type: string
          example: inv_abc12345def678
          description: ID of the invoice, always starting with `inv_`.
        customerId:
          type: string
          example: cst_abc12345def678
          description: ID of the customer which the invoice belongs to.
        invoiceNumber:
          type: string
          example: 2024-001
          description: Number of the invoice as `string`.
        issuedAt:
          type: string
          example: '2024-04-29'
          description: Issue date of the invoice. Formatted as `YYYY-mm-dd`.
        dueAt:
          type: string
          example: '2024-05-28'
          description: Due date for the invoice, if available. Formatted as `YYYY-mm-dd`.
          nullabe: true
        currency:
          type: string
          example: EUR
          description: Currency of the invoice amount.
        amount:
          type: string
          example: '12.95'
          description: Invoice amount as `string`.
        paidAt:
          type: string
          nullable: true
          example: '2024-05-28T21:00:00+02:00'
          description: Date the invoice is marked as paid. Written in ATOM format.
        createdAt:
          type: string
          example: '2024-04-29T21:00:00+02:00'
          description: >-
            Date and time when the invoice was added to MijnKlantportaal.
            Written in ATOM format.
        links:
          type: object
          properties:
            customer:
              type: object
              properties:
                href:
                  type: string
                  description: Endpoint to the Get Customer API
                  example: >-
                    https://api.mijnklantportaal.nl/v1/customers/cst_abc12345def678
                type:
                  type: string
                  example: application/json
                  description: Type of the content the endpoint will return
            onlinePaymentLink:
              type: object
              properties:
                href:
                  type: string
                  description: >-
                    Link towards the payment page for this invoice. ***Be
                    aware:*** This link will be returned, no matter if a payment
                    integration is active.
                  example: >-
                    https://portal.mijnklantportaal.nl/public-invoice/inv_abc123/pay/123-abc
                type:
                  type: string
                  example: text/html
                  description: Type of the content the endpoint will return
    Error_ApiError:
      type: object
      properties:
        message:
          type: string
          description: Explanation what went wrong
  securitySchemes:
    APIKey:
      type: http
      scheme: bearer

````