Invoicing service
The invoicing service is a plugin for the TMF platform and runs as a Firebase function.
Whenever credits are added to a billing account the invoicing service is triggered and will create an invoice for this transaction.
Currently, we support two invoicing web services: Zoho books
and Moneybird
. Adding other services would be quite simple.
In what follows is a technical description on how to configure the current integrations.
Sending the invoice to the customer by email
The invoice can be emailed to the customer automatically.
To enable this feature, set the deliveryMethod
to email
.
Store invoice urls in transaction details
By default, a url
, a publicUrl
(with a publicUrlSecret
for Moneybird) and a pdfUrl
are stored in the
details of the transaction with key invoice
. To disable this set storeInTransaction
to false. To store with
another key, set storeInTransaction
to that key.
Zoho books
TODO
Moneybird
To configure the invoicing service for Moneybird, add a plugin to the shop (in database at location /shops/{shopId}/plugins/{pluginId}
) with the following content:
{
"type": "invoicing",
"service": "moneybird",
"config": {
"authToken": "see below to generate a token",
"administrationId": "see below to find the administration id",
"deliveryMethod": "either 'email' or 'manual' (default)"
}
}
Create an API token
Go to https://moneybird.com/user/applications
Click Create API token
Select API token for personal usage
Choose a name, e.g. TMF
.
Select the company account and click save
Copy the token.
Get the administration id
Run
curl -s -H "Content-Type: application/json" -H "Authorization: Bearer my-token" -XGET https://moneybird.com/api/v2/administrations.json