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

# Get payment plan

> Get a single payment plan by its id.

**Required scope:** `read:payment-plans`



## OpenAPI

````yaml GET /v1/{tenantId}/payment-plans/{paymentPlanId}
openapi: 3.1.0
info:
  title: Debbie API Docs
  description: >
    The Debbie API is a RESTful interface, allowing you to programmatically

    update, add and access your data in the platform. It provides predictable
    URLs

    for accessing resources, and uses built-in HTTP features to receive commands
    and

    return responses. This makes it easy to communicate with third party
    systems.


    ## Idempotency


    The Debbie API supports idempotency for non-idempotent requests through the
    optional `Idempotency-Key` header. 

    This ensures that retrying the same request multiple times will produce the
    same result, preventing duplicate operations.


    ### Using Idempotency Keys


    - Include an `Idempotency-Key` header with a unique string (we recommend
    UUIDs)  

    - Maximum key length is 64 characters

    - Keys are valid for 48 hours

    - Responses served from the idempotency cache include an
    `Idempotency-Cached` header


    ### Example

    ```http

    Idempotency-Key: 123e4567-e89b-12d3-a456-426614174000

    ```


    ### Error Cases

    - Invalid key format: 400 Bad Request

    - Reusing a key for a different request: 400 Bad Request


    ### Best Practices

    - Use a new key for each unique business transaction

    - Use the same key when retrying a failed request 

    - Store keys with request details for debugging
  contact:
    email: api-support@debbie.dk
  version: v0.1.0
servers:
  - url: https://api.debbiecollect.com
security:
  - bearerAuth: []
tags:
  - name: Authorization
    description: Endpoints for interacting with authorization
  - name: Cases
    description: Endpoints for interacting with cases
  - name: Customers
    description: Endpoints for interacting with customers
  - name: Creditors
    description: Endpoints for interacting with creditors
  - name: Ultimate creditors
    description: >-
      Endpoints for interacting with ultimate creditors. An ultimate creditor is
      the original creditor behind the creditor on a case — for example when a
      debt collection agency forwards cases on behalf of its own client. On
      cases with an ultimate creditor, the creditor template mentions (name,
      address and company identifier) use the details of the ultimate creditor.
  - name: Updates
    description: Endpoints for interacting with updates
  - name: Users
    description: Endpoints for interacting with updates
  - name: Files
    description: Endpoints for interacting with files
  - name: Case vouchers
    description: Endpoints for interacting with case vouchers
  - name: Voucher types
    description: The voucher types of the tenant, used to categorize case vouchers
  - name: Interactions
    description: >-
      Interactions are messages and notes on a case, for example an incoming
      message from a debtor.
  - name: Billing
    description: Endpoints for interacting with billing
  - name: Links
    description: Endpoints for generating links
  - name: Webhooks
    description: >-
      Debbie provides a range of webhooks. To try them out please visit Debbie
      Caseworker and navigate to Settings --> Developers --> Webhooks.
  - name: End reasons
    description: Endpoints for interacting with end reasons
  - name: Case groups
    description: Endpoints for interacting with case groups
externalDocs:
  description: Find out more about Debbie here
  url: https://debbiecollect.com
paths:
  /v1/{tenantId}/payment-plans/{paymentPlanId}:
    get:
      tags:
        - Payment plans
      summary: Get payment plan
      description: |-
        Get a single payment plan by its id.

        **Required scope:** `read:payment-plans`
      operationId: get-payment-plan
      parameters:
        - in: path
          name: tenantId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the tenant the payment plans belong to
        - in: path
          name: paymentPlanId
          schema:
            type: string
            format: uuid
          required: true
          description: Id of the payment plan
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentPlan'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          description: The payment plan does not exist on the tenant
        '422':
          $ref: '#/components/responses/UnprocessableContent'
