Invoices
Retrieving Invoices
You may easily retrieve an array of a billable model's invoices using the invoices
method. The invoices
method returns a collection of Shopkeeper's Invoice
instances:
If you would like to include pending invoices in the results, you may use the invoicesIncludingPending
method:
You may use the findInvoice
method to retrieve a specific invoice by its ID:
Displaying Invoice Information
When listing the invoices for the customer, you may use the invoice's methods to display the relevant invoice information. For example, you may wish to list every invoice in a table, allowing the user to easily download any of them:
Upcoming Invoices
To retrieve the upcoming invoice for a customer, you may use the upcomingInvoice
method:
Similarly, if the customer has multiple subscriptions, you can also retrieve the upcoming invoice for a specific subscription:
Previewing subscription Invoices
Using the previewInvoice
method, you can preview an invoice before making price changes. This will allow you to determine what your customer's invoice will look like when a given price change is made:
You may pass an array of prices to the previewInvoice
method in order to preview invoices with multiple new prices:
Generating Invoice PDFs
This feature is not developed yet.