Skip to main content

Create Usage

Zuora

Create Usage

Overview

In this use case, usage will be created programmatically for an account.

Creating a Usage Object

Set the following fields to create a Usage object:

  1. Specify the AccountId or AccountNumber. You must specify one of those values when creating usage.
  2. Set the Quantity.
  3. Set the StartDateTime. This dateTime specifies which billing period this usage will be counted under.
  4. Set the UOM (Unit of Measure). This must match one of the UOM's configured in the Zuora tenant.

This use case uses the minimum required fields. Other fields, such as SubscriptionNumber or ChargeNumber, may be required for proper processing.

SOAP Example

The SOAP call envelope payload should look like the following:

<ns1:create>
 <ns1:zObjects xsi:type="ns2:Usage">
   <ns2:AccountId>4028e485225d1d5f0122662fd6b249c8</ns2:AccountId>
   <ns2:Quantity>500</ns2:Quantity>
   <ns2:StartDateTime>2009-11-04T15:00:00</ns2:StartDateTime>
   <ns2:UOM>Each</ns2:UOM>
 </ns1:zObjects>
</ns1:create>