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

# Get the payment plan of an invoice

> Return the payment plan attached to an invoice. If an active plan exists it is returned, otherwise the most recent plan of any status. Responds with 404 if the invoice never had a plan.



## OpenAPI

````yaml assets/openapi-v2-payment-plans.json get /api/invoices/{id}/payment-plan
openapi: 3.1.0
info:
  title: Fynn V2 Payment Plans API
  version: 2026-07
  description: >-
    REST API for Fynn payment plans (Zahlungsplan). Split an open invoice into
    interest-free installments while dunning stays paused, let Fynn collect
    direct-debit installments automatically, and react to the plan lifecycle
    over webhooks. All amounts are integers in the smallest currency unit
    (cents). Authenticate with an Organisation API token.
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - ApiToken: []
tags:
  - name: Payment Plans
    description: Create, read, cancel and extend the installment plan of an open invoice.
paths:
  /api/invoices/{id}/payment-plan:
    get:
      tags:
        - Payment Plans
      summary: Get the payment plan of an invoice
      description: >-
        Return the payment plan attached to an invoice. If an active plan exists
        it is returned, otherwise the most recent plan of any status. Responds
        with 404 if the invoice never had a plan.
      operationId: getInvoicePaymentPlan
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 10000000-0000-0000-0003-000000000001
          description: The invoice UUID.
      responses:
        '200':
          description: The payment plan of the invoice.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentPlan'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PaymentPlan:
      type: object
      properties:
        id:
          type: string
          format: uuid
          example: 10000000-0000-0000-00e0-000000000001
        invoiceId:
          type: string
          format: uuid
          example: 10000000-0000-0000-0003-000000000001
        status:
          $ref: '#/components/schemas/PlanStatus'
        totalAmount:
          type: integer
          description: >-
            Sum of all installments in cents. Equals the open amount at
            creation.
          example: 1190
        currencyCode:
          type: string
          example: EUR
        paymentMethodId:
          type: string
          format: uuid
          nullable: true
          example: 10000000-0000-0000-004f-000000000001
        createdAt:
          type: string
          format: date-time
          example: '2026-07-05T16:20:00+00:00'
        completedAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp the plan completed (all installments paid), or null.
          example: null
        brokenAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp the plan broke, or null.
          example: null
        canceledAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp the plan was canceled, or null.
          example: null
        brokenReason:
          type: string
          nullable: true
          description: Reason the plan broke, or null while active.
          example: null
        installments:
          type: array
          items:
            $ref: '#/components/schemas/Installment'
      required:
        - id
        - invoiceId
        - status
        - totalAmount
        - currencyCode
        - paymentMethodId
        - createdAt
        - completedAt
        - brokenAt
        - canceledAt
        - brokenReason
        - installments
    PlanStatus:
      type: string
      description: Lifecycle status of a payment plan.
      enum:
        - active
        - completed
        - broken
        - canceled
    Installment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        position:
          type: integer
          description: 1-based position within the plan.
          example: 1
        dueAt:
          type: string
          format: date
          description: Due date (Y-m-d).
          example: '2026-08-05'
        amount:
          type: integer
          description: Installment amount in cents.
          example: 595
        status:
          $ref: '#/components/schemas/InstallmentStatus'
        paidAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp the installment was fully covered (ISO 8601), or null.
          example: null
      required:
        - id
        - position
        - dueAt
        - amount
        - status
        - paidAt
    ProblemError:
      type: object
      description: >-
        Problem detail error body (application/problem+json). Additional members
        may be present depending on the error.
      properties:
        status:
          type: integer
          example: 422
        type:
          type: string
          description: Stable machine readable error key.
          example: PAYMENT_PLAN__SUM_MISMATCH
        title:
          type: string
          example: An error occurred
        detail:
          type: string
          example: The installments must sum to the open amount of the invoice.
      required:
        - status
        - type
        - title
        - detail
    InstallmentStatus:
      type: string
      description: Status of a single installment.
      enum:
        - open
        - collecting
        - paid
        - failed
  responses:
    Unauthorized:
      description: Authentication is missing or the token is invalid.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemError'
    Forbidden:
      description: The token is valid but lacks the required permission.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemError'
    NotFound:
      description: The requested resource does not exist for this Organisation.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemError'
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      description: >-
        Organisation API token. Send it as Authorization: Bearer api_... The
        token is scoped to a single Organisation. Reading a plan needs the
        invoice read permission, creating, canceling and extending need the
        invoice write permission.

````