> This page is for Docs.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://zuora.ferndocs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://zuora.ferndocs.com/_mcp/server.

# Preview an invoice using subscribe()

> Learn how to preview an invoice using the subscribe() call.

Learn how to preview an invoice using the subscribe() call.

To include taxation items for the corresponding invoices in the result, you must use WSDL version 120 or higher.

Call `subscribe()` , passing the appropriate product rate plan and charge data.

Populate `PreviewOptions` :

1. Set `EnablePreviewMode` to `true` .
2. Set `NumberOfPeriods` to the number of billing periods to include in the preview invoice, or
3. Set `PreviewThroughTermEnd` to preview the invoice through the end of a termed subscription (WSDL 51.0+).

* You can only set `NumberOfPeriods` or `PreviewThroughTermEnd` , but not both.
* As an alternative to `NumberOfPeriods` or `PreviewThroughTermEnd` , you can set the `InvoiceTargetDate` in the `SubscribeOptions` to preview to a specific date.
* If neither `NumberOfPeriods` nor `PreviewThroughTermEnd` nor `InvoiceTargetDate` are specified when `EnablePreviewMode` = `true`, then 1 billing period will be previewed by default.

Zuora returns an `InvoiceData` node in the SubscribeResult , which contains the invoice and resulting invoice items.