Skip to main content
POST
/
invoices
Create an invoice
curl --request POST \
  --url https://api.chargeapi.co/v1/invoices \
  --header 'Content-Type: application/json' \
  --data '{
  "period_start": 1711929600,
  "period_end": 1714608000
}'
{
  "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
}

Body

application/json
period_start
integer
required

Start of the billing window (inclusive).

period_end
integer
required

End of the billing window (exclusive).

fleet
string

Limit the invoice to a single fleet under the account.

description
string

Optional memo that appears on the invoice.

currency
string

ISO-4217 currency code (defaults to the account’s default_currency).

Response

Returns the newly created Invoice object with status set to draft. Line items are generated from the transactions in the requested period, but the invoice isn’t payable until you finalize it.

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