Execute invoice schedules
The Billing Schedule feature is generally available. You can enable this feature in Sandbox environments with the self-serve interface. For more information, see Enable billing features by yourself. If you want to enable this feature in your Production environments, contact your Zuora account team for assistance.
After an invoice schedule is created, Zuora automatically generates invoices on predefined dates. However, you also have the flexibility to manually execute an invoice schedule and its schedule items to generate invoices through the Zuora UI or REST API.
You can manually execute an invoice schedule item under any of the following conditions:
- The specified invoice date of an invoice schedule item is in the future and you want to generate an invoice in advance.
- The specified invoice date of an invoice schedule item has passed but no invoice has been generated.
To manually execute an invoice schedule through the REST API, use the Execute an invoice schedule operation.
A paused invoice schedule and charges inside cannot be automatically executed by Zuora Scheduler or by this "Execute an invoice schedule" operation. In this case, you can do one of the following:
- Use the Generate billing documents by account ID API operation
- Create a bill run with the target date greater than the next run date of the invoice schedule through UI or API
Execute invoice schedules through the Zuora UI
To manually execute an invoice schedule through the Zuora UI, perform the following steps:
- In the left navigation section, navigate to Customers > Orders.
- On the Orders page, click the number of the order associated with the invoice schedule that you want to execute manually.
- On the order details page, click the number of the invoice schedule that you want to execute manually in the basic information section.
The invoice schedule details page is displayed. - On the displayed invoice schedule details page, scroll down to the Schedule Items section.
- In the corresponding row of the invoice schedule item to be executed, click the “Generate” action link in the Billing Document column to manually generate a scheduled invoice by an ad hoc bill run.
- In the displayed Confirmation dialog, click Yes to confirm invoice generation.
- If the invoice schedule item is being executed, click the “Refresh” action link displayed in the Billing Document column until you see the following:
- The status of the corresponding invoice schedule item is changed from Pending to Processed.
- The invoice number is displayed in the Billing Document column. The invoice status is Draft.
- Hover the invoice number until a small invoice summary dialog opens, and click Post in the dialog to post the invoice. Repeat steps 7 and 8 until all invoice schedule items are executed and posted.
- You can click the link of the invoice number to visit the detailed invoice information displayed on the invoice details page.
Execute invoice schedules through the REST API
When you use the Execute an invoice schedule operation to execute an invoice schedule item, you have the flexibility to decide whether to specify a specific item ID.
- If you specify the unique ID of an invoice schedule item to be executed in the request, the corresponding invoice schedule item is executed.
- If you do not specify the ID of any invoice schedule item in the request, the subscription end date is used as the target date to determine the next pending schedule item to be executed.
To execute an invoice schedule through the REST API, perform the following steps:
- Determine the unique ID or number of the invoice schedule where you want to execute an invoice schedule item, and enter the ID or number as the value of the
scheduleKey
path parameter. - Optional: Determine the ID of the invoice schedule item that you want to execute.
- Use the Execute an invoice schedule operation to send a request to execute an invoice schedule item.
The following table lists the request and response samples for executing an invoice schedule item.
Condition | Request sample | Response sample |
---|---|---|
Specifying item ID |
{ "scheduleItemId": "8a90f5088459f34f01845a62a33b1787" } |
{ "id": "8a90876c8459e39601845a6c789e191b", "autoEmail": false, "autoPost": false, "autoRenewal": false, "billCycleDay": null, "billRunNumber": "BR-00170238", "invoiceDate": "2022-12-03", "noEmailForZeroAmountInvoice": false, "status": "Pending", "targetDate": "2022-12-03", "targetDateOffset": null, "invoiceDateOffset": null, "scheduledExecutionTime": null, "createdById": "2c92c8fb7d6be66a017d6ecf94614438", "createdDate": "2022-11-08 17:26:09", "updatedById": "2c92c8fb7d6be66a017d6ecf94614438", "updatedDate": "2022-11-08 17:26:09", "batches": null, "chargeTypeToExclude": [ "Usage" ], "billRunFilters": [ { "filterType": "InvoiceSchedule", "accountId": "8a90c1d47f07e24b017f0811c06a0b8b", "subscriptionId": null, "invoiceScheduleId": "e717da75dae645bdb63723d364e8547d", "invoiceScheduleItemId": "8a90f5088459f34f01845a62a33b1787" } ], "schedule": null, "success": true } |
Not specifying item ID |
{ } |
{ "id": "8a90f5088459f34f01845a6e352f1983", "autoEmail": false, "autoPost": false, "autoRenewal": false, "billCycleDay": null, "billRunNumber": "BR-00170241", "invoiceDate": "2022-12-08", "noEmailForZeroAmountInvoice": false, "status": "Pending", "targetDate": "2022-12-08", "targetDateOffset": null, "invoiceDateOffset": null, "scheduledExecutionTime": null, "createdById": "2c92c8fb7d6be66a017d6ecf94614438", "createdDate": "2022-11-08 17:28:02", "updatedById": "2c92c8fb7d6be66a017d6ecf94614438", "updatedDate": "2022-11-08 17:28:02", "batches": null, "chargeTypeToExclude": [ "Usage" ], "billRunFilters": [ { "filterType": "InvoiceSchedule", "accountId": "8a90c1d47f07e24b017f0811c06a0b8b", "subscriptionId": null, "invoiceScheduleId": "e717da75dae645bdb63723d364e8547d", "invoiceScheduleItemId": null } ], "schedule": null, "success": true } |