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
endParameters
:amount_disputedrangeThe decimal value representing the disputed amount.
:amount_wonrangeThe decimal value representing the reserved amount.
:case_numbertextThe case number of the dispute.
:chargeback_protection_levelmultipleThe chargeback protection level of the dispute. Possible values:
- EFFORTLESS
- STANDARD
- NOT_PROTECTED
:customer_idtextThe unique customer identifier associated with the disputed transaction.
:disbursement_daterangeThe disbursement date of the dispute history event.
:effective_daterangeThe effective date of the dispute history event.
:idtextThe unique dispute identifier.
:kindmultipleThe kind of dispute.
:merchant_account_idmultipleThe ID of the merchant account this dispute is for.
A fragment of the merchant account ID to search for.
:containstextA part of the merchant account ID to search for.
:ends_withtextA postfix for the merchant account ID to search for.
:istextAn exact merchant account ID to search for.
:is_nottextA merchant account ID to be excluded from the search.
:starts_withtextA prefix for the merchant account ID to search for.
:pre_dispute_programmultipleThe pre-dispute program of the dispute. Possible values:
- VISA_RDR
- NONE
:reasonmultipleThe reason for the dispute. See reasons on the dispute response object for possible values.
:reason_codemultipleThe raw reason code provided by the processor (e.g. 83).
:received_daterangeThe date the dispute was received by the merchant.
The reference number of the dispute.
:reply_by_daterangeThe merchant Reply By date that is referenced in the gateway.
:statusmultipleThe status of the dispute. Possible values:
- ACCEPTED
- AUTO_ACCEPTED
- DISPUTED
- EXPIRED
- OPEN
- LOST
- WON
See dispute statuses for more details.
:transaction_idtextThe unique identifier for the disputed transaction.
:transaction_sourcemultipleHow 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
)
endAmount 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