create_invoice
Create invoices for subscription billing by providing line items, due date, and period dates. Specify customer, currency, gateway, and payment method.
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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"companyCurrencyId": "<companyCurrencyId>",
"companyGatewayId": "<companyGatewayId>",
"customerId": "<customerId>",
"paymentMethodId": "<paymentMethodId>",
"dateDue": "<dateDue>",
"dateFrom": "<dateFrom>",
"dateTo": "<dateTo>",
"detail": "<detail>"
},
"name": "create_invoice"
}
}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) |