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.

Ruby
Copy
Copied
collection = gateway.dispute.search do |search|
  search.id.is "dispute_id"
end

collection.disputes.each do |dispute|
  puts dispute.id
end
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.
Parameters
:amount_disputed range

The decimal value representing the disputed amount.

:amount_won range

The decimal value representing the reserved amount.

:case_number text

The case number of the dispute.

:customer_id text

The unique customer identifier associated with the disputed transaction.

:disbursement_date range

The disbursement date of the dispute history event.

:effective_date range

The effective date of the dispute history event.

:id text

The unique dispute identifier.

:kind multiple

The kind of dispute.

:merchant_account_id 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.

:reason_code multiple

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

:received_date range

The date the dispute was received by the merchant.

:reference_number text

The reference number of the dispute.

:reply_by_date 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.

:transaction_id text

The unique identifier for the disputed transaction.

:transaction_source multiple

How a transaction was created. Possible values:

  • Api
  • ControlPanel
  • Recurring

Examples

Multiple kinds

This example shows searches on the kind parameter:

Ruby
Copy
Copied
search_results = gateway.dispute.search do |search|
  search.kind.in(
    Braintree::Dispute::Kind::Chargeback,
    Braintree::Dispute::Kind::Retrieval,
  )
end
This code snippet now uses gateway instance methods instead of class-level methods. Learn more.

Amount disputed range

This example shows searches on the amount_disputed parameter:

Ruby
Copy
Copied
search_results = gateway.dispute.search do |search|
  search.amount_disputed.between "100.00", "200.00"
end
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