Update
client.invoices.update(stringid, InvoiceUpdateParams { current_invoice_version, line_items, tags } body, RequestOptionsoptions?): InvoiceUpdateResponse { data }
PATCH/invoices/{id}
Updates an invoice
Parameters
id: string
Invoice ID
Returns
Update
import Fragment from '@fragment-dev/ts-node';
const client = new Fragment();
const invoice = await client.invoices.update('inv_1234567890', { current_invoice_version: 3 });
console.log(invoice.data);{
"data": {
"id": "inv_1234567890",
"created": "2024-01-13T00:00:00Z",
"status": "active",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"version": 1,
"workspace_id": "ws_1234567890",
"line_items": [
{
"id": "item_1234567890",
"amount": "1000",
"currency_code": "USD",
"description": "Professional services for January 2026",
"price": {
"amount": "1000",
"quantity": 1,
"unit_price": "1000"
},
"product_id": "prod_1234567890",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z"
}
}Returns Examples
{
"data": {
"id": "inv_1234567890",
"created": "2024-01-13T00:00:00Z",
"status": "active",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"version": 1,
"workspace_id": "ws_1234567890",
"line_items": [
{
"id": "item_1234567890",
"amount": "1000",
"currency_code": "USD",
"description": "Professional services for January 2026",
"price": {
"amount": "1000",
"quantity": 1,
"unit_price": "1000"
},
"product_id": "prod_1234567890",
"tags": [
{
"key": "region",
"value": "us-east"
}
],
"type": "payout",
"user_id": "user_ext_456"
}
],
"modified": "2024-01-13T00:00:00Z"
}
}