Invoice
Invoices can be used to collect payments from patients. Invoices can be directly sent to the patient's email for a patient to complete or can be automatically collected if the patient's billing information is on file.
The invoice model
- Name
id
- Type
- string
- Description
Unique identifier for the invoice.
- Name
object
- Type
- string
- Description
Always 'invoice'.
- Name
name
- Type
- string
- Description
Name of the invoice
- Name
patient
- Type
- string
- Description
Patient invoice is associated with.
- Name
product
- Type
- string
- Description
Product this invoice is for.
- Name
collection_method
- Type
- string
- Description
charge_automatically
Possible values:- Name
comments
- Type
- array of strings
- Description
Comments on this invoice.
- Name
reviews
- Type
- array of objects
- Description
- Review history of the invoice.
- Name
status_history
- Type
- array of objects
- Description
- Status history of the invoice.
- Name
created_by
- Type
- string
- Description
Creator of the invoice.
- Name
created_at
- Type
- number
- Description
Timestamp (in ISO 8601 format) of when the invoice was created.
- Name
last_updated_at
- Type
- number
- Description
Timestamp (in ISO 8601 format) of when this invoice was last updated.
Response
{
"id": "invc_LNIRgmClsk0Oq6yMz6nQ",
"object": "invoice",
"name": "Physical Health Checkup — May 30, 2023",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"product": "prdt_5SR7xXuPb45mtLZUKHtf",
"collectionMethod": "sendInvoice",
"comments": [
"cmmt_18Efdm5UBJduDbioH1kp"
],
"reviews": [
{
"status": "needs_review",
"requested_by": "user_idjkvxZTqfJD734feQHa",
"reviewer": "user_QtD0YaeDw4VyS9UPBpX4",
"requested_at": 1684220332000,
"review_deadline": 1686220332000,
"reviewed_at": 1684220992000
}
],
"status_history": [
{
"status": "in_progress",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1653798303000
},
{
"status": "sent",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1684220992000
}
],
"created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Create an invoice
Creates a new invoice.
Required attributes
- Name
name
- Type
- string
- Description
Name of the invoice
- Name
patient
- Type
- string
- Description
Patient invoice is associated with.
- Name
product
- Type
- string
- Description
Product this invoice is for.
- Name
collection_method
- Type
- string
- Description
Collection method for invoice. Can only use 'chargeAutomatically' if patient has billing information on file.
chargeAutomatically
sendInvoice
Possible values:- Name
created_by
- Type
- string
- Description
Creator of the invoice.
Optional attributes
- Name
status
- Type
- string
- Description
Status of the invoice. Defaults to 'in_progress'.
in_progress
sent
paid
uncollectible
void
Possible values:- Name
comments
- Type
- array of strings
- Description
Comments on this invoice.
- Name
reviews
- Type
- array of objects
- Description
- Review history of the invoice.
Response
{
"id": "invc_LNIRgmClsk0Oq6yMz6nQ",
"object": "invoice",
"name": "Physical Health Checkup — May 30, 2023",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"product": "prdt_5SR7xXuPb45mtLZUKHtf",
"collectionMethod": "sendInvoice",
"comments": [
"cmmt_18Efdm5UBJduDbioH1kp"
],
"reviews": [
{
"status": "needs_review",
"requested_by": "user_idjkvxZTqfJD734feQHa",
"reviewer": "user_QtD0YaeDw4VyS9UPBpX4",
"requested_at": 1684220332000,
"review_deadline": 1686220332000,
"reviewed_at": 1684220992000
}
],
"status_history": [
{
"status": "in_progress",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1653798303000
},
{
"status": "sent",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1684220992000
}
],
"created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Retrieve an invoice
Retrieves the specified invoice.
Response
{
"id": "invc_LNIRgmClsk0Oq6yMz6nQ",
"object": "invoice",
"name": "Physical Health Checkup — May 30, 2023",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"product": "prdt_5SR7xXuPb45mtLZUKHtf",
"collectionMethod": "sendInvoice",
"comments": [
"cmmt_18Efdm5UBJduDbioH1kp"
],
"reviews": [
{
"status": "needs_review",
"requested_by": "user_idjkvxZTqfJD734feQHa",
"reviewer": "user_QtD0YaeDw4VyS9UPBpX4",
"requested_at": 1684220332000,
"review_deadline": 1686220332000,
"reviewed_at": 1684220992000
}
],
"status_history": [
{
"status": "in_progress",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1653798303000
},
{
"status": "sent",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1684220992000
}
],
"created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
Update an invoice
Updates the specified invoice object by setting the values of the parameters passed. Any other parameters not provided will not be modified. The invoice can only be updated if it's in the 'in_progress' status. If the invoice is in status 'sent', it's status can be updated to 'uncollectible' or 'void', no other parameters are updateably.
Required attributes
- Name
updated_by
- Type
- string
- Description
Updates to the invoice made by.
Optional attributes
- Name
name
- Type
- string
- Description
Name of the invoice
- Name
patient
- Type
- string
- Description
Patient invoice is associated with.
- Name
product
- Type
- string
- Description
Product this invoice is for.
- Name
collection_method
- Type
- string
- Description
Collection method for invoice. Can only use 'chargeAutomatically' if patient has billing information on file.
chargeAutomatically
sendInvoice
Possible values:- Name
status
- Type
- string
- Description
Status of the invoice.
in_progress
sent
paid
uncollectible
void
Possible values:- Name
comments
- Type
- array of strings
- Description
Comments on this invoice.
- Name
reviews
- Type
- array of objects
- Description
- Review history of the invoice.
Response
{
"id": "invc_LNIRgmClsk0Oq6yMz6nQ",
"object": "invoice",
"name": "Physical Health Checkup — May 30, 2023",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"product": "prdt_5SR7xXuPb45mtLZUKHtf",
"collectionMethod": "sendInvoice",
"comments": [
"cmmt_18Efdm5UBJduDbioH1kp"
],
"reviews": [
{
"status": "needs_review",
"requested_by": "user_idjkvxZTqfJD734feQHa",
"reviewer": "user_QtD0YaeDw4VyS9UPBpX4",
"requested_at": 1684220332000,
"review_deadline": 1686220332000,
"reviewed_at": 1684220992000
}
],
"status_history": [
{
"status": "in_progress",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1653798303000
},
{
"status": "sent",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1684220992000
}
{
"status": "paid",
"changed_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"changed_at": 1714220992000
}
],
"created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
}
List all invoices
Returns a list of all invoices.
Response
{
"object": "list",
"data": [
{
"id": "invc_LNIRgmClsk0Oq6yMz6nQ",
"object": "invoice",
"name": "Physical Health Checkup — May 30, 2023",
"patient": "user_Z1zXZKvqrpwxbznuW6lJ",
"product": "prdt_5SR7xXuPb45mtLZUKHtf",
"collectionMethod": "sendInvoice",
"comments": [
"cmmt_18Efdm5UBJduDbioH1kp"
],
"reviews": [
{
"status": "needs_review",
"requested_by": "user_idjkvxZTqfJD734feQHa",
"reviewer": "user_QtD0YaeDw4VyS9UPBpX4",
"requested_at": 1684220332000,
"review_deadline": 1686220332000,
"reviewed_at": 1684220992000
}
],
"status_history": [
{
"status": "in_progress",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1653798303000
},
{
"status": "sent",
"changed_by": "user_idjkvxZTqfJD734feQHa",
"changed_at": 1684220992000
}
],
"created_by": "user_Z1zXZKvqrpwxbznuW6lJ",
"created_at": 1653798303000,
"last_updated_at": 1653798303000
},
]
}
Delete a invoice
Deletes the specified invoice. An invoice can only be deleted if it's in the 'in_progress' status.
Required attributes
Optional attributes
Response
{
"id": "med_2UxtAULYUrX7GVsTKePy",
"object": "invoice",
"delete": true
}