create_invoice
Generate invoices for subscription billing with required details like customer ID, payment method, line items, and due dates. Supports optional billing/shipping addresses and terms.
Instructions
Create an invoice. POST /invoices. Required: companyCurrencyId, companyGatewayId, customerId, paymentMethodId, detail (array, at least one line item), dateDue, dateFrom, dateTo. Optional: billingAddress, shippingAddress (when provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2), type residential|commercial), customerEmail (max 45), customerName (max 45), customerPhone (max 45), paymentType (offlinePaymentProvider|thirdPartyPaymentProvider|walletPaymentProvider|otherPayment), shippingAmount (CENTS), terms (max 200), comments (max 200). Detail: amount can be '41.00' (dollars) or 4100 (cents). Tool always sends cents to publicAPI.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyCurrencyId | Yes | Company currency ID (required) | |
| companyGatewayId | Yes | Company gateway ID (required) | |
| detail | Yes | Line items (required, at least one). Each: amount as '41.00' (dollars) or 4100 (cents). Tool always sends cents to publicAPI. description (max 255), qty | |
| customerId | Yes | Customer ID (required) | |
| customerEmail | No | Customer email (max 45) | |
| customerName | No | Customer name (max 45) | |
| customerPhone | No | Customer phone (max 45) | |
| paymentMethodId | Yes | Payment method ID (required) | |
| customerPaymentMethodId | No | Customer payment method ID | |
| paymentType | No | offlinePaymentProvider, thirdPartyPaymentProvider, walletPaymentProvider, or otherPayment | |
| dateDue | Yes | Due date (valid date). Required. | |
| dateFrom | Yes | Period from (valid date). Required. | |
| dateTo | Yes | Period to (valid date). Required. | |
| billingAddress | No | Optional. If provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2 country code, e.g. ES, AR, MX), type (residential|commercial) | |
| shippingAddress | No | Optional. Same shape as billingAddress | |
| shippingAmount | No | Shipping amount in CENTS | |
| terms | No | Terms (max 200) | |
| comments | No | Comments (max 200) |