Guides and Examples
...
Invoices
Preview Invoices
3 min
overview this document explains how to use the invoice preview api to simulate and review an invoice before final creation the preview api allows you to estimate invoice calculations—such as product charges, discounts, taxes, and totals—without generating a real invoice this helps users validate billing logic, pricing, and configurations prior to activation, supporting accurate billing and streamlined review cycles preview invoices you can preview invoices for a list of order products of a given customer through the nue api ( preview billing information ), and the invoices will be returned in the api response for example, you can preview the invoice for the specific order products for a customer curl x post "https //api nue io/orders/invoices\ preview" \\ h "nue api key {yourapikey}" \\ h "content type application/json" \\ h "accept application/json" \\ d '{ "customerid" "001ks00000dvz1ayad", "targetdate" "2026 12 31", "orderproducts" \[ { "totalprice" 118 8, "tax" 0, "startdate" "2025 10 06", "quantity" 1, "productname" "nue platform", "productid" "01t8g000002rf6gqac", "pricemodel" "recurring", "netsalesprice" 9 9, "linetype" "lineitem", "id" "8028g000001kxtcqag", "enddate" "2026 10 05" } ] }' by default, the invoices will be previewed based on the billing settings configured for the customer if there are no specific billing settings configured, the organization's billing settings will be used instead you have the option to preview invoices with various billing settings for example, you may choose to view invoices on a monthly basis, using a billing cycle date set for the middle of the month curl x post "https //api nue io/orders/invoices\ preview" \\ h "nue api key {yourapikey}" \\ h "content type application/json" \\ h "accept application/json" \\ d '{ "customerid" "001ks00000dvz1ayad", "billingperiod" "monthly", "billcycleday" "15th of month", "targetdate" "2026 12 31", "orderproducts" \[ { "totalprice" 118 8, "tax" 0, "startdate" "2025 10 06", "quantity" 1, "productname" "nue platform", "productid" "01t8g000002rf6gqac", "pricemodel" "recurring", "netsalesprice" 9 9, "linetype" "lineitem", "id" "8028g000001kxtcqag", "enddate" "2026 10 05" } ] }'