Skip to main content
Vindicia Knowledge Center

Chargeback.fetchDeltaSince

Chargeback.fetchDeltaSince

Chargeback.fetchDeltaSince

You can retrieve chargebacks from Vindicia in either of these ways:

  • Manually, by logging into the CashBox Portal and downloading a comma-separated values (CSV) file of the chargebacks for a certain date range
  • Programmatically, by making the fetchDeltaSince call, which returns one or more Chargeback objects whose statuses have changed since the specified time stamp

To always retrieve your chargebacks programmatically, call fetchDeltaSince periodically. The periodicity depends on your transaction and chargeback volume. Keep in mind that lag time usually exists between the time the customer calls the bank to charge back a transaction and the time the chargeback is downloaded from your payment processor and added to the Vindicia database.

Many merchants examine the statuses of their chargebacks from the information thus retrieved and, in some cases, use them as the basis on which to forbid or allow transactions initiated by certain customers or certain credit-card accounts. Each retrieved Chargeback object contains the ID of the original transaction that was charged back. You can retrieve the corresponding transaction and customer account with that ID by making the calls available for the Transaction object.

This method supports paging to limit the number of records returned per call. Occasionally, returning a large number of records in one call swamps buffers and might cause a failure. Vindicia recommends that you call this method in a loop, incrementing the page for each loop iteration with an optimal page size (number of records returned in one call) until the page contains a number of records that is less than the given page size.

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 date and time on or after which a chargeback changed its status.

endTimestamp: a time stamp that specifies the date and time before which a chargeback changed its status. If null, CashBox applies only timeStamp as the search criterion.

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.

chargebacks: an array of one or more Chargeback objects whose status has changed since timestamp (and before endTimestamp, if specified).

Returns

This method returns the codes listed in Standard Return Codes.

Example

$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 time stamp 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);

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top