Invoices
Create a new invoice
Create a draft invoice with line items. The total amount is automatically calculated from the items.
post/api/invoices
Request body
Example request
{
"items": [
{
"description": "Premium Monthly Plan",
"quantity": 1,
"unitAmount": 9999.99
}
],
"dueDate": "2025-02-15"
}Response
Invoice created in draft status
Example response
{
"id": "clx1234567890",
"invoiceNumber": "INV-2026-0001",
"customerId": "clxcust123",
"amount": "99.9900",
"currency": "USD",
"status": "DRAFT",
"pdfUrl": "/uploads/invoices/inv-123.pdf",
"customer": {
"id": "clx1234567890",
"name": "Jane Doe",
"email": "jane@example.com"
}
}