Skip to main content

BillRun

Zuora

BillRun

The BillRun object allows you to create ad hoc bill runs and Post, Query, Cancel, and Delete bill runs. This API object does not let you create a scheduled bill run.

The BillRun object is different from the Billing Run data source.

You must be on WSDL version 63.0 or higher to use this feature. See The Zuora WSDL for information about downloading the current version.

Supported Calls

You can use this object with the following calls:

See BillRun Use Cases for more information.

Field Descriptions

All field names are case sensitive. Check enumerated values in descriptions to confirm capitalization and spacing. See Field Types for additional information.

Name

Required for Update?

Allowed Operations

Description

AccountId

optional

Query

Filter

Create

Account ID for a single account bill run.

Type: string

Character limit: 32

AutoEmail

optional

Query

Filter

Create

True allows auto-send email invoices once the bill run completes.

Type: boolean

Default: False

You must enable the Support Bill Run Auto-Post Z-Billing rule to pass this field.

AutoPost

optional

Query

Filter

Create

True allows auto-post bill run once the bill run completes. 

Type: boolean

Default: False

You must enable the Support Bill Run Auto-Post Z-Billing rule to pass this field.

AutoRenewal

optional

Query

Filter

Create

Flag to determine whether subscriptions are automatically renewed by this  bill run.

Type: boolean

Default: False

Batches

optional

Query

Filter

Create

The specific batches of customer accounts to be included in the bill run. 

You cannot set the Batches field to a value consisting of both AllBatches and Batchn. Otherwise, the INVALID_VALUE error occurs. For example, AllBatches,Batch3 is an invalid value for this field.

Type: string

Character limit: 20

Values: AllBatchesBatchn or an array of Batchn where n is a number between 1 and 50

BillCycleDay

optional

Query

Filter

Create

The day of the bill cycle.

Type: string

Character limit: 32

Values: AllBillCycleDays or 01 - 31

BillRunNumber

optional

Query

Filter

The number of this bill run.

Type: string

Character limit: 50

Values: automatically generated

ChargeTypeToExclude

optional

Query

Create

Charge type or types to be excluded, separated with commas.

Type: string

Character limit: 50

Values: OneTime, Recurring, Usage, or a combination of two of these values

CreatedById

optional

Query

Filter

The ID of the user who created the bill run.

Type: string

Character limit: 32

Values: automatically generated

CreatedDate

optional

Query

Filter

The date when this bill run was created.

Type: dateTime

Character limit: 29

Values: automatically generated

ErrorMessage

optional

Query

Error message for this bill run.

Type: string

Character limit: 255

Values: automatically generated

ExecutedDate

optional

Query

Filter

Execution date for this bill run.

Type: dateTime

Character limit: 29

Values: automatically generated

Id

required

Query

Filter

Update

The ID of the object.

Type: string

Character limit: 32

Values: automatically generated

InvoiceDate

required

Query

Filter

Create

Invoice date for this bill run.

Type

  • date: Supported as of WSDL version 69+
  • dateTime: Supported through WSDL version 68

Character limit: 29

InvoicesEmailed

optional

Query

Filter

Flag to indicate whether the invoice has been sent.

Type: boolean

Values: automatically generated

LastEmailSentTime

optional

Query

Filter

The last time when emails were sent for this bill run.

Type: dateTime

Character limit: 29

Values: automatically generated

NoEmailForZeroAmountInvoice

optional

Query

Filter

Create

Flag to determine suppression email for invoices with zero total or not for this bill run (Do not email invoices with 0 Invoice Total)

Type: boolean

Default: False

NumberOfAccounts

optional

Query

Filter

The number of accounts processed by this bill run.

Type: long

Values: automatically generated

NumberOfCreditMemos

optional

Query

Filter

The number of credit memos generated by this bill run.

Type: long

Values: automatically generated

This field is only available if you have the Invoice Settlement feature enabled.

NumberOfInvoices

optional

Query

Filter

The number of invoices generated by this bill run.

Type: long

Values: automatically generated

PostedDate

optional

Query

Filter

The date when the bill run was posted.

Type: dateTime

Character limit: 29

Values: automatically generated

Status

required

Query

Filter

Update

The status of this bill run.

Type: string

Character limit: 20

Values: One of the following:

  • Pending
  • Processing
  • Completed
  • Error
  • Canceled
  • Posted

See Status Types for more information.

TargetDate

required

Query

Filter

Create

The target date for this bill run. See Create Bill Run for more information on this field.

Type

  • date: Supported as of WSDL version 69+
  • dateTime: Supported through WSDL version 68

Character limit: 29

UpdatedById

optional

Query

Filter

The ID of the user who last updated the bill run.

Type: zns:ID

Character limit: 32

Values: automatically generated

UpdatedDate

optional

Query

Filter

The date when the bill run was last updated.

Type: dateTime

Character limit: 29

Values: automatically generated