Create invoice
ghl_create_invoiceCreate a draft invoice for a contact. Specify line items, and details auto-fill from the contact record. Set due dates, currency, and terms; send it later.
Instructions
Create a draft invoice for a contact. Provide line items (name, qty, price). Business details are taken from GHL_BUSINESS_* env vars (or businessName/businessPhone overrides); contact details (name, phone, email, address) are auto-filled from the contact record. The invoice is created in draft status; use ghl_send_invoice to deliver it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Invoice name/title. | |
| items | Yes | Line items on the invoice. | |
| title | No | Display title. Defaults to your invoice-settings title (e.g. INVOICE). | |
| dueDate | No | Due date as YYYY-MM-DD. Defaults to the issue date. | |
| currency | No | ISO currency code, e.g. USD. | USD |
| contactId | Yes | Contact the invoice is billed to. | |
| issueDate | No | Issue date as YYYY-MM-DD. Defaults to today. | |
| locationId | No | GHL Location (sub-account) ID. Defaults to GHL_LOCATION_ID. | |
| termsNotes | No | Terms & notes. Defaults to your saved invoice terms & notes. | |
| contactName | No | ||
| businessName | No | ||
| contactEmail | No | ||
| contactPhone | No | ||
| applyDefaults | No | Apply your saved GHL invoice settings (logo, business info, terms & notes, title, due-after-days) like the UI does. Set false for a bare invoice. | |
| businessPhone | No | ||
| businessAddress | No | ||
| businessLogoUrl | No | ||
| businessWebsite | No |