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

# Payoff Plan Calculation

> Calculate payments for payment plan based extra payment amount



## OpenAPI

````yaml api-reference/openapi.yaml POST /api/users/{id}/payment_plans/pre_calculate_payments
openapi: 3.0.1
info:
  title: DebtWise API
  version: '2024-07-01'
  description: >-
    The DebtWise API suite is the primary means for developers to offer debt
    management tools within their existing applications.
  contact:
    name: DebtWise Support
    url: https://debt-wise.com
    email: support@debt-wise.com
servers:
  - url: https://staging.debt-wise.com
    description: Sandbox server (uses test data)
  - url: https://app.debt-wise.com
    description: Production server (uses live data)
security:
  - bearerAuth: []
tags:
  - name: Ping
  - name: Users
  - name: Accounts
  - name: Credit Scores
  - name: Equifax
  - name: Debt Payoff Plan
  - name: Debt Payoff Plan Payments
  - name: Articles
  - name: Debt Calculator
paths:
  /api/users/{id}/payment_plans/pre_calculate_payments:
    parameters:
      - $ref: '#/components/parameters/userIdParam'
      - $ref: '#/components/parameters/acceptEncodingParam'
      - $ref: '#/components/parameters/apiVersionParam'
    post:
      tags:
        - Debt Payoff Plan
      summary: Payoff Plan Calculation
      description: Calculate payments for payment plan based extra payment amount
      operationId: preCalculatePayments
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - accounts
                - start
                - end
                - step
              properties:
                accounts:
                  type: array
                  items:
                    type: integer
                  example:
                    - 1
                  description: Array of account IDs
                start:
                  type: integer
                  example: 0
                  description: Start of extra amount in hole dollars
                end:
                  type: integer
                  example: 1000
                  description: End of extra amount in hole dollars
                step:
                  type: integer
                  example: 10
                  description: Step of calculation hole dollars
        required: true
      responses:
        '200':
          description: Returns a payment plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PreCalculatePayments'
        '422':
          description: Missing account information error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: account_information_missing
                        description: An identifier of an error type inside API.
                      message:
                        type: string
                        example: >-
                          Accounts with id: [1] are missing APR or minimum
                          payment.
                        description: A human-readable error description.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  parameters:
    userIdParam:
      name: id
      in: path
      schema:
        type: integer
        example: 1
      description: An userId.
      required: true
    acceptEncodingParam:
      name: Accept-Encoding
      in: header
      description: We can compress a response with gzip.
      required: false
      schema:
        type: string
        example: gzip deflate
    apiVersionParam:
      name: API-Version
      in: header
      description: API API Version. See Versioning page for more details.
      required: false
      schema:
        type: string
        example: '2024-07-01'
  schemas:
    PreCalculatePayments:
      type: object
      properties:
        avalanche:
          type: object
          description: >-
            Repayment plans based on the avalanche method, where keys represent
            additional payment amounts (in dollars) added towards debt
            repayment.
          additionalProperties:
            type: object
            description: Details of repayment plan for a specific additional payment amount
            properties:
              debt_free:
                type: string
                format: date
                example: '2025-07-23'
                description: The estimated date when the debt will be fully paid off
              total_payments_amount:
                type: number
                format: float
                example: 433.04
                description: >-
                  The total amount paid to clear the debt, including principal
                  and interest
              month_payment:
                type: number
                format: float
                example: 40
                description: The monthly payment required for this repayment plan
              loans:
                type: array
                description: A list of loans being repaid under this repayment plan
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 77576
                      description: Account ID.
                    debt_free:
                      type: string
                      format: date
                      example: '2025-07-23'
                      description: >-
                        The estimated date when this specific loan will be fully
                        paid off
        snowball:
          type: object
          description: >-
            Repayment plans based on the snowball method, where keys represent
            additional payment amounts (in dollars) added towards debt
            repayment.
          additionalProperties:
            type: object
            description: Details of repayment plan for a specific additional payment amount
            properties:
              debt_free:
                type: string
                format: date
                example: '2025-07-23'
                description: The estimated date when the debt will be fully paid off
              total_payments_amount:
                type: number
                format: float
                example: 433.04
                description: >-
                  The total amount paid to clear the debt, including principal
                  and interest
              month_payment:
                type: number
                format: float
                example: 40
                description: The monthly payment required for this repayment plan
              loans:
                type: array
                description: A list of loans being repaid under this repayment plan
                items:
                  type: object
                  properties:
                    id:
                      type: integer
                      example: 77576
                      description: Account ID
                    debt_free:
                      type: string
                      format: date
                      example: '2025-07-23'
                      description: >-
                        The estimated date when this specific loan will be fully
                        paid off
    InternalServerError:
      type: object
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: internal_server_error
              description: An identifier of an error type inside API.
            message:
              type: string
              example: >-
                We've notified our engineers and hope to address this issue
                shortly.
              description: A human-readable error description.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````