Moneybird logo
API Integration guide

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

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.

TerminalCode
curl -X POST "https://moneybird.com/api/v2/{ADMINISTRATION_ID}/contacts.json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer {ACCESS_TOKEN}" \ -d '{ "contact": { "company_name": "TechStart Inc.", "firstname": "John", "lastname": "Smith", "address1": "123 Business St", "zipcode": "1234 AB", "city": "Amsterdam", "country": "NL", "email": "john@techstart.com", "customer_id": "external_id_12345" } }'

Find existing contact by external customer ID:

TerminalCode
curl -X GET "https://moneybird.com/api/v2/{ADMINISTRATION_ID}/contacts/customer_id/external_id_12345.json" \ -H "Authorization: Bearer {ACCESS_TOKEN}"

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.

TerminalCode
curl -X POST "https://moneybird.com/api/v2/{ADMINISTRATION_ID}/sales_invoices.json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer {ACCESS_TOKEN}" \ -d '{ "sales_invoice": { "contact_id": "{CONTACT_ID}", "reference": "INV-2025-001", "invoice_date": "2025-09-16", "due_date": "2025-10-16", "currency": "EUR", "details_attributes": [ { "description": "Premium Software License", "price": "299.00", "amount": "1", "tax_rate_id": "{TAX_RATE_ID}", "ledger_account_id": "{LEDGER_ACCOUNT_ID}" }, { "description": "Setup Fee", "price": "50.00", "amount": "1", "tax_rate_id": "{TAX_RATE_ID}", "ledger_account_id": "{LEDGER_ACCOUNT_ID}" } ] } }'

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.

TerminalCode
curl -X PATCH "https://moneybird.com/api/v2/{ADMINISTRATION_ID}/sales_invoices/{SALES_INVOICE_ID}/send_invoice.json" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer {ACCESS_TOKEN}" \ -d '{ "sales_invoice_sending": { "delivery_method": "Email", "deliver_ubl": true, "email_address": "john@techstart.com", "email_message": "Dear John, please find your invoice attached. Thank you for your business!" } }'

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:

  1. Track payment status with Webhooks or retrieve through the API for reconciliation when payments are received
  2. Set up webhooks for real-time notifications about payment status changes
Last modified on