Skip to main content

Add and delete invoice items of draft standalone invoices

Zuora

Add and delete invoice items of draft standalone invoices

After a standalone invoice is created without posting, you can add, edit or delete an invoice item through the Zuora UI or REST API. 

Add and delete invoice items of draft standalone invoices through the Zuora UI 

To add and delete invoice items of draft standalone invoices through the Zuora UI, perform the following steps:

  1. Navigate to Billing > Invoices.
  2. On the Invoices page, click the invoice in which you want to add, edit, or delete invoice items.
  3. On the invoice details page, click more > Edit Invoice.
    The invoice editing page is displayed.
  4. In the Invoice Details area, perform one of the following operations:
    • Creating and adding an invoice item
      1. Click Create New Charge
      2. In the Create a New Charge dialog, specify Charge NamePriceQuantityStart Date, and other fields, and click Save
    • Adding an existing product rate plan charge as a new charge item 
      1. Click Search Existing Products
      2. In the Add a Charge to the Invoice dialog, click a listed product or search for a product, select a product rate plan and a product rate plan charge, and click Add.
      3. In the Create a New Charge dialog, click Save.
    • Deleting an existing product rate plan charge
      1. Click the delete icon. 
      2. In the Delete Charge? dialog, click Delete
  5. On the invoice editing page, click Save Updates to save the changes.

Add and delete invoice items of draft standalone invoices through the REST API 

You can use the Update an invoice operation to add and delete an invoice item of a draft standalone invoice, or the Update invoices operation to add and delete invoice items of multiple draft standalone invoices in one single request. 

To add an invoice item, use one of the following methods. 

Create and add invoice items of draft standalone invoices

To create and add an invoice item of a draft standalone invoice through the “Update an invoice” operation, perform the following steps:

  1. Determine the mandatory fields that you need for creating and adding an invoice item, including:
    • Path parameter: invoiceKey
    • Request fields: 
      • amount
      • serviceStartDate
      • chargeName
      • unitPrice
  2. Use the "Update an invoice" operation to create and add an invoice item to a draft standalone invoice.

The following sample API request creates and adds an invoice item to a draft standalone invoice:

Request PUT /v1/invoices/{invoiceKey}
Request body
{
"invoiceItems":
[
{
"amount": 100,
"serviceStartDate": "2024-07-11",
"chargeName": "C-0000001",
"unitPrice": 100
}
]
}

Add existing product rate plan charges as invoice items

To add an existing product rate plan charge as an invoice item of a draft standalone invoice through the “Update an invoice” operation, perform the following steps:

  1. Determine the mandatory fields that you need for adding an existing product rate plan charge as an invoice item, including:
    • Path parameter: invoiceKey
    • Request fields: 
      • amount
      • serviceStartDate
      • productRatePlanChargeId
  2. Use the "Update an invoice" operation to add an existing product rate plan charge as an invoice item to a draft standalone invoice.

The following sample API request adds an existing product rate plan charge as an invoice item to a draft standalone invoice:

Request PUT /v1/invoices/{invoiceKey}
Request body
{
"invoiceItems": [
{
"amount": 100,
"serviceStartDate": "2024-07-11",
"productRatePlanChargeId": "8ad097b4909708e001909b41bb085d38"
}
]
}


Delete invoice items of draft standalone invoices

To delete an invoice item of a draft standalone invoice through the "Update an invoice" operation, perform the following steps:

  1. Determine the mandatory fields that you need for deleting an invoice item, including:
    • Path parameter: invoiceKey
    • Request fields: 
      • id
      • delete
  2. Use the "Update an invoice" operation to delete an invoice item from a draft standalone invoice.

The following sample API request deletes an invoice item from a draft standalone invoice:

Request PUT /v1/invoices/{invoiceKey}
Request body
{
"invoiceItems": [
{
"id": "8ad097b4909708e001909b41bb085d38",
"delete": true
}
]
}