Update an invoice
PATCH
/accounts/{accountID}/invoices/{invoiceID}
Updates an invoice.
To access this endpoint using an access token
you'll need to specify the /accounts/{accountID}/invoices.write scope.
curl -X PATCH "https://api.moov.io/accounts/{accountID}/invoices/{invoiceID}" \
-H "Authorization: Bearer {token}" \
-H "X-Moov-Version: v2026.10.00"mc, _ := moov.NewClient()
var accountID string
var invoiceID string
now := time.Now().UTC()
update := moov.UpdateInvoice{DueDate: moov.Set(now)}
mc.UpdateInvoice(ctx, accountID, invoiceID, update)
The request completed successfully.
{
"invoiceID": "ec7e1848-dc80-4ab0-8827-dd7fc0737b43",
"invoiceNumber": "INV-1001",
"description": "Professional services for Q1 2026",
"customerAccountID": "3dfff852-927d-47e8-822c-2fffc57ff6b9",
"customerDisplayName": "Acme Corp",
"customerEmail": "billing@acmecorp.com",
"partnerAccountID": "5dfff852-927d-47e8-822c-2fffc57ff6b8",
"status": "unpaid",
"lineItems": {
"items": [
{
"name": "Professional Services",
"basePrice": {
"currency": "USD",
"valueDecimal": "1000.00"
},
"quantity": 1
}
]
},
"subtotalAmount": {
"currency": "USD",
"valueDecimal": "1000.00"
},
"totalAmount": {
"currency": "USD",
"valueDecimal": "1080.00"
},
"pendingAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"paidAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"refundedAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"disputedAmount": {
"currency": "USD",
"valueDecimal": "0.00"
},
"paymentLinkCode": "uc7ZYKrMhi",
"paymentLinkURL": "https://moov.link/p/uc7ZYKrMhi",
"createdOn": "2024-05-06T12:20:38.184Z",
"invoiceDate": "2026-01-15T00:00:00Z",
"dueDate": "2026-02-15T00:00:00Z"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The server could not understand the request due to invalid syntax.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request contained missing or expired authentication.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The user is not authorized to make the request.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The requested resource was not found.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request conflicted with the current state of the target resource.
{
"error": "string"
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
{
"description": "string",
"lineItems": {
"items": {
"property1": {
"productID": "string",
"name": "string",
"basePrice": {
"currency": "string",
"valueDecimal": "string"
},
"options": {
"property1": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
},
"property2": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
}
},
"quantity": "string"
},
"property2": {
"productID": "string",
"name": "string",
"basePrice": {
"currency": "string",
"valueDecimal": "string"
},
"options": {
"property1": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
},
"property2": {
"name": "string",
"group": "string",
"priceModifier": {
"currency": "string",
"valueDecimal": "string"
},
"quantity": "string"
}
},
"quantity": "string"
}
}
},
"invoiceDate": "string",
"dueDate": "string",
"status": "string",
"payment": {
"allowedMethods": "string",
"cardDetails": {
"dynamicDescriptor": "string"
},
"achDetails": {
"companyEntryDescription": "string",
"originatingCompanyName": "string"
}
},
"amountDetails": {
"tax": "string",
"surcharge": "string"
}
}Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Request was refused due to rate limiting.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed due to an unexpected error.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
The request failed because a downstream service failed to respond.
Response headers
x-request-id
string
required
A unique identifier used to trace requests.
Headers
X-Moov-Version
string
Set this header to v2026.10.00 to use the API described in this specification.
When omitted, the server defaults to v2024.01.00, the earliest supported version, which may not match the behavior documented here.
An unrecognized well-formed version uses the latest supported version that is not newer than the requested version, when one exists.
For example,
v2026.08.00 uses v2026.07.00.
A malformed value, such as 2022, returns a 404 response.
Possible values:
v2026.10.00
Path parameters
Body
application/json
amountDetails
object
lineItems
object
A collection of line items for an invoice.
Show child attributes
lineItems
items
array<object>
The list of line items.
Show child attributes
lineItems.items[]
options
array<object>
Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
Show child attributes
lineItems.items[].options[]
group
string
<=100 characters
Optional group identifier to categorize related options (e.g., 'toppings').
productID
string
Optional unique identifier associating the line item with a product.
When provided, images associated with the product will be included on the line item.
This does not populate other details of the line item.
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
payment
object
Payment options to update on the invoice.
Payment options to update on an invoice.
Show child attributes
payment
allowedMethods
array<string>
| null
Payment methods the customer can use to pay the invoice. Omit to leave unchanged. Set to null to allow all methods the merchant supports. The request is rejected if a listed method is not supported by the merchant.
Possible values:
apple-pay,
card-payment,
ach-debit-collect,
google-pay
status
string
The status can be updated to one of the following values under specific conditions:
canceled: Can only be set if the current status isdraft,unpaid, oroverdue. Canceling an invoice indicates the invoice is no longer expected to be paid (e.g., the charge was waived or terms changed). Canceled invoices still appear in list results by default and remain part of the invoice history. To completely discard an invoice created by mistake, use the delete endpoint instead.unpaid: Can only be set if the current status isdraft. Setting the status tounpaidfinalizes the invoice and sends an email with a payment link to the customer.
Possible values:
unpaid,
canceled
Response
customerAccountID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
disputedAmount
object
required
Total amount of disputes initiated against transfers paid towards the invoice
invoiceID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
lineItems
object
required
A collection of line items for an invoice.
Show child attributes
lineItems
items
array<object>
required
The list of line items.
Show child attributes
lineItems.items[]
images
array<object>
Optional list of images associated with this line item.
options
array<object>
Optional list of modifiers applied to this item (e.g., toppings, upgrades, customizations).
Show child attributes
lineItems.items[].options[]
group
string
<=100 characters
Optional group identifier to categorize related options (e.g., 'toppings').
images
array<object>
Optional list of images associated with this line item option.
productID
string
Optional unique identifier associating the line item with a product.
When provided, images associated with the product will be included on the line item.
This does not populate other details of the line item.
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
partnerAccountID
string
<=36 characters
required
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
refundedAmount
object
required
Total amount of refunds initiated against transfers paid towards the invoice
status
string<enum>
required
Possible values:
draft,
unpaid,
payment-pending,
paid,
overdue,
canceled
totalAmount
object
required
Total amount of the invoice, including subtotal, tax, and surcharge amounts.
amountDetails
object
invoicePayments
array<object>
Payment made towards an invoice, will be either a transfer or an external payment.
Show child attributes
invoicePayments[]
invoicePaymentID
string
<=36 characters
A unique identifier for a Moov resource. Supports UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) or typed format with base32-encoded UUID and type suffix (e.g., kuoaydiojf7uszaokc2ggnaaaa_xfer).
payment
object
Payment options for the invoice.
Payment options for an invoice.
Show child attributes
payment