curl --request GET \
--url https://api.decodahealth.com/billing/payment/table \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'{
"items": {
"data": [
{
"id": "<string>",
"amount": 123,
"currency": "<string>",
"status": "<string>",
"paymentMedium": "<string>",
"fee": 123,
"feeToPatient": 123,
"createdDate": "2023-11-07T05:31:56Z",
"refunds": [
{
"id": "<string>",
"amount": 123,
"reason": "DUPLICATE",
"createdDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"creator": {
"id": "<string>",
"type": "PROVIDER",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
}
}
],
"isPaymentPlan": true,
"isInsurancePayment": true,
"firstName": "<string>",
"lastName": "<string>",
"patientId": "<string>",
"externalPatientId": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"comment": "<string>",
"paymentMethod": {
"id": "<string>",
"patientId": "<string>",
"rainforestPaymentMethodId": "<string>",
"brand": "<string>",
"last4": "<string>",
"expMonth": 123,
"expYear": 123,
"accountHolderType": "<string>",
"accountNumberLast4": 123,
"bankName": "<string>",
"routingNumber": 123,
"description": "<string>",
"type": "CARD",
"isDefault": false,
"isArchived": false
},
"creator": {
"id": "<string>",
"type": "PROVIDER",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"items": [
{
"itemName": "<string>",
"quantity": 123,
"pricePerItem": 123,
"description": "<string>",
"chargeId": "<string>",
"discountReason": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"unit": "<string>",
"itemType": "<string>"
}
],
"locationId": "<string>"
}
],
"total": 123
},
"hasInsurancePayments": true
}This endpoint aggregates patient payments and insurance payments into a single table, then filters them according to the PaymentFetchParams. Using DISTINCT on JSON requires either casting them to JSONB (with an equality operator) or removing DISTINCT. Here, we cast to JSONB so that Postgres can do equality checks on the JSON objects.
curl --request GET \
--url https://api.decodahealth.com/billing/payment/table \
--header 'API-KEY: <api-key>' \
--header 'TENANT: <tenant>'{
"items": {
"data": [
{
"id": "<string>",
"amount": 123,
"currency": "<string>",
"status": "<string>",
"paymentMedium": "<string>",
"fee": 123,
"feeToPatient": 123,
"createdDate": "2023-11-07T05:31:56Z",
"refunds": [
{
"id": "<string>",
"amount": 123,
"reason": "DUPLICATE",
"createdDate": "2023-11-07T05:31:56Z",
"description": "<string>",
"creator": {
"id": "<string>",
"type": "PROVIDER",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
}
}
],
"isPaymentPlan": true,
"isInsurancePayment": true,
"firstName": "<string>",
"lastName": "<string>",
"patientId": "<string>",
"externalPatientId": "<string>",
"email": "<string>",
"phoneNumber": "<string>",
"comment": "<string>",
"paymentMethod": {
"id": "<string>",
"patientId": "<string>",
"rainforestPaymentMethodId": "<string>",
"brand": "<string>",
"last4": "<string>",
"expMonth": 123,
"expYear": 123,
"accountHolderType": "<string>",
"accountNumberLast4": 123,
"bankName": "<string>",
"routingNumber": 123,
"description": "<string>",
"type": "CARD",
"isDefault": false,
"isArchived": false
},
"creator": {
"id": "<string>",
"type": "PROVIDER",
"firstName": "<string>",
"lastName": "<string>",
"phoneNumber": "<string>",
"email": "<string>",
"locationId": "<string>"
},
"items": [
{
"itemName": "<string>",
"quantity": 123,
"pricePerItem": 123,
"description": "<string>",
"chargeId": "<string>",
"discountReason": "<string>",
"discountAmount": 123,
"discountPercentage": 123,
"unit": "<string>",
"itemType": "<string>"
}
],
"locationId": "<string>"
}
],
"total": 123
},
"hasInsurancePayments": true
}The tenant you are making this request on behalf of
Your api key
asc, desc CANCELED, CREATED, FAILED, IN_REVIEW, PRESENTING, PROCESSING, SUCCEEDED Successful Response
Show child attributes
Show child attributes
Show child attributes
DUPLICATE, DISPUTE, BOOKING_FEE, OTHER Show child attributes
The unique identifier for the user.
The type of user.
PROVIDER, PATIENT, ASSISTANT The user's first name.
The user's last name.
The user's phone number.
The user's email address.
The location of the user.
Show child attributes
CARD, ACH, APPLE_PAY Show child attributes
The unique identifier for the user.
The type of user.
PROVIDER, PATIENT, ASSISTANT The user's first name.
The user's last name.
The user's phone number.
The user's email address.
The location of the user.
List of items with their quantities and prices
Show child attributes