Skip to main content
Vindicia Knowledge Center

Chargeback.fetchByCaseNumber and fetchByReferenceNumber

Chargeback.fetchByCaseNumber and fetchByReferenceNumber

Chargeback.fetchByCaseNumber and fetchByReferenceNumber

Case and reference numbers are usually assigned by payment processors to track chargebacks in their systems. Some processors assign case numbers; others, reference numbers; and some assign both. In some cases, multiple chargebacks have the same case or reference number.

The fetchByCaseNumber method returns one or more Chargeback objects whose case number matches the input. The fetchByReferenceNumber method returns one or more Chargeback objects whose reference number matches the input.

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.

For fetchByCaseNumber()caseNumber is the payment processor’s case number, which serves as the search criterion.

For fetchByReferenceNumber()referenceNumber is the payment processor’s reference number, which serves as the search criterion.

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 case or reference number matches the input.

Returns

In addition to those listed in Standard Return CodesfetchByCaseNumber also returns:

Return Code

Return String

400

One of the following:

  • Unable to load chargebacks by case number input-case-number: No match.
  • Unable to load chargebacks by case number input-case-number: error-description.
  • Must specify a case number to load by!

In addition to those listed in Standard Return CodesfetchByReferenceNumber also returns:

Return Code

Return String

400

One of the following:

  • Unable to load chargebacks by reference numberinput-reference-number: No match.
  • Unable to load chargebacks by reference numberinput-reference-number: error-description.
  • Must specify a reference number to load by!

Example

// The following example uses the fetchByCaseNumber call
// Call fetchByReferenceNumber similarly

$cb = new Chargeback();
$caseNo = "34593201";
$ret = $cb->fetchByCaseNumber($caseNo);
if ($ret['returnCode'] == 200) {
$fetchedChargebacks = $ret['chargebacks'];

if ($fetchedChargebacks != null) {

foreach ($fetchedChargebacks as $chargeback) {

// process a fetched chargeback here …

$status = $chargeback->getStatus();
$amount = $chargeback->getAmount();

}

}

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top