> ## Documentation Index
> Fetch the complete documentation index at: https://www.spacebring.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Moloni

> Connect Moloni to automatically sync issued invoices and credit notes from Spacebring as drafts, map invoice items to Moloni products and tax rates, understand the key prerequisites, and how the integration works

Sync issued invoices and credit notes from Spacebring to Moloni to cut manual accounting work. They land in Moloni as drafts, ready for you to review and close. The integration works with Moloni companies at [moloni.pt](https://www.moloni.pt) that invoice in EUR.

> [!NOTE]
>
> Moloni is a distinct company not affiliated with Spacebring. For any inquiries regarding Moloni's solutions, services, or pricing, reach out to Moloni directly. We do not have the authority to provide information or support on behalf of Moloni.

## Prerequisites

1. Have your Moloni account ready, with access to the company you want to connect.
2. Make sure you invoice in EUR. Invoices and credit notes in any other currency don't sync.
3. In Moloni, set up a document series for invoices and one for credit notes, and communicate each to the Portuguese tax authority (AT) for that document type.
4. Create the products in Moloni that Spacebring should use for invoice items. You can use the same product for several invoice item types.
5. To sync tax, set up the same [tax rates](/docs/billing/taxes.md) in Moloni as in Spacebring.

## Connect the Moloni integration

1. Click the menu **(...)** next to the location's name > go to **Integrations**.

![The location menu open on the Integrations item on Spacebring's coworking space management platform](https://mintcdn.com/spacebring/NXOhFSPltwhOqCNG/images/integrations-accounting-xero-2.png?fit=max\&auto=format\&n=NXOhFSPltwhOqCNG\&q=85\&s=95b376214adea69ff27e92d05b96c8c5)

2. Open the **Moloni** integration page and click **Connect**.

![The Moloni integration page with the Connect button on Spacebring's coworking space management platform](https://mintcdn.com/spacebring/VTAQJ8UdD8iSI0jt/images/integrations-accounting-moloni-connect-the-moloni-integration-moloni-page.png?fit=max\&auto=format\&n=VTAQJ8UdD8iSI0jt\&q=85\&s=1ea8d2297f19b257e343b95022c7178a)

3. Log in to Moloni and authorize Spacebring. You return to the Moloni integration page in Spacebring.
4. **Company** — select the Moloni company to sync to, if it isn't selected already.
   * Changing the company later clears the series, tax rates, and products you selected.
5. **Invoice series** — select the Moloni series for numbering synced invoices.
6. **Credit note series** — select the Moloni series for numbering synced credit notes. Credit notes don't sync without it.
7. **Tax rates for invoice item sync** — select the Moloni tax for each tax rate you charge in Spacebring.
   * Leave it empty to sync documents without tax and set the tax in Moloni before closing them.
   * You can't select two Moloni taxes with the same percentage.
8. **Products for invoice item sync** — for each invoice item type, select the Moloni product that Spacebring should use: **Bookings**, **Event tickets**, **Shop products**, **Packages**, **Subscription items**, and **Custom**.

> [!WARNING]
>
> Select a product for **all** invoice item types, even the ones you don't sell. The connection stays incomplete and invoices don't sync until you select a company, an invoice series, and a product for every type.

![The connected Moloni integration page with a company, series, tax rates, and a Moloni product selected for every invoice item type on Spacebring's coworking space management platform](https://mintcdn.com/spacebring/VTAQJ8UdD8iSI0jt/images/integrations-accounting-moloni-connect-the-moloni-integration-products-for-invoice-item-sync.png?fit=max\&auto=format\&n=VTAQJ8UdD8iSI0jt\&q=85\&s=fd478d7b78b5d6a0a353fa0bd81cf815)

## How Moloni integration works

Once connected, Spacebring syncs newly issued invoices to Moloni in real time as drafts. Credit notes for unpaid invoices sync as drafts once you have closed the invoice in Moloni.

> [!WARNING]
>
> Spacebring only creates drafts in Moloni. It doesn't close them or register payments, even after the invoice is paid in Spacebring. Review and close each document in Moloni yourself, and register its payment there.

> [!NOTE]
>
> Voiding an invoice in Spacebring doesn't sync to Moloni. To correct an invoice, issue a [credit note](/docs/billing/invoices/credit-notes.md) in Spacebring, which syncs once the invoice is closed in Moloni.

### How invoices sync

The integration maps Spacebring invoice data to Moloni as follows:

| **Data in Spacebring** | **Data in Moloni** |
| - | - |
| Customer legal business name (or name) and tax ID | Spacebring matches an existing Moloni customer by VAT number, using the customer's tax ID. If there is no match, it creates a customer with that name, address, email, and VAT number, and reuses it for later invoices |
| Customer country | ✓ on the customer Spacebring creates — Portugal when the customer has no country |
| Customer email | ✓ on the customer Spacebring creates |
| Currency | ✗ — only invoices in EUR sync |
| Issue date | Date |
| Due date | Expiration date, or the issue date when the invoice has no due date |
| Invoice number | Our reference |
| Invoice item name | ✓ |
| Invoice item quantity | ✓ |
| Invoice item price | ✓ excluding tax, since Moloni adds the tax on top — also when your location's prices include tax |
| Invoice item discount | ✓ as a percentage |
| Tax | The Moloni tax you selected for the item's tax rate. Items with a 0% rate sync without tax, and so does every item when you haven't selected any tax rates |
| Invoice item type | The Moloni product you selected for it |
| Invoice status | ✗ — always created as a draft, regardless of the invoice's status in Spacebring |
| Invoice PDF | ✗ — Moloni generates its own invoice PDF |

An issued invoice in Spacebring:

![An issued invoice in EUR with two items at different VAT rates on Spacebring's coworking space management platform](https://mintcdn.com/spacebring/VTAQJ8UdD8iSI0jt/images/integrations-accounting-moloni-how-invoices-sync-1.png?fit=max\&auto=format\&n=VTAQJ8UdD8iSI0jt\&q=85\&s=567b31f550fddecb5f50465bac755c1a)

The same invoice in Moloni, created as a draft, with each item synced to the Moloni product and tax you selected for it:

![The draft invoice in Moloni synced from Spacebring's coworking space management platform, with each item's Moloni product and tax](https://mintcdn.com/spacebring/VTAQJ8UdD8iSI0jt/images/integrations-accounting-moloni-how-invoices-sync-2.png?fit=max\&auto=format\&n=VTAQJ8UdD8iSI0jt\&q=85\&s=70b83d3745223d8d0a66f81d6dfa20ab)

### How credit notes sync

Spacebring syncs a credit note issued for an unpaid invoice as a draft credit note in Moloni, linked to the invoice. The credit note syncs only when all conditions hold:

* A **Credit note series** is selected on the **Integrations** > **Moloni** page.
* The invoice is already closed in Moloni, since Moloni can only credit a closed invoice. Otherwise the credit note fails to sync and doesn't retry. Create the credit note in Moloni yourself.
* Each credited item has a line with the same name on the Moloni invoice. Keep the line names when you review the draft invoice in Moloni.

> [!WARNING]
>
> Applied balance, payments, credit notes for paid invoices, and refunds don't sync to Moloni.

> [!NOTE]
>
> When Moloni rejects an invoice or credit note, a setting it needs is missing, or the Moloni authorization has expired, administrators get a notification that names the cause.

## Disconnect the Moloni integration

1. Click the menu **(...)** next to the location's name > go to **Integrations**.
2. Select **Moloni** > press **Disconnect** and confirm your choice.

> [!NOTE]
>
> Disconnecting stops the sync but doesn't revoke Spacebring's access in Moloni. To revoke it, remove Spacebring's authorization in your Moloni account.

## FAQs

> **Why is nothing syncing after I connected Moloni?**
>
> The connection stays incomplete, and nothing syncs, until you select a **Company**, an **Invoice series**, and a product for every invoice item type on the **Integrations** > **Moloni** page. Missing even one product stops invoices syncing, including item types you don't sell. Invoices issued before the setup is complete don't sync afterwards, so create them in Moloni yourself.

> **Why did an invoice fail to sync to Moloni?**
>
> The notification names the cause. A failed invoice doesn't sync again, so fix the cause and create the invoice in Moloni yourself. The most common causes are:
>
> * The invoice isn't in EUR. Only invoices in EUR sync to Moloni.
> * An invoice item uses a tax rate with no Moloni tax selected. Select the Moloni tax for that rate in **Tax rates for invoice item sync**.
> * A Moloni product isn't selected for an invoice item type. Select one in **Products for invoice item sync**.

> **Why can't I find my series in the Invoice series or Credit note series list?**
>
> Each list shows only the Moloni series communicated to the AT for that document type. Communicate the series to the AT in Moloni, then open the **Integrations** > **Moloni** page again.

> **Why does Spacebring say Moloni authorization has expired?**
>
> Moloni no longer accepts Spacebring's access, for example after the authorization was removed in Moloni. Disconnect the Moloni integration and connect it again.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.