Skip to main content
POST
/
invoices
/
{invoice}
Update an invoice
curl --request POST \
  --url https://api.chargeapi.co/v1/invoices/{invoice} \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "April 2024 fleet invoice"
}'
{
  "id": null,
  "object": null,
  "amount_due": null,
  "amount_paid": null,
  "created": null,
  "currency": null,
  "due_date": null,
  "line_items": null,
  "paid_at": null,
  "period_end": null,
  "period_start": null,
  "status": null
}

Path Parameters

invoice
string
required

ID of the invoice to update.

Body

application/json
description
string

Human-readable memo that appears on the invoice.

due_date
integer

Override the default due date (UNIX timestamp).

metadata
object

Set of key–value pairs for internal reference.

Response

Returns the updated Invoice object reflecting the supplied changes. Raises an error if the invoice ID is invalid or the invoice is no longer editable (for example, already finalized).

id
string

Unique identifier for the invoice object.

Example:

null

object
string

String representing the object’s type. Always invoice.

Example:

null

amount_due
integer | null

Total amount due on the invoice, in the smallest currency unit (e.g., cents).

Example:

null

amount_paid
integer | null

Total amount paid toward the invoice.

Example:

null

created
integer

Time at which the invoice was created.

Example:

null

currency
string

ISO 4217 three-letter currency code (e.g., usd).

Example:

null

due_date
integer | null

Timestamp when the invoice is due.

Example:

null

line_items
object[] | null

Array of individual line items included in the invoice.

Example:

null

paid_at
integer | null

Timestamp when the invoice was fully paid, if applicable.

Example:

null

period_end
integer | null

End of the billing period this invoice covers.

Example:

null

period_start
integer | null

Start of the billing period this invoice covers.

Example:

null

status
enum<string> | null

Current status of the invoice.

Available options:
draft,
open,
paid,
overdue,
void
Example:

null