Skip to main content

Execute invoice schedules

Zuora

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 Customer Success Manager 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.

Execute invoice schedules through the Zuora UI

To manually execute an invoice schedule through the Zuora UI, perform the following steps:

  1. In the left navigation section, navigate to Customers > Orders.
  2. On the Orders page, click the number of the order associated with the invoice schedule that you want to execute manually.
  3. 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.
  4. On the displayed invoice schedule details page, scroll down to the Schedule Items section. 
  5. 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.
  6. In the displayed Confirmation dialog, click Yes to confirm invoice generation.
  7. If the invoice schedule item is being executed, click the “Refresh” action link displayed in the Billing Document column to refresh the execution status.

The status of the corresponding invoice schedule item is changed to Processed from Pending, and the number of the generated invoice is displayed in the Billing Document column. You can click the link of the invoice number to visit 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:

  1. 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.
  2. Optional: Determine the ID of the invoice schedule item that you want to execute.
  3. 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
}