Skip to main content
This guide walks through the end-to-end flow of sending an invoice via the Dolfin API. You’ll create a customer, create a product, create an invoice, and send it.

Prerequisites

  • A Dolfin API key
  • An organisation already provisioned (see Client Integration)
  • A valid session token or API key for authentication
All requests below require the x-dolfin-api-key and x-dolfin-organisation-id headers. See Authentication for details.

Overview

1

Create a customer

Add the customer who will receive the invoice.
2

Create a product

Define the product or service you’re billing for.
3

Create an invoice

Build a draft invoice with line items referencing the customer and product.
4

Send the invoice

Mark the invoice as sent and deliver it to the customer.

Step 1: Create a Customer

Response:
Save the customer id - you’ll need it when creating the invoice.

Step 2: Create a Product

Response:
Save the product id - you’ll reference it in the invoice line items. The type field accepts Product or Service.

Step 3: Create an Invoice

Create a draft invoice that ties together the customer and product. The lineItems array references the product by its id.
Response:
The invoice is created in Draft status. You can add a taxRateId to each line item if you need to apply tax.

Step 4: Send the Invoice

Send the draft invoice to the customer. This marks it as sent and delivers it, this will also set the issue date of the invoice.
Response:
The invoice status changes from Draft to Sent.

Summary

Next Steps

API Reference

Explore the full API reference for all endpoints.

Client Integration

Set up organisation provisioning and user authentication.