# Create an invoice on remote

hostware saves the invoice with all positions in the database. The job of the synchronizer is to create the invoice with the given data on the remote accounting software. hostware also takes care that the admin cannot change the invoice after the creation in the admin panel for accounting purposes.

As declared the page before you need to create an integration handler. In that, you need to implement the create() function which passes the invoice model as first parameter.

To get the customer of the invoice, use $invoice->customer

To get the lineItems of the invoice, use $invoice->lineItems

You should also look for other relations on the invoice which may contain useful data. For specific configuration values, e.g. the api key for remote you can use the ConfigService to retrieve the saved config values.

{% hint style="info" %}
Use the customFields on the invoice and customer model to save data which your module needs, e.g. the contact ID or the invoice ID.
{% endhint %}
