Returns a collection of Dispute response objects.

availability

Managing disputes via the API is only available to merchants who can access disputes in the Braintree Control Panel.

For operators available on search fields, see the search fields page.

PHP
Copy
Copied
$collection = $gateway->dispute()->search([
  Braintree\DisputeSearch::id()->is('dispute_id')
]);

foreach($collection as $dispute) {
  echo $customer->id;
}
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.
Parameters
'amountDisputed' range

The decimal value representing the disputed amount.

'amountWon' range

The decimal value representing the reserved amount.

'caseNumber' text

The case number of the dispute.

'customerId' text

The unique customer identifier associated with the disputed transaction.

'disbursementDate' range

The disbursement date of the dispute history event.

'effectiveDate' range

The effective date of the dispute history event.

'id' text

The unique dispute identifier.

'kind' multiple

The kind of dispute.

'merchantAccountId' multiple

The ID of the merchant account this dispute is for.

'reason' multiple

The reason for the dispute. See reasons on the dispute response object for possible values.

'reasonCode' multiple

The raw reason code provided by the processor (e.g. 83).

'receivedDate' range

The date the dispute was received by the merchant.

'referenceNumber' text

The reference number of the dispute.

'replyByDate' range

The merchant Reply By date that is referenced in the gateway.

'status' multiple

The status of the dispute. Possible values:

  • ACCEPTED
  • DISPUTED
  • EXPIRED
  • OPEN
  • LOST
  • WON

See dispute statuses for more details.

'transactionId' text

The unique identifier for the disputed transaction.

'transactionSource' multiple

How a transaction was created. Possible values:

  • API
  • CONTROL_PANEL
  • RECURRING
  • OAuth application client ID of the transaction facilitator

Examples

Multiple kinds

This example shows searches on the kind parameter:

PHP
Copy
Copied
$collection = $gateway->dispute()->search([
  Braintree\DisputeSearch::kind()->in(
    [
      Braintree\Dispute::CHARGEBACK,
      Braintree\Dispute::RETRIEVAL
    ]
  )
]);
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

Amount disputed range

This example shows searches on the amountDisputed parameter:

PHP
Copy
Copied
$collection = $gateway->dispute()->search([
  Braintree\DisputeSearch::amountDisputed()->between('100', '200')
]);
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

Still have questions?

If you can’t find an answer, contact our Support team