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.04.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)
import { Moov } from "@moovio/sdk";
const moov = new Moov({
security: {
username: "",
password: "",
},
});
async function run() {
const result = await moov.invoices.updateInvoice({
accountID: "ce46d65a-8504-4afa-b3f7-303401bd08b3",
invoiceID: "ef510999-370a-4350-87d5-bc81fc02a2ea",
updateInvoice: {
description: "Updated professional services for Q1 2026",
lineItems: {
items: [
{
name: "Professional Services",
basePrice: {
currency: "USD",
valueDecimal: "1000.00",
},
quantity: 1,
},
],
},
invoiceDate: new Date("2026-01-16T00:00:00Z"),
dueDate: new Date("2026-02-16T00:00:00Z"),
},
});
console.log(result);
}
run();declare(strict_types=1);
require 'vendor/autoload.php';
use Moov\MoovPhp;
use Moov\MoovPhp\Models\Components;
use Moov\MoovPhp\Utils;
$sdk = MoovPhp\Moov::builder()
->setSecurity(
new Components\Security(
username: '',
password: '',
)
)
->build();
$updateInvoice = new Components\UpdateInvoice(
description: 'Updated professional services for Q1 2026',
lineItems: new Components\CreateInvoiceLineItemsUpdate(
items: [
new Components\CreateInvoiceLineItem(
name: 'Professional Services',
basePrice: new Components\AmountDecimal(
currency: 'USD',
valueDecimal: '1000.00',
),
quantity: 1,
),
],
),
invoiceDate: Utils\Utils::parseDateTime('2026-01-16T00:00:00Z'),
dueDate: Utils\Utils::parseDateTime('2026-02-16T00:00:00Z'),
);
$response = $sdk->invoices->updateInvoice(
accountID: 'ce46d65a-8504-4afa-b3f7-303401bd08b3',
invoiceID: 'ef510999-370a-4350-87d5-bc81fc02a2ea',
updateInvoice: $updateInvoice
);
if ($response->invoice !== null) {
// handle response
}package hello.world;
import io.moov.sdk.Moov;
import io.moov.sdk.models.components.*;
import io.moov.sdk.models.errors.GenericError;
import io.moov.sdk.models.errors.UpdateInvoiceError;
import io.moov.sdk.models.operations.UpdateInvoiceResponse;
import java.lang.Exception;
import java.time.OffsetDateTime;
import java.util.List;
public class Application {
public static void main(String[] args) throws GenericError, UpdateInvoiceError, Exception {
Moov sdk = Moov.builder()
.security(Security.builder()
.username("")
.password("")
.build())
.build();
UpdateInvoiceResponse res = sdk.invoices().updateInvoice()
.accountID("ce46d65a-8504-4afa-b3f7-303401bd08b3")
.invoiceID("ef510999-370a-4350-87d5-bc81fc02a2ea")
.updateInvoice(UpdateInvoice.builder()
.description("Updated professional services for Q1 2026")
.lineItems(CreateInvoiceLineItemsUpdate.builder()
.items(List.of(
CreateInvoiceLineItem.builder()
.name("Professional Services")
.basePrice(AmountDecimal.builder()
.currency("USD")
.valueDecimal("1000.00")
.build())
.quantity(1)
.build()))
.build())
.invoiceDate(OffsetDateTime.parse("2026-01-16T00:00:00Z"))
.dueDate(OffsetDateTime.parse("2026-02-16T00:00:00Z"))
.build())
.call();
if (res.invoice().isPresent()) {
System.out.println(res.invoice().get());
}
}
}from moovio_sdk import Moov
from moovio_sdk.models import components
from moovio_sdk.utils import parse_datetime
with Moov(
security=components.Security(
username="",
password="",
),
) as moov:
res = moov.invoices.update_invoice(account_id="ce46d65a-8504-4afa-b3f7-303401bd08b3", invoice_id="ef510999-370a-4350-87d5-bc81fc02a2ea", description="Updated professional services for Q1 2026", line_items={
"items": [
{
"name": "Professional Services",
"base_price": {
"currency": "USD",
"value_decimal": "1000.00",
},
"quantity": 1,
},
],
}, invoice_date=parse_datetime("2026-01-16T00:00:00Z"), due_date=parse_datetime("2026-02-16T00:00:00Z"), payment={
"card_details": {
"dynamic_descriptor": "WhlBdy *Yoga 11-12",
},
"ach_details": {
"company_entry_description": "Gym dues",
"originating_company_name": "Whole Body Fit",
},
}, tax_amount={
"currency": "USD",
"value_decimal": "12.987654321",
})
# Handle response
print(res)require 'moov_ruby'
Models = ::Moov::Models
s = ::Moov::Client.new(
security: Models::Components::Security.new(
username: '',
password: ''
)
)
res = s.invoices.update_invoice(account_id: 'ce46d65a-8504-4afa-b3f7-303401bd08b3', invoice_id: 'ef510999-370a-4350-87d5-bc81fc02a2ea', update_invoice: Models::Components::UpdateInvoice.new(
description: 'Updated professional services for Q1 2026',
line_items: Models::Components::CreateInvoiceLineItemsUpdate.new(
items: [
Models::Components::CreateInvoiceLineItem.new(
name: 'Professional Services',
base_price: Models::Components::AmountDecimal.new(
currency: 'USD',
value_decimal: '1000.00'
),
quantity: 1
),
]
),
invoice_date: DateTime.iso8601('2026-01-16T00:00:00Z'),
due_date: DateTime.iso8601('2026-02-16T00:00:00Z')
))
unless res.invoice.nil?
# handle response
endusing Moov.Sdk;
using Moov.Sdk.Models.Components;
using System;
using System.Collections.Generic;
var sdk = new MoovClient(security: new Security() {
Username = "",
Password = "",
});
var res = await sdk.Invoices.UpdateInvoiceAsync(
accountID: "ce46d65a-8504-4afa-b3f7-303401bd08b3",
invoiceID: "ef510999-370a-4350-87d5-bc81fc02a2ea",
body: new UpdateInvoice() {
Description = "Updated professional services for Q1 2026",
LineItems = new CreateInvoiceLineItemsUpdate() {
Items = new List<CreateInvoiceLineItem>() {
new CreateInvoiceLineItem() {
Name = "Professional Services",
BasePrice = new AmountDecimal() {
Currency = "USD",
ValueDecimal = "1000.00",
},
Quantity = 1,
},
},
},
InvoiceDate = System.DateTime.Parse("2026-01-16T00:00:00Z").ToUniversalTime(),
DueDate = System.DateTime.Parse("2026-02-16T00:00:00Z").ToUniversalTime(),
}
);
// handle responseThe 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"
},
"taxAmount": {
"currency": "USD",
"valueDecimal": "80.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"
}
},
"taxAmount": {
"currency": "string",
"valueDecimal": "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.04.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.04.00
Path parameters
Body
application/json
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:
draft,
unpaid,
payment-pending,
paid,
overdue,
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.
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