payType set to API default

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

payType set to API default

Post by saskia » Fri Nov 17, 2023 7:46 am

Troubleshooting an issue whereby we're sending the payType, however, in OpenDental the payType ends up being the API default rather than what was sent. Things we've checked:
  • Client is using a version that supports this feature (they're on 23.1.43/45/46 - they have multiple locations)
  • payType exists (we have logic to create the payType if it doesn't exist)
  • API response shows the payType we sent (but I noticed we get that response even when we send payType to an OD instance that is not on a supported version so that can be entirely misleading as to what actually got written back)
Any other thoughts or insights to help troubleshoot this issue?

Thanks!

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

Re: payType set to API default

Post by DerekR » Fri Nov 17, 2023 11:31 am

Good Morning saskia,

We are unable to reproduce the issue you are describing, where you are sending a request to Payments POST, with a PayType specified, but the PayType ends up being the API default. It is also our understanding that the API response shows the PayType you specified, but when you check in Open Dental later, the PayType is different.

If our understanding is correct, could you please include the Json Body of the request that is experiencing this issue. And what is the time frame between sending the request and verifying in Open Dental. Is it possible that an employee at the dental office is changing the PayType?

It is also possible that since the PayType is a FK to definition.DefNum where definition.Category=10, that the DefNums could be different for various customers. For example, a custom PayType definition called "API Check", could have a DefNum of 81 for one customer, but then would be 87 for another. We would recommend ensuring that this situation is not the cause of the issue.

Thanks!

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

Re: payType set to API default

Post by saskia » Fri Nov 17, 2023 11:49 am

Hey! I can't reproduce it in our test environment either - the only thing I was able to reproduce was sending payType to an OD instance that didn't support payType, and the response I received still showed the payType I had configured rather than the default - so the response is misleading as it's not actually telling me what was written back, just spitting back what I sent.

We have a separate table to keep track of the definition.DefNum per OD instance - we'll check if it exists first, then create it if needed, and then write back, so that angle is covered.

As for whether an employee is changing it - I did consider that, but they're saying it's a lot of payments (I'm waiting for them to check other pay types for me). I'll follow up on this angle again.

I'll need to get a hand from a developer for json, however, in the meantime, I've pulled the response from our logs (card last 4 has been obscured):

Code: Select all

Response: {"PayNum":18291,"PayType":71,"payType":"Credit Card","PayDate":"2023-11-16","PayAmt":"2885","CheckNum":"","BankBranch":"","PayNote":"ID: 01HFCGK8P68VFR149CVHVT2KJ9 Credit / Debit ending in XXXX","PatNum":5396,"ClinicNum":0,"DateEntry":"2023-11-16","DepositNum":0,"Receipt":"","IsRecurringCC":"false","PaymentSource":"API","ProcessStatus":"OfficeProcessed","RecurringChargeDate":"0001-01-01","IsCcCompleted":"false","serverDateTime":""}

Post Reply