API Payments

See API Specification

Payments GET

Version Added: 22.2.32

Get a list of Payments for a patient.

Parameters:

PatNum: Required.
DateEntry: Optional. String in "yyyy-MM-dd" format. Gets all Payments made on or after a certain date.

Example Requests:
GET /payments?PatNum=1337
GET /payments?PatNum=1337&DateEntry=2022-06-24

Example Response:

[
{
"PayNum": 56734,
"PayType": 69,
"payType": "Check",
"PayDate": "2022-06-24",
"PayAmt": "339",
"CheckNum": "12798",
"BankBranch": "20-6",
"PayNote": "",
"PatNum": 1337,
"ClinicNum": "0",
"DateEntry": "2022-06-24",
"DepositNum": 0,
"Receipt": "",
"IsRecurringCC": "true",
"PaymentSource": "None",
"ProcessStatus": "OfficeProcessed",
"RecurringChargeDate": "0001-01-01",
"IsCcCompleted": "false",
"serverDateTime": "2022-08-26 11:55:44"
},
{
"PayNum": 56952,
"PayType": 69,
"payType": "Check",
"PayDate": "2022-07-24",
"PayAmt": "239",
"CheckNum": "12816",
"BankBranch": "20-6",
"PayNote": "",
"PatNum": 1337,
"ClinicNum": "0",
"DateEntry": "2022-07-24",
"DepositNum": 0,
"Receipt": "",
"IsRecurringCC": "true",
"PaymentSource": "None",
"ProcessStatus": "OfficeProcessed",
"RecurringChargeDate": "0001-01-01",
"IsCcCompleted": "false",
"serverDateTime": "2022-08-26 11:55:44"
}
]

200 OK
400 BadRequest (Missing or invalid fields)
404 NotFound (Patient not found)

Payments POST (create)

Version Added: 21.2

Creates a payment for a patient. Does not support income transfers or insurance payments.

Payments will be applied to the patient's payment plan, if one is eligible. The oldest plan will be chosen if there is more than one eligible plan. If needed, the user can later detach the payment from the plan within the Edit Payment Plan window by editing the split and unchecking "Attach to Payment Plan". They can also attach to a different plan in the same manner.

The payment's PayType is set to the one stored in the ApiPaymentType preference. The dental office sets this in Setup > Advanced Setup > API. This method also creates appropriate paysplits according to the payment allocation preferences from Setup > Allocations within Open Dental.

PayAmt: Required.
PatNum: Required.
PayDate: Optional. String in "yyyy-MM-dd" format. Defaults to today's date. Follows the office's preference to allow future-dated payments.
CheckNum: Optional.
PayNote: Optional.
BankBranch: Optional.
ClinicNum: Optional. Defaults to patient.ClinicNum
isPatientPreferred: Optional. When entering a payment through Open Dental directly, there is a checkbox for this option. This API field allows the same functionality. It causes the splits to go to the patient instead of being split among family members on a FIFO basis. Default "false".
isPrepayment: (Added in version 22.4.8) Optional. Creates a single paysplit using the default unearned type for unallocated paysplits stored in the PrepaymentUnearnedType preference. See also Unearned / Prepayment. Default "false".
procNums: (Added in version 22.4.16) Optional. An array of ProcNums, in [1,2,3] format to apply this Payment to. Procedures are paid by Procedure.ProcDate on a FIFO basis. Procedures not in the Patient's family will be silently ignored. Ignored if isPrepayment is set to "true". Default is an empty array.

Example Requests:
POST /payments

{
"PayAmt": "129.99",
"PatNum": 1568
}

{
"PayAmt": "129.99",
"PatNum": 1568,
"PayDate": "2021-07-05",
"CheckNum": "2058",
"PayNote": "Check payment through website",
"BankBranch": "19-7076",
"ClinicNum": "3",
"isPatientPreferred" : "true",
"isPrepayment" : "false",
"procNums" : [13,14,18]
}

Example Response:

{
"PayNum": 56734,
"PayType": 383,
"payType": "Check",
"PayDate": "2021-07-05",
"PayAmt": "129.99",
"CheckNum": "2058",
"BankBranch": "19-7076",
"PayNote": "Check payment through website",
"PatNum": 1568,
"ClinicNum": "3",
"DateEntry": "2022-06-24",
"DepositNum": 0,
"Receipt": "",
"IsRecurringCC": "true",
"PaymentSource": "None",
"ProcessStatus": "OfficeProcessed",
"RecurringChargeDate": "0001-01-01",
"IsCcCompleted": "false",
"serverDateTime": "2022-08-26 11:55:44"
}

201 Created
400 BadRequest (Missing or invalid fields)
404 NotFound (Patient not found)