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.
- This article introduces how to add and delete an invoice item of a draft standalone invoice.
- For editing an invoice item, see Edit invoice item prices and custom fields of draft standalone invoices and Edit due dates of draft standalone invoices.
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:
- Navigate to Billing > Invoices.
- On the Invoices page, click the invoice in which you want to add, edit, or delete invoice items.
- On the invoice details page, click more > Edit Invoice.
The invoice editing page is displayed. - In the Invoice Details area, perform one of the following operations:
- Creating and adding an invoice item
- Click Create New Charge.
- In the Create a New Charge dialog, specify Charge Name, Price, Quantity, Start Date, and other fields, and click Save.
- Adding an existing product rate plan charge as a new charge item
- Click Search Existing Products.
- 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.
- In the Create a New Charge dialog, click Save.
- Deleting an existing product rate plan charge
- Click the delete icon.
- In the Delete Charge? dialog, click Delete.
- Creating and adding an invoice item
- 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:
- Determine the mandatory fields that you need for creating and adding an invoice item, including:
- Path parameter:
invoiceKey
- Request fields:
amount
serviceStartDate
chargeName
unitPrice
- Path parameter:
- 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:
- 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
- Path parameter:
- 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:
- Determine the mandatory fields that you need for deleting an invoice item, including:
- Path parameter:
invoiceKey
- Request fields:
id
delete
- Path parameter:
- 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 } ] } |