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"
}
}Changes
Changed in 1 of the 2 revisions of this API.6
- ○
added the new optional request property
createdAtnew-optional-request-property
- ○
added the new optional request property
currencynew-optional-request-property
- ○
added the new optional request property
invoiceNumbernew-optional-request-property
- ○
added the new optional request property
paidAtnew-optional-request-property
- ○
added the new optional request property
statusnew-optional-request-property
- ○
added the media type
application/jsonfor the response with the status201response-media-type-added
- ○