> ## 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 issue invoices, credit notes, and payment receipts from Spacebring, map invoice items to Moloni products and tax rates, understand the key prerequisites, and how the integration works

Sync issued invoices, credit notes, and invoice payments from Spacebring to Moloni to cut manual accounting work. Moloni issues them as they sync, so there are no drafts to 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 receipts and one for credit notes, and communicate each to the Portuguese tax authority (AT) for those document types.
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. Set up the same [tax rates](https://www.spacebring.com/docs/billing/taxes.md) in Moloni as in Spacebring. For a 0% rate, create the Moloni tax with **Tax Type** set to **Other**, since Moloni doesn't accept a 0% tax of the **Added Value** type.
6. If you invoice items without VAT, set a VAT exemption reason on the Moloni products you use for them. That covers items with no tax rate, a 0% rate, or a Moloni tax that isn't VAT.

## Connect the Moloni integration

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

![Location menu open in the left panel with Integrations highlighted on Spacebring's coworking space management platform](https://mintcdn.com/spacebring/EoXqL0krIeX5lJ8K/images/integrations-connect-a-location-level-integration.png?fit=max\&auto=format\&n=EoXqL0krIeX5lJ8K\&q=85\&s=59910549be2afb079049dadf53f7e2b9)

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, 0% included.
   * Invoices with a tax rate that has no Moloni tax selected don't sync.
   * 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, credit notes, and invoice payments to Moloni in real time, and Moloni issues them. Moloni numbers each document in its series and communicates it to the Portuguese tax authority (AT) if your Moloni company does that automatically.

> [!NOTE]
>
> Voiding an invoice in Spacebring doesn't sync to Moloni. To correct an invoice, issue a [credit note](https://www.spacebring.com/docs/billing/invoices/credit-notes.md) in Spacebring, which syncs to Moloni.

To sync an invoice issued before you connected Moloni, or one that failed to sync, open it and click **Sync to Moloni** in the **(...)** menu. To sync several, select their checkboxes on the **Billing** > **Invoices** page, then press **Actions** > **Sync to Moloni**. The sync covers the invoice, its payment, and its credit notes, and skips what Moloni already has. Moloni won't issue a document dated before the last document in its series, so give older invoices a series of their own.

### 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 no tax rate sync without tax. Items without VAT sync with the VAT exemption reason of their Moloni product |
| Invoice item type | The Moloni product you selected for it |
| Invoice status | ✗ — always issued, 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/q904nSZNVaHnau5m/images/integrations-accounting-moloni-how-invoices-sync-1.png?fit=max\&auto=format\&n=q904nSZNVaHnau5m\&q=85\&s=2d60d1de6c86b469e7b407f6ebaf7021)

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

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

### How credit notes sync

Spacebring syncs a credit note issued for an unpaid invoice as an issued 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 issued in Moloni, since Moloni can't credit a draft. Otherwise the credit note fails to sync. Once you close the invoice in Moloni, open it in Spacebring and click **Sync to Moloni**.
* Each credited item has a line with the same name on the Moloni invoice.

Moloni has no line for an amount without a quantity, so a credit note for part of an item's amount syncs as a part of the item's quantity at the invoice price. A €40 credit on a €100 item syncs as a quantity of 0.4.

### How invoice payments sync

When an invoice is paid in Spacebring, Moloni issues a receipt in the **Invoice series** for the amount left to pay on the Moloni invoice after its credit notes, and marks the invoice as paid.

| **Data in Spacebring** | **Moloni** |
| - | - |
| Payment date | Receipt date and payment date |
| Paid amount | Receipt total, reconciled with the invoice |
| Payment method | The Moloni payment method with the same name as the payment gateway, such as Stripe, or as the **Paid with** option of an external payment. Otherwise your Moloni default |

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

> [!NOTE]
>
> When Moloni rejects an invoice, credit note, or payment, 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

> [accordion] 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 on their own, so sync them with **Sync to Moloni** once it is.

> [accordion] Why did an invoice fail to sync to Moloni?
>
> The notification names the cause. A failed invoice doesn't sync again on its own, so fix the cause, then open the invoice and click **Sync to Moloni**. 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**.
> * An invoice item has no VAT, and its Moloni product has no VAT exemption reason. Set one on the product in Moloni.

> [accordion] Why is an invoice still a draft in Moloni?
>
> Spacebring skips an invoice Moloni already has, including a draft, for example one synced before Spacebring issued invoices in Moloni. Close the draft in Moloni yourself.

> [accordion] 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.

> [accordion] 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.