> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chargeapi.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an Invoice

Creates a draft invoice for a time window and, optionally, a single fleet. Finalize the invoice when you are ready to lock line items and collect payment.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.chargeapi.co/v1/invoices \
    -H "Authorization: Bearer ch_sk_test_..." \
    --json '{
    "period_end": "2026-05-02T00:25:17.494Z",
    "period_start": "2026-04-01T00:25:40.683Z"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "id": "inv_AzC78kBZwIQkgmJeyTANcT9HRINBOfr3",
      "object": "invoice",
      "amount_due": 2500,
      "amount_paid": null,
      "created": "2026-05-02T00:25:46.191Z",
      "currency": "eur",
      "description": null,
      "due_date": "2026-05-09T00:25:36.789Z",
      "fleet": "flt_AAeAlAZzocmSZp6L2mA3rKYNPYyL3GSy",
      "line_items": [
          {
              "amount": 1842,
              "description": "Charging sessions for March 2026",
              "quantity": 1,
              "unit_amount": 1842
          },
          {
              "amount": 658,
              "description": "Reservation fees",
              "quantity": 2,
              "unit_amount": 329
          }
      ],
      "metadata": {},
      "paid_at": null,
      "payment_method": null,
      "period_end": "2026-05-02T00:25:17.494Z",
      "period_start": "2026-04-01T00:25:40.683Z",
      "status": "draft"
  }
  ```
</ResponseExample>

## Parameters

<ParamField body="fleet" type="string">
  Limit the invoice to a single fleet under the account.
</ParamField>

<ParamField body="period_end" type="string" required>
  End of the billing window (exclusive). RFC 3339 UTC timestamp with millisecond precision, e.g. `2026-03-03T14:05:23.789Z`.
</ParamField>

<ParamField body="period_start" type="string" required>
  Start of the billing window (inclusive). RFC 3339 UTC timestamp with millisecond precision, e.g. `2026-03-03T14:05:23.789Z`.
</ParamField>

## More parameters

<ParamField body="currency" type="string">
  ISO-4217 currency code.
</ParamField>

<ParamField body="description" type="string">
  Optional memo that appears on the invoice.
</ParamField>

<ParamField body="metadata" type="object">
  Set of key-value pairs that you can attach to an object.
</ParamField>

## Returns

Returns the created invoice.
