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 allows partners to accept or challenge a dispute that has been assigned to them. This mutation provides 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.
ScenarioWhen a customer disputes a transaction for a purchase they made at a Maple Street Coffee with their credit card, the dispute is assigned to Clearpath Payments. Clearpath Payments then decides whether to accept liability for the dispute, or challenge the customer’s dispute by providing evidence that the transaction was valid.

Implementation rules

  1. The dispute must be assigned to the partner to respond to it
  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 when you don’t want to challenge the dispute and are willing 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"]
    }
  }
}