> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slm.m1amdocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetching Billed or Unbilled Rated Unit Events

Subscribe allows you to fetch both billed and unbilled Rated Unit Events, allowing you to compare your customer’s current with previous use patterns.

Calling `fetchUnbilledEvents` returns the (unbilled) Events themselves, rather than a Summary Report. Use this call to display your customer’s (not yet billed) use for the current Billing Cycle.

`fetchEvents` differs from this call only in that it will return all Events for the given input parameters, billed or unbilled. Use this call to compare your customer’s previous use with their current use, or to determine applicable upgrade plans to offer.

## Fetch unbilled Rated Unit Events

```

 $rateplan = new RatePlan;
 $response = $rateplan->fetchUnbilledEvents(
    null, # $account 
    $myAutoBill, # $myAutoBill 
    $myProduct, # $myProduct 
    null, # $ratePlan 
    null, # $startTimestamp 
    null, # $endTimestamp 
    0, # $page 
    50, # $pageSize 
 );
 $events = $response->['data']->event;
 foreach ($events as $ev) {
    print $ev->amount;
    print $ev->description;
    print $ev->eventDate;
    print $ev->billedStatus;
    print $ev->VID;
 }
```

For this call, the arguments are the same as those for `fetchUnbilledRatedUnitsTotal`, but the objects returned are different; `fetchUnbilledRatedUnitsTotal` returns all Events corresponding to the `AutoBillItems` for the given AutoBill and Product, rather than simply a summary.

The returned Events include two fields in addition to those passed in using `recordEvent`:

* `billedStatus` lists whether the event has been billed (in items returned from `fetchUnbilledEvents`, this will always be false; if you call `fetchEvents`, it could be true or false).
* `VID` is Vindicia's unique identifier for the Event.

For more information on returned data members for the Event, see the Event Subobject in the **Subscribe API Guide.**

Note that all optional data members identifying the event (such as the `autoBillVid`) will be entered by Subscribe, if available.

**Parent topic:**[Fetching and Reporting Rated Units](../topics/Fetching_and_Reporting_R)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.