> ## 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.

# Create Payment Plan

> Create a new payment plan



## OpenAPI

````yaml api-reference/openapi.yaml POST /api/users/{id}/payment_plans
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:
    parameters:
      - $ref: '#/components/parameters/userIdParam'
      - $ref: '#/components/parameters/acceptEncodingParam'
      - $ref: '#/components/parameters/apiVersionParam'
    post:
      tags:
        - Debt Payoff Plan
      summary: Create Payment Plan
      description: Create a new payment plan
      operationId: createPaymentPlan
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - strategy
                - accounts
                - extra_amount
                - total_monthly_contribution
              properties:
                strategy:
                  type: string
                  enum:
                    - snowball
                    - avalanche
                  example: avalanche
                  description: The payment plan repayment strategy.
                accounts:
                  type: array
                  items:
                    type: integer
                  example:
                    - 1
                  description: Array of account IDs
                extra_amount:
                  type: integer
                  example: 5000
                  description: Extra payment amount in cents
                total_monthly_contribution:
                  type: integer
                  example: 20000
                  description: Total monthly payment by plan in cents
        required: true
      responses:
        '201':
          description: Returns a payment plan
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentPlan'
        '422':
          description: Payment plan already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    required:
                      - code
                      - message
                    properties:
                      code:
                        type: string
                        example: already_exist
                        description: An identifier of an error type inside API.
                      message:
                        type: string
                        example: Payment plan already exist
                        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:
    PaymentPlan:
      type: object
      required:
        - id
        - total_monthly_contribution
        - debt_free_date
        - strategy
        - extra_amount
        - accounts
        - upcoming_payments
      properties:
        id:
          type: integer
          example: 1
          description: Payment Plan ID
        total_monthly_contribution:
          type: integer
          example: 20000
          description: Total monthly payment by plan in cents
        debt_free_date:
          type: string
          example: '2045-01-23'
          description: Date of the last payment
        strategy:
          type: string
          enum:
            - snowball
            - avalanche
          example: avalanche
          description: The payment plan repayment strategy
        extra_amount:
          type: integer
          example: 5000
          description: Extra payment amount in cents
        upcoming_payments:
          type: array
          items:
            $ref: '#/components/schemas/PaymentPlanPayment'
          description: Upcoming payments for this and next month
        accounts:
          type: array
          items:
            type: integer
          example:
            - 1
          description: Array of account IDs
    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.
    PaymentPlanPayment:
      type: object
      required:
        - id
        - amount
        - status
        - type
        - payment_date
        - account_id
      properties:
        id:
          type: integer
          example: 1
          description: Payment Plan Payment ID
        amount:
          type: integer
          example: 10000
          description: Payment amount in cents
        status:
          type: string
          enum:
            - upcoming
            - paid
          example: upcoming
          description: Indicates whether payment is paid or upcoming
        type:
          type: string
          enum:
            - minimum
            - priority
            - final
          example: priority
          description: Indicates type of payment.
        payment_date:
          type: string
          example: '2026-06-06'
          description: When payment should be made
        estimated_balance:
          type: integer
          example: 4313500
          description: Expected amount of loan after payment
        estimated_payoff_date:
          type: string
          example: '2031-06-01'
          description: Expected payoff date for the loan
        account_id:
          type: integer
          example: 2
          description: Account ID for which payment should be made
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````