Dispute: Search
Note
Results are limited according to the PayPal Data Protection Addendum For Card Processing Products policy.
Availability
Managing disputes via the API is only available to merchants who can access disputes in the
Braintree Control Panel.
- Ruby
collection = gateway.dispute.search do |search|
search.id.is "dispute_id"
end
collection.disputes.each do |dispute|
puts dispute.id
end
Parameters
:amount_disputed
rangeThe decimal value representing the disputed amount.
:amount_won
rangeThe decimal value representing the reserved amount.
:case_number
textThe case number of the dispute.
:chargeback_protection_level
multipleThe chargeback protection level of the dispute. Possible values:
- EFFORTLESS
- STANDARD
- NOT_PROTECTED
:customer_id
textThe unique customer identifier associated with the disputed transaction.
:disbursement_date
rangeThe disbursement date of the dispute history event.
:effective_date
rangeThe effective date of the dispute history event.
:id
textThe unique dispute identifier.
:kind
multipleThe kind of dispute.
:merchant_account_id
multipleThe ID of the merchant account this dispute is for.
A fragment of the merchant account ID to search for.
:contains
textA part of the merchant account ID to search for.
:ends_with
textA postfix for the merchant account ID to search for.
:is
textAn exact merchant account ID to search for.
:is_not
textA merchant account ID to be excluded from the search.
:starts_with
textA prefix for the merchant account ID to search for.
:pre_dispute_program
multipleThe pre-dispute program of the dispute. Possible values:
- VISA_RDR
- NONE
:reason
multipleThe reason for the dispute. See reasons on the dispute response object for possible values.
:reason_code
multipleThe raw reason code provided by the processor (e.g. 83).
:received_date
rangeThe date the dispute was received by the merchant.
The reference number of the dispute.
:reply_by_date
rangeThe merchant Reply By date that is referenced in the gateway.
:status
multipleThe status of the dispute. Possible values:
- ACCEPTED
- AUTO_ACCEPTED
- DISPUTED
- EXPIRED
- OPEN
- LOST
- WON
See dispute statuses for more details.
:transaction_id
textThe unique identifier for the disputed transaction.
:transaction_source
multipleHow 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:
- Ruby
search_results = gateway.dispute.search do |search|
search.kind.in(
Braintree::Dispute::Kind::Chargeback,
Braintree::Dispute::Kind::Retrieval
)
end
Amount disputed range
This example shows searches on the amount_disputed parameter:
- Ruby
search_results = gateway.dispute.search do |search|
search.amount_disputed.between "100.00", "200.00"
end