Skip to main content

Disputes

Challenges a customer raises against a charge (already paid, wrong amount, not recognized…). There is no delete: the workflow moves through update, which runs an action — start_review, resolve or cancel.

CommandHTTPDescription
disputes listGET /v1/disputesList disputes
disputes createPOST /v1/disputesOpen dispute
disputes getGET /v1/disputes/{id}Get dispute
disputes updatePATCH /v1/disputes/{id}Run dispute action

Examples​

--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# Open disputes
kobana dunning disputes list --params '{"status": "open"}'

# Open a dispute
kobana dunning disputes create \
--json '{"charge_id": "CHARGE_ID", "type": "already_paid", "reason": "Pago via Pix em 02/08"}'

# Start the review
kobana dunning disputes update \
--params '{"id": "DISPUTE_ID"}' \
--json '{"action": "start_review"}'

# Resolve as valid and cancel the charge
kobana dunning disputes update \
--params '{"id": "DISPUTE_ID"}' \
--json '{"action": "resolve", "decision": "valid", "resolution": "Pagamento confirmado", "effect": "cancel_charge"}' --dry-run

Next steps​