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

# Mark an invoice as settled outside the platform



## OpenAPI

````yaml /openapi.json post /customers/{customerId}/manually-mark-invoice
openapi: 3.0.0
info:
  title: Korint API
  description: >-
    Quoting, policy issuance, billing, claims, documents and compliance for
    insurance distribution.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.korint.io
    description: Production
  - url: https://api.sandbox.korint.io
    description: Sandbox
security:
  - oauth2: []
  - bearerAuth: []
tags: []
paths:
  /customers/{customerId}/manually-mark-invoice:
    post:
      tags:
        - customer
      summary: Mark an invoice as settled outside the platform
      operationId: CustomerController_manuallyMarkInvoice
      parameters:
        - name: tenant
          in: header
          required: true
          description: Your tenant identifier. Requests without it are rejected.
          schema:
            type: string
        - name: customerId
          required: true
          in: path
          description: The customer id
          schema:
            pattern: >-
              ^customer(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManuallyMarkInvoiceInputBody'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManuallyMarkInvoiceOutput'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidPaymentModeErrorDto'
              examples:
                INVALID_PAYMENT_MODE:
                  value:
                    code: INVALID_PAYMENT_MODE
                    message: >-
                      Invalid payment mode {paymentMode}, available modes are
                      {allowedPaymentModes}
                    details: {}
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvoiceNotFoundErrorDto'
              examples:
                INVOICE_NOT_FOUND:
                  value:
                    code: INVOICE_NOT_FOUND
                    message: Invoice {invoiceId} ({branchId}) not found
                    details: {}
          description: ''
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: >-
                      #/components/schemas/InvoiceDoesNotBelongToCustomerErrorDto
                  - $ref: '#/components/schemas/InvalidChargeAttemptErrorDto'
              examples:
                INVOICE_DOES_NOT_BELONG_TO_CUSTOMER:
                  value:
                    code: INVOICE_DOES_NOT_BELONG_TO_CUSTOMER
                    message: >-
                      Invoice {invoiceId} belongs to customer
                      {invoiceCustomerId}, not {customerId}
                    details: {}
                INVALID_CHARGE_ATTEMPT:
                  value:
                    code: INVALID_CHARGE_ATTEMPT
                    message: Invalid charge attempt
                    details: {}
          description: ''
        '500':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/InvalidInvoiceStatusErrorDto'
              examples:
                INVALID_INVOICE_STATUS:
                  value:
                    code: INVALID_INVOICE_STATUS
                    message: >-
                      Invoice {invoiceId} status must be {requiredStatus} (got
                      {currentStatus} instead)
                    details: {}
          description: ''
components:
  schemas:
    ManuallyMarkInvoiceInputBody:
      type: object
      properties:
        invoiceId:
          pattern: >-
            ^invoice(_test)?_[346789ABCDEFGHJKLMNPQRTUVWXYabcdefghijkmnpqrtwxyz]{21}$
          type: string
          description: the invoice to mark as settled outside the platform
        manualPaymentMethod:
          type: string
          description: how the payment was settled outside the platform
          enum:
            - check
            - wire_transfer
            - cash
        appliedAt:
          format: date-time
          type: string
          description: >-
            accounting application date of the settlement — drives paidAt /
            finalizedAt, cannot be in the future
      required:
        - invoiceId
        - manualPaymentMethod
        - appliedAt
    ManuallyMarkInvoiceOutput:
      type: object
      properties: {}
    InvalidPaymentModeErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_PAYMENT_MODE
        message:
          type: string
          example: >-
            Invalid payment mode {paymentMode}, available modes are
            {allowedPaymentModes}
        details:
          $ref: '#/components/schemas/InvalidPaymentModeDetailsDto'
      required:
        - code
        - message
        - details
    InvoiceNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVOICE_NOT_FOUND
        message:
          type: string
          example: Invoice {invoiceId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/InvoiceNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    InvoiceDoesNotBelongToCustomerErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVOICE_DOES_NOT_BELONG_TO_CUSTOMER
        message:
          type: string
          example: >-
            Invoice {invoiceId} belongs to customer {invoiceCustomerId}, not
            {customerId}
        details:
          $ref: '#/components/schemas/InvoiceDoesNotBelongToCustomerDetailsDto'
      required:
        - code
        - message
        - details
    InvalidChargeAttemptErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_CHARGE_ATTEMPT
        message:
          type: string
          example: Invalid charge attempt
        details:
          $ref: '#/components/schemas/InvalidChargeAttemptDetailsDto'
      required:
        - code
        - message
        - details
    InvalidInvoiceStatusErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - INVALID_INVOICE_STATUS
        message:
          type: string
          example: >-
            Invoice {invoiceId} status must be {requiredStatus} (got
            {currentStatus} instead)
        details:
          $ref: '#/components/schemas/InvalidInvoiceStatusDetailsDto'
      required:
        - code
        - message
        - details
    InvalidPaymentModeDetailsDto:
      type: object
      properties:
        paymentMode:
          type: string
          enum:
            - DIRECT_DEBIT
            - BANK_TRANSFER
            - OFFLINE
        allowedPaymentModes:
          type: array
          items:
            type: string
            enum:
              - DIRECT_DEBIT
              - BANK_TRANSFER
              - OFFLINE
      required:
        - paymentMode
        - allowedPaymentModes
    InvoiceNotFoundDetailsDto:
      type: object
      properties:
        invoiceId:
          type: string
      required:
        - invoiceId
    InvoiceDoesNotBelongToCustomerDetailsDto:
      type: object
      properties:
        invoiceId:
          type: string
        customerId:
          type: string
        invoiceCustomerId:
          type: string
      required:
        - invoiceId
        - customerId
        - invoiceCustomerId
    InvalidChargeAttemptDetailsDto:
      type: object
      properties:
        reason:
          type: string
        invoiceId:
          type: string
        paymentIds:
          type: array
          items:
            type: string
      required:
        - reason
        - invoiceId
        - paymentIds
    InvalidInvoiceStatusDetailsDto:
      type: object
      properties:
        invoiceId:
          type: string
        currentStatus:
          type: string
        requiredStatus:
          type: array
          items:
            type: string
      required:
        - invoiceId
        - currentStatus
        - requiredStatus
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://korint-tenant.auth.eu-west-3.amazoncognito.com/oauth2/token
          scopes:
            korint.io/account: Read account information
            korint.io/analytics: Access analytics endpoints
            korint.io/assets: Access asset endpoints
            korint.io/billing: Access billing endpoints
            korint.io/branches: Access branch endpoints
            korint.io/broker: Access broker endpoints
            korint.io/claims: Access claim endpoints
            korint.io/comments: Access comment endpoints
            korint.io/customers: Access customer endpoints
            korint.io/derogations: Access derogation endpoints
            korint.io/documents: Access document endpoints
            korint.io/external: Access external lookup endpoints
            korint.io/external-claims: Declare claims from an external system
            korint.io/internal-notes: Access internal note endpoints
            korint.io/invitations: Access invitation endpoints
            korint.io/payments: Access payment endpoints
            korint.io/permissions: Access permission management endpoints
            korint.io/policies: Access policy endpoints
            korint.io/quotes: Access quote endpoints
            korint.io/reportings: Access reporting endpoints
            korint.io/signature: Access signature endpoints
      description: >-
        Machine-to-machine clients use the OAuth 2.0 client credentials grant.
        Each tenant has its own authorization server: in the token URL below,
        replace `tenant` with your tenant identifier.
    bearerAuth:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: An access token obtained from your tenant authorization server.

````