update_invoice
Modify existing invoices with status 'posted' or 'requestPayment' by updating customer details, payment information, shipping, line items, and due dates.
Instructions
Update an invoice. PUT /invoices/{invoiceId}. Only invoices with status 'posted' or 'requestPayment' can be updated. All body fields optional. Accepted: companyGatewayId, customerId, customerEmail, customerName, customerPhone (max 45), customerPaymentMethodId, dateDue, dateFrom, dateTo, comments, paymentType (offlinePaymentProvider|thirdPartyPaymentProvider|walletPaymentProvider), paymentMethodId, shippingAddress (when provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2), type residential|commercial), shippingAmount (cents), shippingServiceId, detail (line items: amount as '41.00' dollars or 4100 cents; tool sends cents). Note: billingAddress is not accepted on update. Invoice must have customer and customerPaymentMethod set to avoid server error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoiceId | Yes | Invoice ID (required) | |
| companyGatewayId | No | Company gateway ID | |
| customerId | No | Customer ID | |
| customerEmail | No | Customer email (max 45) | |
| customerName | No | Customer name (max 45) | |
| customerPhone | No | Customer phone (max 45) | |
| customerPaymentMethodId | No | Customer payment method ID | |
| dateDue | No | Due date (valid date) | |
| dateFrom | No | Period from (valid date) | |
| dateTo | No | Period to (valid date) | |
| comments | No | Comments | |
| paymentType | No | offlinePaymentProvider, thirdPartyPaymentProvider, or walletPaymentProvider | |
| paymentMethodId | No | Payment method ID | |
| shippingAddress | No | When provided: contactName, street1, city, zip, countryCode (ISO 3166-1 alpha-2 country code, e.g. ES, AR, MX), type (residential|commercial) | |
| shippingAmount | No | Shipping amount in CENTS | |
| shippingServiceId | No | Shipping service ID | |
| detail | No | Line items: each { amount: '41.00' (dollars) or 4100 (cents), description?, qty? } |