> ## 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.

# Retrieving Chargeback Updates

The `Chargeback` object supports a `fetchDeltaSince()` call with which you can retrieve chargebacks that have changed in status or that have been newly added since the timestamp you specify as an argument for the call.

Fetch chargebacks that have changed in a specific time frame:

```

 $cb = new Chargeback();
 $page = 0;
 $pageSize = 50;
  
 // Here we want to fetch chargebacks that have changed in status or 
 // have been added since the last time we ran this call. 
 // Assume we have a function available to us that gives us 
 // the timestamp for the last time we ran this call
  
 $since = getLastCallTime(); 
 do {
 $ret = $cb->fetchDeltaSince($since, null, $page, $pageSize);
 $count = 0;
 if ($ret[’returnCode’] == 200) {
 $fetchedChargebacks = $ret['chargebacks'];
 if ($fetchedChargebacks != null) {
 $count = sizeof($fetchedChargebacks);
 foreach ($fetchedChargebacks as $chargeback) {
  
 // process a fetched chargeback here …
 $status = $chargeback->getStatus();
 $transactionId = 
 $chargeback->getMerchantTransactionId();
 $amount = $chargeback->getAmount();
 }
 $page++;
 }
 }
 } while ($count > 0);
```

To retrieve all the chargebacks that match the search criteria, construct the sample above in a loop by incrementing the page number for each iteration until the returned number of chargebacks in a page is less than the specified page size.

The `Chargeback` object also supports several other `fetch` calls to retrieve chargebacks through a variety of search criteria. For details, see The Chargeback Object in the ***Subscribe API Guide.***

Make this call to Vindicia at periodic intervals with a UNIX daemon, a Microsoft Windows scheduler, or a similar technology. Use this process to automate the tasks of downloading chargebacks, learning their status, and enabling or disabling customer accounts.

**Parent topic:**[Common ChargeGuard Programming Tasks](../topics/ProgGuide_ChargeGuard)


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