{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/InvoiceRequest", "title": "InvoiceRequest", "type": "object", "description": "Request body for creating an invoice for an order.", "properties": { "capture": { "type": "boolean", "description": "Whether to immediately capture payment when creating the invoice." }, "items": { "type": "array", "description": "Order items and quantities to include in the invoice. Omit to invoice all items.", "items": { "type": "object", "properties": { "order_item_id": { "type": "integer", "description": "Numeric order item entity ID." }, "qty": { "type": "number", "description": "Quantity to invoice for this item." } } } }, "comment": { "type": "object", "description": "Optional comment to attach to the invoice.", "properties": { "comment": { "type": "string", "description": "Comment text." }, "is_customer_notified": { "type": "integer", "description": "Whether to email the comment to the customer.", "enum": [ 0, 1 ] } } } } }