WHMCS · Schema
WHMCS Invoice
A WHMCS invoice for billing a client for hosting services.
Web HostingBilling AutomationClient ManagementDomain ManagementSupport TicketsProvisioning
Properties
| Name | Type | Description |
|---|---|---|
| id | integer | Unique invoice identifier. |
| invoicenum | string | Human-readable invoice number. |
| userid | integer | Client user ID associated with this invoice. |
| date | string | Invoice issue date. |
| duedate | string | Invoice payment due date. |
| datepaid | string | Date invoice was paid. |
| status | string | Current invoice status. |
| paymentmethod | string | Payment method module name. |
| subtotal | number | Invoice subtotal before tax. |
| tax | number | Tax amount applied. |
| tax2 | number | Secondary tax amount applied. |
| credit | number | Credit applied to the invoice. |
| total | number | Total invoice amount. |
| balance | number | Remaining balance due. |
| items | array | Line items on the invoice. |
JSON Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/api-evangelist/whmcs/main/json-schema/whmcs-invoice-schema.json",
"title": "WHMCS Invoice",
"description": "A WHMCS invoice for billing a client for hosting services.",
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique invoice identifier."
},
"invoicenum": {
"type": "string",
"description": "Human-readable invoice number."
},
"userid": {
"type": "integer",
"description": "Client user ID associated with this invoice."
},
"date": {
"type": "string",
"format": "date",
"description": "Invoice issue date."
},
"duedate": {
"type": "string",
"format": "date",
"description": "Invoice payment due date."
},
"datepaid": {
"type": "string",
"format": "date",
"description": "Date invoice was paid."
},
"status": {
"type": "string",
"enum": ["Unpaid", "Paid", "Cancelled", "Refunded", "Collections", "Draft"],
"description": "Current invoice status."
},
"paymentmethod": {
"type": "string",
"description": "Payment method module name."
},
"subtotal": {
"type": "number",
"format": "float",
"description": "Invoice subtotal before tax."
},
"tax": {
"type": "number",
"format": "float",
"description": "Tax amount applied."
},
"tax2": {
"type": "number",
"format": "float",
"description": "Secondary tax amount applied."
},
"credit": {
"type": "number",
"format": "float",
"description": "Credit applied to the invoice."
},
"total": {
"type": "number",
"format": "float",
"description": "Total invoice amount."
},
"balance": {
"type": "number",
"format": "float",
"description": "Remaining balance due."
},
"items": {
"type": "array",
"description": "Line items on the invoice.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Line item ID."
},
"type": {
"type": "string",
"description": "Type of line item (Hosting, Domain, etc.)."
},
"description": {
"type": "string",
"description": "Line item description."
},
"amount": {
"type": "number",
"format": "float",
"description": "Line item amount."
},
"taxed": {
"type": "integer",
"enum": [0, 1],
"description": "Whether this item is taxed."
}
}
}
}
},
"required": ["id", "userid", "status", "total"],
"additionalProperties": true
}