---
title: "Generate invoice from subscription"
method: POST
path: "/v1/invoices/generate-from-subscription"
tags: ["Invoices"]
---

# Generate invoice from subscription

`POST /v1/invoices/generate-from-subscription`

Generate an invoice for a subscription billing period.
Supports prorated amounts for partial periods (mid-cycle starts, cancellations, upgrades/downgrades).
Optionally includes usage charges from the same period.

The invoice is created in DRAFT status. Use the issue endpoint to finalize it.

## Request body

- object
  - `customerId` string, required — Customer ID
  - `subscriptionId` string, required — Subscription ID
  - `periodStart` string, date-time — Override period start (ISO 8601)
  - `periodEnd` string, date-time — Override period end (ISO 8601)
  - `dueDate` string, date-time — Payment due date (ISO 8601)
  - `notes` string
  - `customerNotes` string
  - `includeUsageCharges` boolean — Bundle usage charges in the same invoice

## Response `201`

Invoice generated

- object — Invoice generated

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/usedrip/apis/drip-api.md) · [All operations](https://skmtc.net/usedrip/apis/drip-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usedrip/drip-api/revisions/2cb1567969ca/schema)
