Php

Chargebacks

Vatly PHP SDK - Chargebacks

Chargebacks

Chargebacks occur when a customer disputes a payment with their bank. Vatly notifies you via webhooks when chargebacks happen.

The Chargeback Resource

Below you'll find all properties for the Vatly Chargeback resource.

Properties

NameTypeDescription
idstringUnique identifier for the chargeback (chargeback_...).
resourcestringAlways chargeback.
merchantIdstringThe merchant ID.
testmodeboolWhether this is a test chargeback.
amountobjectChargeback amount (value and currency).
settlementAmountobjectAmount deducted from settlement (may differ from amount).
reasonstringReason code for the dispute (e.g. fraud, product_not_received, duplicate).
originalOrderIdstringThe ID of the original order that was disputed.
orderIdstring|nullThe credit note order ID (after processing).
createdAtstringCreation timestamp (ISO 8601).

Retrieve a chargeback

GET /v1/chargebacks/:id

Retrieve a chargeback by its ID.

$chargeback = $vatly->chargebacks->get('chargeback_abc123');

echo $chargeback->reason;
echo $chargeback->amount->value . ' ' . $chargeback->amount->currency;
echo $chargeback->originalOrderId;

List all chargebacks

GET /v1/chargebacks

Retrieve a paginated list of all chargebacks.

Optional attributes

NameTypeDescription
limitintegerThe number of chargebacks to return (default: 10, max: 100).
startingAfterstringA cursor for pagination.
$chargebacks = $vatly->chargebacks->list();

foreach ($chargebacks as $chargeback) {
    echo $chargeback->id . ': ' . $chargeback->reason;
}
Copyright © 2026