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

# Refund.fetchDeltaSince

The `fetchDeltaSince` method returns one or more `Refund` objects whose time stamps fall between the timestamp values provided in the input. Limit the number of objects returned by specifying an upper limit on the time stamp as well, using the *endTimestamp* parameter.

## Input

*srd*: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a `method` call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the *srd*. A null *srd* returns the complete response.

*timestamp*: the search criterion for selecting `Refund` objects to be returned. The time stamps of those selected objects are less than or equal to this value.

*endTimestamp*: the end-date and time stamp. `Refunds` with time stamps greater than this value will not be returned.

**Note:** To reduce high loads on the system, the maximum span for a `fetchDeltaSince()` call is 61 days. If you want to fetch an extended amount of data, best practice suggests that you do so via a loop that pulls a day’s worth of data at a time, with another loop internally that handles fetching each resultant page for that day.

*paymentMethod*: an optional constraint that, if included, restricts the return to only those `Refund` objects whose original Transactions were conducted with this payment method. Specify this parameter with either the `paymentMethod` VID or `merchantPaymentMethodId`.

*page*: the page number, starting at 0, for which to return the results. For example, if the total number of results is 85 and *pageSize* is 10:

* Specifying 0 for *page* gets the results from 1 through 10.
* Specifying 2 for *page* gets the results from 21 through 30.

*pageSize*: the number of records to display per page per call. This value must be greater than 0.

## Output

*return*: an object of type `Return` that indicates the success or failure of the call.

*refunds*: an array of one or more `Refund` objects whose time stamp falls on or after *timestamp* but before *endTimestamp* (if specified) in the input.

## Returns

In addition to those listed in [The Return Object](The_Return_Object#), this call returns:

| Return Code | Return String |
| - | - |
| `404` | `Unable to find payment method in database.` |
| `400` | `Must specify a time stamp to find refunds newer than …` |

## Example

```

$refund = new Refund();
$pm = null;
$timestamp = '2009-11-28T12:40:51-0800';
$endTimeStamp = '2009-12-28T12:40:50-0800';
$page = 0;
$pageSize = 10;

$response = $refund->fetchDeltaSince($timestamp,$endTimestamp, $pm);

if($response['returnCode'] == 200) {
   $fetchedRefunds = $response['data']->refunds;

   // process fetched refunds here
   if ($fetchedRefunds != null) {
      foreach ($fetchedRefunds as $fetchedRef) {
         // process a fetched refund here
         print "Refund VID " . $fetchedRef->getVID();
         print "Refund amount ". $fetchedRef->getAmount();
         print "Refund timestamp ". $fetchedRef->getTimestamp();
      }
   }
}
```

**Parent topic:**[Refund Methods](../topics/Refund_Methods)


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