# Calculate dispute countered fees

A dispute countered fee is incurred when you submit evidence to counter a dispute, with a few exceptions:
* Inquiries
* Disputes on non-card payment methods
* The third or later dispute for the same payment
* When Stripe submits evidence to counter a dispute on your behalf with SmartDisputes
The fee is also incurred on evidence uploaded by you and auto-submitted before the deadline by Stripe. You can turn off auto-submission on the [Dispute settings](https://dashboard.stripe.com/settings/disputes) page.
---
### View dispute countered fees in the Dashboard
You can see the fee in the Dashboard. From the [Disputes](https://dashboard.stripe.com/disputes) page, navigate to the **Payment Detail** page by clicking a dispute and find the **Dispute countered fee** under **Fees** in the **Payment Breakdown**.
### Calculate dispute countered fees using a webhook
The dispute countered fee is applied directly to your account balance via a balance transfer. The fee is not shown in the `balance_transactions` field of the Dispute API object.
To calculate the total amount charged for dispute countered fees, you can use the Stripe API to identify disputes that were charged the fee. We recommend setting up a [webhook](https://docs.stripe.com/webhooks) to listen to [dispute closed events](https://docs.stripe.com/api/events/types#event_types-charge.dispute.closed) to determine if the dispute incurred the fee. See below for an example webhook in Ruby:
```
dispute = data.object
disputes_on_charge = Stripe::Dispute.list({charge_id: dispute.charge})
is_fee_incurred = 
  # dispute countered
  dispute.evidence_details.submission_count > 0 &&
  # card payments only
  !dispute.charge.nil? && 
  # chargebacks only
  !dispute.status.start_with? ‘warning’ && 
  # first or second dispute on this payment only
  disputes_on_charge.sort_by(&:created).map(&:id).find_index(dispute.id) <= 1 && 
  # Only necessary for merchants using Smart Disputes
  # Smart Dispute evidence do not incur the fee
  dispute.evidence_details.submission_method != 'smart_disputes' && 
  # Evidence submitted was merchant's own manually crafted evidence
  dispute.has_evidence && 
  # fee is returned on won disputes
  dispute.status != ‘won’ 
```
Multiply the number of disputes that incurred the fee by the dispute countered fee [sticker price](https://stripe.com/pricing), or the price in your pricing agreement if you have negotiated pricing.
If a lost dispute is overturned by the card network or issuing bank we will return the dispute countered fee to you. Set up a webhook to listen to [dispute funds reinstated events](https://docs.stripe.com/api/events/types#event_types-charge.dispute.funds_reinstated).