components:
  schemas:
    PaymentPlan:
      type: object
      properties:
        paymentPlanId:
          type: string
          format: uuid
          description: Id of the payment plan
        caseId:
          type: string
          format: uuid
          description: Id of the case the plan belongs to
        status:
          type: string
          enum:
            - CREATED
            - ACTIVE
            - FINISHED
            - CANCELED
            - DELETED
          description: >-
            Status of the plan. Deleted plans keep their row with status DELETED
            and a deletedAt timestamp.
        activationTrigger:
          type: boolean
          description: Whether the plan activates automatically when the debtor accepts it
        createdAt:
          type: string
          description: Timestamp the plan was created at
        createdBy:
          type:
            - object
            - 'null'
          description: >-
            Who created the plan. Always carries a type (e.g. USER, KEY,
            WORKFLOW, AI, SYSTEM); most types add an id, and some carry extra
            type-specific fields. null when unknown.
          properties:
            type:
              type: string
            id:
              type:
                - string
                - 'null'
          additionalProperties: true
        deletedAt:
          type:
            - string
            - 'null'
          description: Timestamp the plan was deleted at
        deletedBy:
          type:
            - object
            - 'null'
          description: >-
            Who deleted the plan. Always carries a type (e.g. USER, KEY,
            WORKFLOW, AI, SYSTEM); most types add an id, and some carry extra
            type-specific fields. null when unknown.
          properties:
            type:
              type: string
            id:
              type:
                - string
                - 'null'
          additionalProperties: true
        signed:
          type: boolean
          description: Whether the plan document has been signed
        documentId:
          type:
            - string
            - 'null'
          format: uuid
          description: Id of the plan document
        documentSignedAt:
          type:
            - string
            - 'null'
          description: Timestamp the plan document was signed at
        documentFileId:
          type:
            - string
            - 'null'
          format: uuid
          description: Id of the signed plan document file
        paymentMethodId:
          type:
            - string
            - 'null'
          format: uuid
          description: Id of the payment method the plan settles with
        paymentMethodStatus:
          type:
            - string
            - 'null'
          description: Status of the payment method
        paymentMethodType:
          type:
            - string
            - 'null'
          description: Type of the payment method
        provider:
          type:
            - string
            - 'null'
          description: Payment provider behind the payment method
        config:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Configuration the plan was generated from
        plan:
          type: array
          items:
            $ref: '#/components/schemas/PaymentPlanEntry'
          description: Entries of the plan, oldest first
      examples:
        - paymentPlanId: 5e6f7a8b-9c0d-1e2f-3a4b-5c6d7e8f9a0b
          caseId: 3f1c2d4e-5a6b-7c8d-9e0f-1a2b3c4d5e6f
          status: ACTIVE
          activationTrigger: true
          createdAt: '2025-01-01T20:00:00.000Z'
          createdBy: null
          deletedAt: null
          deletedBy: null
          signed: true
          documentId: 1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d
          documentSignedAt: '2025-01-02T09:12:00.000Z'
          documentFileId: 2b3c4d5e-6f7a-8b9c-0d1e-2f3a4b5c6d7e
          paymentMethodId: null
          paymentMethodStatus: null
          paymentMethodType: null
          provider: null
          config: null
          plan:
            - paymentPlanEntryId: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
              amount: 250000
              status: SETTLED
              type: NORMAL
              reminder: '2025-02-01T00:00:00.000Z'
              date: '2025-02-08T00:00:00.000Z'
              deadline: '2025-02-15T00:00:00.000Z'
              cancel: '2025-02-22T00:00:00.000Z'
              interestAmount: null
    PaymentPlanEntry:
      type: object
      properties:
        paymentPlanEntryId:
          type: string
          format: uuid
          description: Id of the entry
        amount:
          type: number
          description: Amount of the entry, in minor units of the case currency
        status:
          type: string
          enum:
            - PENDING
            - REMINDED
            - SETTLED
            - AWAITING
            - ERRORSETTLED
            - CANCELED
            - OVERDUE
          description: >-
            Status of the entry. SETTLED and AWAITING entries survive a
            recalculation of the plan; the others are regenerated.
        type:
          type: string
          enum:
            - UPFRONT
            - NORMAL
            - REST
          description: Type of the entry
        reminder:
          type: string
          description: Date the debtor is reminded of the entry
        date:
          type: string
          description: Due date of the entry
        deadline:
          type: string
          description: Date after which the entry is overdue
        cancel:
          type: string
          description: Date after which the entry, and the plan with it, is cancelled
        interestAmount:
          type:
            - number
            - 'null'
          description: Interest included in the entry, if any
  responses:
    UnauthorizedError:
      description: Access token missing or invalid
    UnprocessableContent:
      description: Unable to process the contained instructions.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authentication can be done by using a bearer token in the Authorization
        header. This is done using the following format `Authorization: Bearer
        {token}`.

````