# Get payment plan by id

Return a single payment plan.

Endpoint: GET /people/{personId}/loans/{loanId}/custom-payment-plans/{paymentPlanId}
Version: 2025-03-26
Security: oauth2, bearerAuth, apiKeyHeader

## Path parameters:

  - `personId` (string, required)
    A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

  - `loanId` (string, required)
    The unique identifier of the Loan we wish to retrieve. Can be
Peach or lender's external identifier.

  - `paymentPlanId` (string, required)
    The identifier of the payment plan.

## Response 200 fields (application/json):

  - `message` (string)
    Description of the server action or error.

  - `status` (integer)
    HTTP status code.

  - `data` (object)

  - `data.amount` (number)
    Amount required to be fulfilled for each payment plan period. The `amount` provided should be the recurring amount rather than the total amount
of the plan. Peach's system will use the amount provided to determine whether the borrower is past due and report to bureaus accordingly (if applicable).
Note: Any fees added during the duration of the payment plan must also be paid in order for the borrower to remain "current".
`amount` can be higher or lower than the borrower's originally contracted amount. Peach's system will revert to the recurring amount after the payment
plan end date if the loan still has a balance at the end of the payment plan.
Do not pass this attribute if the payment plan type is `interestAndFees`.

  - `data.canceledBy` (string)
    Identifier of the `User` who canceled the payment plan.

  - `data.cancellationCaseId` (string)
    An identifier for an existing case.

  - `data.cancellationReason` (string)
    The cancellation reason:
`canceledByUser` - payment plan was canceled by an agent or borrower.
`loanTermsChanged` - loan terms changed.
`loanChargedOff` - loan was charged off.
`loanAccelerated` - loan was accelerated.
`otherPaymentPlanOffered` - another payment plan was offered.
`other` - for any other reason requiring cancellation.
    Enum: "canceledByUser", "loanTermsChanged", "loanChargedOff", "loanAccelerated", "otherPaymentPlanOffered", "other"

  - `data.createdBy` (string)
    Identifier of the `User` who created the payment plan.

  - `data.creationCaseId` (string)
    An identifier for an existing case.

  - `data.externalId` (string)
    A lender's identifier for a payment pay plan.
After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.
To fetch the object using externalId you need to add `ext-` to the URL.
Note: Don't add ext- to the identifier value. For example: if the external identifier is `ABCDE`, then pass externalId=ACBCE
and NOT ext-ABCDE when creating the object.

  - `data.id` (string)

  - `data.isExtendLoanDuration` (boolean)
    If `true`, the system may adjust and increase the loan `duration` beyond the current end date to accommodate the payment plan. If `false`, the
system will not add additional periods beyond the current loan `duration`.

  - `data.numberOfPeriods` (integer)
    The number of periods during which the payment plan terms are effective. Represented as the number of `paymentFrequency` periods. The system will
begin counting the `numberOfPeriods` from the period represented by the `selectedDueDate`.
The `numberOfPeriods` of the payment plan must take place within the existing loan duration. Moreover, if `isExtendLoanDuration` is `true`,
the `numberOfPeriods` must end on or before the last period of the loan. If `isExtendLoanDuration` is `false`, then `numberOfPeriods` for the payment
plan must end on or before the second to last payment.
For example, if the payment plan `frequency=weekly` and `numberOfPeriods=6` and the remaining loan duration is 12, the payment plan will be created with a
6 weeks duration during which the designated payment plan `amount` is in effect. Any subsequent periods after the payment plan has ended will revert
to the original periodic payment amount.

  - `data.paymentPlanType` (string)
    Determines how the system will calculate payment plan payments during the payment plan's `numberOfPeriods`.
