Create a bill run
Creates an ad-hoc bill run or a scheduled bill run. Support the following:
- Create ad-hoc or scheduled bill runs by batch
- Create ad-hoc or scheduled bill runs by account
- Create a bill run by subscription
- Create ad-hoc or scheduled bill runs by custom filter combining the Account, Subscription, and Rate Plan objects.
To use this operation, you must have the <a href="https://docs.zuora.com?resourceId=platform-billing-roles" target="_blank">Create Bill Runs billing permission</a>.
Notes
When using this operation to create bill runs, keep the following notes in mind:
- When creating bill runs by batch, you must specify the batches field and do not specify billRunFilters field. When creating bill runs by account, subscription, or custom filter, you must specify the billRunFilters field and do not specify the batches field.
- When creating bill runs by account, only one single account is allowed. All subscription under the account are picked up.
- When creating a bill run by subscription, all subscriptions must belong to the same account. At most 50 subscriptions are allowed.
- If more than 500 bill runs created through this operation are in Pending status, you cannot use this operation to create any more bill runs.
- When you use the in operator in an Account, Subscription, or Charge filter in billRunFilters, you can specify a maximum of 500 values in the list. If any in condition contains more than 500 values, the request fails validation, an error is returned, and the Bill Run is not started. This limit applies only to the in operator in Advanced Filters and does not limit the total number of accounts, subscriptions, or charges that the Bill Run can process.
Headers
Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types.
With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
Include the Accept-Encoding: gzip header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response.
If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a Content-Encoding header with the compression algorithm so that your client can decompress it.
Include the Content-Encoding: gzip header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue.
The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (:), semicolon (;), double quote ("), and quote (').
An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
Comma separated IDs. If you have <a href="https://docs.zuora.com/en/zuora-platform/organization-and-entity-management/multi-org/overview-of-multi-org" target="_blank">Zuora Multi-Org</a> enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header.
The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
The minor API version.
For a list of available minor versions, see API upgrades.
Request body
Example request
{
"batches": null,
"billRunFilters": [
{
"filterType": "FilterCondition",
"objectType": "Account",
"condition": {
"relation": "and",
"conditions": [
{
"field": "BillCycleDay",
"operator": "neq",
"value": "{{AsRunDay}}"
}
]
}
}
],
"autoRenewal": false,
"noEmailForZeroAmountInvoice": false,
"autoPost": true,
"autoEmail": false,
"chargeTypeToExclude": [],
"billCycleDay": null,
"invoiceDate": "2026-01-01",
"targetDate": "2026-01-01",
"billRunType": "Regular",
"name": ""
}Response
OK
Example response
{
"id": "8a90ff929bb9d7c0019bbc7d34ec2c5f",
"autoEmail": false,
"autoPost": false,
"autoRenewal": false,
"billCycleDay": "AllBillCycleDays",
"billRunNumber": "BR-00007954",
"name": "Bill subscriptions matched the dynamic invoice date 2025-06-01",
"invoiceDate": "2025-06-01",
"noEmailForZeroAmountInvoice": false,
"status": "Pending",
"targetDate": "2025-06-01",
"targetDateOffset": null,
"invoiceDateOffset": null,
"scheduledExecutionTime": null,
"createdById": "e1187a1f28c8487ca6b40c40ffb10853",
"createdDate": "2026-01-14 04:31:20",
"updatedById": "e1187a1f28c8487ca6b40c40ffb10853",
"updatedDate": "2026-01-14 04:31:20",
"batches": [
"AllBatches"
],
"chargeTypeToExclude": null,
"billRunFilters": [
{
"filterType": "FilterCondition",
"accountId": null,
"subscriptionId": null,
"invoiceScheduleId": null,
"invoiceScheduleItemId": null,
"objectType": "Subscription",
"condition": {
"field": null,
"operator": null,
"value": null,
"conditions": [
{
"field": "billRunEffectiveDate__c",
"operator": "lte",
"value": "{{InvoiceDate}}",
"conditions": [],
"relation": null
}
],
"relation": "and"
}
}
],
"schedule": null,
"invoiceDateMonthOffset": null,
"invoiceDateDayOfMonth": null,
"targetDateMonthOffset": null,
"targetDateDayOfMonth": null,
"includeSubscriptions": true,
"includeOrderLineItems": true,
"success": true
}Changes
No recorded changes to this endpoint across all 4 revisions of this API.