Creating Sales Invoices
Create and send professional sales invoices directly from your application when orders are placed in your system.
Overview
Sales invoices are the primary billing documents you send to customers for products or services. This integration pattern is ideal when:
- You process payments elsewhere but want Moneybird to handle invoice generation
- You need to create invoices that will be paid later
- You want to maintain professional invoicing while managing orders in your own system
Prerequisites
- You have an access token and your administration ID. See Getting started and Authentication.
- You know the correct
ledger_account_id
andtax_rate_id
for your revenue. See the API reference for Ledger accounts and Tax rates.
Step-by-step
1. Create or Find Contact
Before creating an invoice, ensure you have a contact record in Moneybird. You can either create a new contact or find an existing one.
Create a new contact:
When creating a contact, you can store your external system’s contact ID in the customer_id
field. This makes it easy to look up the contact in Moneybird later using your own identifier.
Code
Find existing contact by external customer ID:
Code
2. Create Sales Invoice
Create a sales invoice with all necessary details. Make sure to set the correct ledger account and tax rate IDs to ensure proper bookkeeping.
Code
3. Send Invoice to Customer
Once the invoice is created, send the invoice to your customer via email or other delivery methods like Peppol. Sending the invoice automatically updates it from draft
to open
.
You can also schedule the invoice to be sent later, or use custom delivery methods.
Code
After sending, the invoice status changes from draft
to open
. Track payment status with Webhooks or retrieve through the API.
Next Steps
After creating and sending sales invoices, you may want to:
- Track payment status with Webhooks or retrieve through the API for reconciliation when payments are received
- Set up webhooks for real-time notifications about payment status changes