`fixedAmountAndFees` - the payment plan payment amounts will be set as a recurring `amount`. Note that any configured recurring
fees (e.g. service fees) will also be included in the payment plan amount unless explicitly canceled. `amount` must be passed at
the time of payment plan creation when using this option.
`interestAndFees` - the payment plan amounts will be calculated by Peach's system as "interest only". Note that any configured
recurring fees (e.g. service fees) will also be included in the payment plan amount unless explicitly canceled. Do not pass `amount`
when using this option.
    Enum: "fixedAmountAndFees", "interestAndFees"

  - `data.reasonDetails` (string)
    The reason for payment plan cancellation. This is typically entered by an agent canceling a payment plan via the front end.

  - `data.schedule` (array)

  - `data.schedule.amount` (number)
    The amount of the expected payment.

  - `data.schedule.date` (string)
    The due date of the expected payment.

  - `data.schedule.dynamicFeeDetails` (object)
    When `paymentType`=`dynamicFee` this will contain details of the dynamic fee.

  - `data.schedule.dynamicFeeDetails.apiName` (string)
    The API name of the dynamic fee. For example: 'lateFee' or 'breatherFee'.

  - `data.schedule.dynamicFeeDetails.displayName` (string)
    The display name of the dynamic fee as shown to the borrower in the UI. For example: `Late Fee` or `Breather Fee`.

  - `data.schedule.dynamicFeeDetails.dynamicFeeTypeId` (string)
    The dynamic fee type identifier in the system.

  - `data.schedule.dynamicFeeDetails.loanFeeId` (string)
    The loan fee identifier in the system.

  - `data.schedule.interestAmount` (number)
    The portion of the `amount` allocated to net interest.
Available only for `paymentType=periodicPayment`.

  - `data.schedule.interestBeforeDiscountAmount` (number)
    The interest amount that was accrued before promo rate(s) or any discount.
Available only for `paymentType=periodicPayment`.

  - `data.schedule.isDeferred` (boolean)
    `true` if the amount of this expected payment has been deferred before.

  - `data.schedule.isForcedAmount` (boolean)
    Only applicable to `paymentType=periodicPayment`.
If set to `true`, the system will honor the amount and will not update it on loan recalculations.
If set to `false` and the amount is less than the `periodicPaymentAmount`, the system can increase the amount when
the loan is being recalculated.
In most of the cases, the lender should set the value to `false` (aka the default value.) If you need more
explanation or advice on your use case, please contact the Peach team.

  - `data.schedule.originalAmount` (number)
    The amount of the expected payment at creation. The `amount` will change as a result of refreshing
expected payments, but the `originalAmount` will stay the same.

  - `data.schedule.paymentType` (string)
    The payment type.
    Enum: "periodicPayment", "originationFee", "drawFee", "dynamicFee", "downPayment", "discountCredit"

  - `data.schedule.periodId` (string)
    The period identifier.

  - `data.schedule.principalAmount` (number)
    The portion of the `amount` allocated to principal.
Available only for `paymentType=periodicPayment`.

  - `data.schedule.status` (string)
    The status of the expected payment.
`scheduled`  - borrower is expected to make the payment. Only applicable to paymentType=dynamicFee.
`booked` - borrower is or was expected to make the payment.
`modified` - the amount was modified at some point and different from the original amount.
`canceled` - borrower is or was not expected to make the payment.
    Enum: "booked", "modified", "canceled"

  - `data.schedule.unroundedInterestAmount` (string)
    The portion of the `amount` allocated to net interest. Available only for `paymentType=periodicPayment`.
This value is unrounded.

  - `data.schedule.unroundedInterestBeforeDiscountAmount` (string)
    The interest amount that was accrued before promo rate(s) or any discount. Available only for
`paymentType=periodicPayment`. This value is unrounded.

  - `data.schedule.unroundedPrincipalAmount` (string)
    The portion of the `amount` allocated to principal. Available only for `paymentType=periodicPayment`.
This value is unrounded.

  - `data.selectedDueDate` (string)
    The due date of the period from which to begin the payment plan. If `selectedDueDate` is not provided upon payment plan creation,
the system will use the current period due date as the `selectedDueDate`. If `selectedDueDate` is provided, it must be for a due date in the future.

  - `data.status` (string)
    The payment plan status. Once a payment plan is created, it is, by definition, `active`. Once all
periods in a payment plan period have passed, it will change status to `inactive`. If a payment plan
is canceled, it will change status to `canceled`.
    Enum: "active", "inactive", "canceled"

  - `data.timestamps` (object)

  - `data.timestamps.canceledAt` (string)

  - `data.timestamps.createdAt` (string)

