Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt

Use this file to discover all available pages before exploring further.

What is it? The respondToDispute mutation accepts or challenges a dispute assigned to your organization. You have two options:
  1. Accept the dispute - Acknowledge the dispute’s validity and accept the chargeback
  2. Challenge the dispute - Contest the dispute by providing supporting evidence
When to Use
  • A customer has disputed a transaction with their card issuer.
  • You need to accept liability or challenge a dispute with evidence.
  • You want to respond to a chargeback within the required timeframe.
ScenarioA customer disputes a transaction at Maple Street Coffee, one of Clearpath Payments’ acceptors. Clearpath Payments decides whether to accept the dispute or challenge it with evidence that the transaction was valid.

Implementation rules

  1. The dispute must be assigned to your organization before you can respond
  2. When accepting a dispute, only the disputeId is required
  3. When challenging a dispute, both the disputeId and at least one attachmentId are required
  4. Attachment IDs are obtained by first uploading evidence files
  5. Responses must be submitted before the dispute’s expiration date
The same mutation is used for both accepting and challenging a dispute, with different input parameters:
mutation RespondToDispute($input: RespondToDisputeInput!) {
  respondToDispute(input: $input) {
    dispute {
      id
    }
    errors {
      ... on AttachmentsRequiredError {
        message
      }
      ... on ExpirationDateExceededError {
        expirationDate
        message
      }
      ... on InvalidAssignmentError {
        currentAssignment
        message
        validAssignments
      }
    }
  }
}

Accept a dispute

Use the accept input parameter with the dispute ID to accept the chargeback.
{
  "input": {
    "accept": {
      "disputeId": "d8f8a027-04ce-437c-ad4e-7d41f667c23c"
    }
  }
}

Challenge a dispute

Use the represent input parameter with the dispute ID and at least one attachment ID when you want to contest the dispute by providing evidence.
{
  "input": {
    "represent": {
      "disputeId": "daf59e49-5646-4fc2-ab71-fb32cb134c54",
      "attachmentIds": ["981e535f-8a77-4854-9e2e-4c7d136ef17c"]
    }
  }
}