Other Documents
Same patterns as invoices. Create, finalize, render, send.
Estimates
Quotes or proposals before invoicing.
// title: Create estimate
const estimate = await sdk.estimates.create({
customer: { name: "Potential Client", email: "client@example.com" },
items: [
{ name: "Web Design", quantity: 1, price: 3000 },
{ name: "Development", quantity: 40, price: 100 },
],
valid_until: "2024-12-31",
});Credit Notes
Refunds or corrections.
// title: Create credit note
const creditNote = await sdk.creditNotes.create({
customer: { name: "Acme Corp" },
items: [{ name: "Refund - Duplicate charge", quantity: 1, price: 100 }],
related_document_id: invoice.id,
});Advance Invoices
Deposits or prepayments.
// title: Create advance invoice
const advance = await sdk.advanceInvoices.create({
customer: { name: "Acme Corp", email: "billing@acme.com" },
items: [{ name: "Project deposit (50%)", quantity: 1, price: 5000 }],
});