Python SDK
Chargebacks
Read payment disputes and retain their financial snapshots for accounting.
Read payment disputes and retain their financial snapshots for accounting. Chargeback methods are read-only. Examples accept the client from setup.
from vatly import VatlyClient
def example(client: VatlyClient):
chargeback = client.chargebacks.get("chargeback_example")
all_disputes = list(client.chargebacks.list_all({"limit": 25}))
order_disputes = list(client.orders.list_all_chargebacks("order_example"))
scoped = client.orders.get_chargeback("order_example", "chargeback_example")
return chargeback, all_disputes, order_disputes, scoped
| Input | Meaning |
|---|---|
| Chargeback ID | chargeback_... from Vatly |
| Order ID | Required for the orders-scoped methods |
limit, startingAfter, endingBefore | List size and exclusive pagination cursors |
| Response field | Meaning |
|---|---|
id, resource | Identifier; resource is chargeback |
original_order_id | Disputed order |
lines | Financial line snapshots |
testmode, links | Mode and resource links |
order.chargeback_received and order.chargeback_reversed events contain a
Chargeback object even though entityType is order. Inspect event.object.resource,
not just the envelope's entity type. Verify the signature first.