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:
- Specify the AccountId or AccountNumber. You must specify one of those values when creating usage.
- Set the Quantity.
- Set the StartDateTime. This dateTime specifies which billing period this usage will be counted under.
- 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. The ProductRatePlanChargeNumber field is required if you create or use a dynamic usage charge.
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>