Skip to main content
Vindicia Knowledge Center

Refund.report

Refund.report

Refund.report

Call the report method to report refunds that were issued outside of CashBox. Use this method to report ChargeGuard information to Vindicia for chargeback disputes. Unlike the perform() call, report() does not process refunds with your payment processor, but simply stores the Refund objects reported in the Vindicia database.

If the Refund object passed in this call refers to a Transaction that does not exist in the CashBox database, this call creates and stores the Transaction there. CashBox expects that, as a ChargeGuard customer, if you are reporting a refund on a transaction, you have previously reported that transaction to Vindicia. If you have not done so, however, this call creates a Transaction object in CashBox according to the information you include in the call.

Note For ChargeGuard customers: If a chargeback against a transaction exists, be sure to report the refund you issued for it. Doing so automatically means that you have won the chargeback.

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.

refunds: an array of one or more Refund objects to report. Leave the VID attribute blank because CashBox will assign VIDs when creating the corresponding database records, and will return them to you with the Refund objects in the output.

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. This array corresponds to your input array. If the return code is 200, all Refund objects in this array have CashBox-assigned VIDs, because CashBox has created records in its database for each of those objects.

Returns

In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String

400

Unable to save refunds: error-description.

Example

// to report a refund issued outside of CashBox

$refundVid = 'MyVindiciaRefundVID';

// Create a refund object

$refund1 = new Refund();
$refund1->setMerchantRefundId('REF101');

$transaction1 = new Transaction();

// merchant ID of a previously reported transaction

$transaction1->setMerchantTransactionId('TX101');

$refund1->setTransaction($transaction1);
$refund1->setAmount(5.99);
$refund1->setNote('Refunded due to service outage');

// Payment Processor's refund id when you processed
// this refund with it directly – if available

$refund1->setReferenceString('2033992');

// Create another refund object

$refund2 = new Refund();
$refund2->setMerchantRefundId('REF102');

$transaction2 = new Transaction();

// merchant ID of a previously reported transaction

$transaction1->setMerchantTransactionId('TX102');

$refund2->setTransaction($transaction2);
$refund2->setAmount(10.99);
$refund2->setNote('Customer did not receive delivery);

$soap_refund = new Refund();
$response = $soap_refund->report(array($refund1, $refund2));
if($response['returnCode'] == 200) {

print ("All refunds submitted successfully");

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top