PayPlans POST NumberOfPayments

For requests or help with our API
Post Reply
saskia
Posts: 70
Joined: Tue Apr 04, 2023 8:31 am

PayPlans POST NumberOfPayments

Post by saskia » Tue Nov 05, 2024 4:55 pm

When creating a dynamic payment plan, despite providing the NumberOfPayments, it's being set to 0. Below is an example request/response from my test environment (updated to the latest stable version as of today). This came up because one of our clients noticed it and I can't figure out what we might be doing wrong. I've messed around with DynamicPayPlanTPOption but there really isn't anything else I can think of that we can tinker with to get it to set the number of payments to what we've asked for. What are we doing wrong? Or are we misunderstanding how this works? Thanks!

Request
{
"PatNum" : 25,
"Guarantor": 25,
"PayPlanDate": "2024-11-5",
"NumberOfPayments": 10,
"DownPayment": 1,
"Note": "messing with notes",
"ChargeFrequency":"Monthly",
"DatePayPlanStart": "2024-11-5",
"DynamicPayPlanTPOption": "TreatAsComplete",
"procNums": [180],
}

Response
{
"PayPlanNum": 72,
"PatNum": 25,
"Guarantor": 25,
"PayPlanDate": "2024-11-05",
"APR": 0.0,
"Note": "11/05/2024 - Date of Agreement: 11/05/2024, Total Amount: 70.00, APR: 0, Total Cost of Loan: 70.00, messing with notes",
"PlanNum": 0,
"CompletedAmt": 70.0,
"InsSubNum": 0,
"PaySchedule": "Monthly",
"NumberOfPayments": 0,
"PayAmt": 6.9,
"DownPayment": 1.0,
"IsClosed": "false",
"PlanCategory": 0,
"planCategory": "",
"IsDynamic": "true",
"ChargeFrequency": "Monthly",
"DatePayPlanStart": "2024-11-05",
"IsLocked": "false",
"DateInterestStart": "0001-01-01",
"DynamicPayPlanTPOption": "TreatAsComplete",
"principalAmount": 70.0
}

justine
Posts: 286
Joined: Tue Dec 28, 2021 7:59 am

Re: PayPlans POST NumberOfPayments

Post by justine » Wed Nov 06, 2024 9:59 am

saskia wrote:
Tue Nov 05, 2024 4:55 pm
When creating a dynamic payment plan, despite providing the NumberOfPayments, it's being set to 0. Below is an example request/response from my test environment (updated to the latest stable version as of today). This came up because one of our clients noticed it and I can't figure out what we might be doing wrong. I've messed around with DynamicPayPlanTPOption but there really isn't anything else I can think of that we can tinker with to get it to set the number of payments to what we've asked for. What are we doing wrong? Or are we misunderstanding how this works? Thanks!

Request
{
"PatNum" : 25,
"Guarantor": 25,
"PayPlanDate": "2024-11-5",
"NumberOfPayments": 10,
"DownPayment": 1,
"Note": "messing with notes",
"ChargeFrequency":"Monthly",
"DatePayPlanStart": "2024-11-5",
"DynamicPayPlanTPOption": "TreatAsComplete",
"procNums": [180],
}

Response
{
"PayPlanNum": 72,
"PatNum": 25,
"Guarantor": 25,
"PayPlanDate": "2024-11-05",
"APR": 0.0,
"Note": "11/05/2024 - Date of Agreement: 11/05/2024, Total Amount: 70.00, APR: 0, Total Cost of Loan: 70.00, messing with notes",
"PlanNum": 0,
"CompletedAmt": 70.0,
"InsSubNum": 0,
"PaySchedule": "Monthly",
"NumberOfPayments": 0,
"PayAmt": 6.9,
"DownPayment": 1.0,
"IsClosed": "false",
"PlanCategory": 0,
"planCategory": "",
"IsDynamic": "true",
"ChargeFrequency": "Monthly",
"DatePayPlanStart": "2024-11-05",
"IsLocked": "false",
"DateInterestStart": "0001-01-01",
"DynamicPayPlanTPOption": "TreatAsComplete",
"principalAmount": 70.0
}
Good morning saskia,

I'm going to look into this and get back to you.

Thanks!

DerekR
Posts: 103
Joined: Wed Aug 31, 2022 1:13 pm

Re: PayPlans POST NumberOfPayments

Post by DerekR » Thu Nov 07, 2024 11:12 am

Good morning saskia,

Payplan.NumberOfPayments is a field that was used for the Old Payment Plans. Old Payment Plans, formerly Patient Payment Plans, are a deprecated feature. Additional Old Payment Plans cannot be created. Existing Old Payment Plans can still be returned with API PayPlans GET (multiple), and those may contain a value for the NumberOfPayments field.

The current Payment Plan which were formally called Dynamic Payment Plans use the NumberOfPayments field to calculate the PayPlan.PayAmt, but does not actually save the NumberOfPayments field itself.

When you are using PayPlans POST Dynamic and specify NumberOfPayments, it will be used to calculate the PayAmt, then will always return as 0 for the API response as that is the value saved to the DB.

Thanks!

saskia
Posts: 70
Joined: Tue Apr 04, 2023 8:31 am

Re: PayPlans POST NumberOfPayments

Post by saskia » Thu Nov 07, 2024 12:14 pm

Thanks - you may want to clarify that as your documentation doesn't mention that the value isn't saved and just used to calculate.
PayAmt: This or NumberOfPayments is required. The amount due per payment plan charge.
NumberOfPayments: This or PayAmt is required. The total number of payments in the payment plan.
So how do we ensure the Amortization Schedule gets populated as that's what our clients are looking at and thinking there are no payments set. It sounds like it's working like you designed it but it's not intuitive to end users and think something is wrong, so delete it and create it themselves in Open Dental directly. What am I missing? Thanks!

image (14).png
image (14).png (68.45 KiB) Viewed 6730 times

DerekR
Posts: 103
Joined: Wed Aug 31, 2022 1:13 pm

Re: PayPlans POST NumberOfPayments

Post by DerekR » Thu Nov 07, 2024 1:19 pm

saskia wrote:
Thu Nov 07, 2024 12:14 pm
Thanks - you may want to clarify that as your documentation doesn't mention that the value isn't saved and just used to calculate.
PayAmt: This or NumberOfPayments is required. The amount due per payment plan charge.
NumberOfPayments: This or PayAmt is required. The total number of payments in the payment plan.
So how do we ensure the Amortization Schedule gets populated as that's what our clients are looking at and thinking there are no payments set. It sounds like it's working like you designed it but it's not intuitive to end users and think something is wrong, so delete it and create it themselves in Open Dental directly. What am I missing? Thanks!

image (14).png
In the screenshot you provided, "Await procedure completion" is selected which is equivalent to "DynamicPayPlanTPOption": "AwaitComplete" in PayPlans POST Dynamic. In that situation the Amortization Schedule will not populate further until the Treatment Planned procedures attached as Production are completed.

To ensure that the PayPlan is created with a specific number of payments showing in the Amortization Schedule, "Procedure as complete" needs to be selected, which is equivalent to "DynamicPayPlanTPOption": "TreatAsComplete" in PayPlans POST Dynamic.

However, after the PayPlan is created, the Amortization Schedule can change if production is added or removed, or additional payments are made.

Thanks!

Post Reply