Class Dispute

All Implemented Interfaces:
BalanceTransactionSource, HasId, MetadataStore<Dispute>, StripeActiveObject, StripeObjectInterface

public class Dispute extends ApiResource implements MetadataStore<Dispute>, BalanceTransactionSource
A dispute occurs when a customer questions your charge with their card issuer. When this happens, you have the opportunity to respond to the dispute with evidence that shows that the charge is legitimate.

Related guide: Disputes and fraud

  • Constructor Details

    • Dispute

      public Dispute()
  • Method Details

    • getCharge

      public String getCharge()
      Get ID of expandable charge object.
    • setCharge

      public void setCharge(String id)
    • getChargeObject

      public Charge getChargeObject()
      Get expanded charge.
    • setChargeObject

      public void setChargeObject(Charge expandableObject)
    • getPaymentIntent

      public String getPaymentIntent()
      Get ID of expandable paymentIntent object.
    • setPaymentIntent

      public void setPaymentIntent(String id)
    • getPaymentIntentObject

      public PaymentIntent getPaymentIntentObject()
      Get expanded paymentIntent.
    • setPaymentIntentObject

      public void setPaymentIntentObject(PaymentIntent expandableObject)
    • close

      public Dispute close() throws StripeException
      Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

      The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

      Throws:
      StripeException
    • close

      public Dispute close(RequestOptions options) throws StripeException
      Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

      The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

      Throws:
      StripeException
    • close

      public Dispute close(Map<String,Object> params) throws StripeException
      Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

      The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

      Throws:
      StripeException
    • close

      public Dispute close(Map<String,Object> params, RequestOptions options) throws StripeException
      Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

      The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

      Throws:
      StripeException
    • close

      public Dispute close(DisputeCloseParams params) throws StripeException
      Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

      The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

      Throws:
      StripeException
    • close

      public Dispute close(DisputeCloseParams params, RequestOptions options) throws StripeException
      Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost.

      The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible.

      Throws:
      StripeException
    • list

      public static DisputeCollection list(Map<String,Object> params) throws StripeException
      Returns a list of your disputes.
      Throws:
      StripeException
    • list

      public static DisputeCollection list(Map<String,Object> params, RequestOptions options) throws StripeException
      Returns a list of your disputes.
      Throws:
      StripeException
    • list

      public static DisputeCollection list(DisputeListParams params) throws StripeException
      Returns a list of your disputes.
      Throws:
      StripeException
    • list

      public static DisputeCollection list(DisputeListParams params, RequestOptions options) throws StripeException
      Returns a list of your disputes.
      Throws:
      StripeException
    • retrieve

      public static Dispute retrieve(String dispute) throws StripeException
      Retrieves the dispute with the given ID.
      Throws:
      StripeException
    • retrieve

      public static Dispute retrieve(String dispute, RequestOptions options) throws StripeException
      Retrieves the dispute with the given ID.
      Throws:
      StripeException
    • retrieve

      public static Dispute retrieve(String dispute, Map<String,Object> params, RequestOptions options) throws StripeException
      Retrieves the dispute with the given ID.
      Throws:
      StripeException
    • retrieve

      public static Dispute retrieve(String dispute, DisputeRetrieveParams params, RequestOptions options) throws StripeException
      Retrieves the dispute with the given ID.
      Throws:
      StripeException
    • update

      public Dispute update(Map<String,Object> params) throws StripeException
      When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

      Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

      Specified by:
      update in interface MetadataStore<Dispute>
      Throws:
      StripeException
    • update

      public Dispute update(Map<String,Object> params, RequestOptions options) throws StripeException
      When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

      Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

      Specified by:
      update in interface MetadataStore<Dispute>
      Throws:
      StripeException
    • update

      public Dispute update(DisputeUpdateParams params) throws StripeException
      When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

      Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

      Throws:
      StripeException
    • update

      public Dispute update(DisputeUpdateParams params, RequestOptions options) throws StripeException
      When you get a dispute, contacting your customer is always the best first step. If that doesn’t work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your dashboard, but if you prefer, you can use the API to submit evidence programmatically.

      Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our guide to dispute types.

      Throws:
      StripeException
    • setResponseGetter

      public void setResponseGetter(StripeResponseGetter responseGetter)
      The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The Network code map lists all available dispute reason codes by network.
      Specified by:
      setResponseGetter in interface StripeActiveObject
      Overrides:
      setResponseGetter in class ApiResource
      Parameters:
      responseGetter - the StripeResponseGetter instance to use for making further requests.
    • getAmount

      public Long getAmount()
      Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
    • getBalanceTransactions

      public List<BalanceTransaction> getBalanceTransactions()
      List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
    • getCreated

      public Long getCreated()
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • getCurrency

      public String getCurrency()
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • getEvidence

      public Dispute.Evidence getEvidence()
    • getEvidenceDetails

      public Dispute.EvidenceDetails getEvidenceDetails()
    • getIsChargeRefundable

      public Boolean getIsChargeRefundable()
      If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
    • getLivemode

      public Boolean getLivemode()
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • getNetworkReasonCode

      public String getNetworkReasonCode()
      Network-dependent reason code for the dispute.
    • getObject

      public String getObject()
      String representing the object's type. Objects of the same type share the same value.

      Equal to dispute.

    • getPaymentMethodDetails

      public Dispute.PaymentMethodDetails getPaymentMethodDetails()
    • getReason

      public String getReason()
      Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Learn more about dispute reasons.
    • getStatus

      public String getStatus()
      Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, or lost.

      One of lost, needs_response, under_review, warning_closed, warning_needs_response, warning_under_review, or won.

    • setAmount

      public void setAmount(Long amount)
      Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed).
    • setBalanceTransactions

      public void setBalanceTransactions(List<BalanceTransaction> balanceTransactions)
      List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute.
    • setCreated

      public void setCreated(Long created)
      Time at which the object was created. Measured in seconds since the Unix epoch.
    • setCurrency

      public void setCurrency(String currency)
      Three-letter ISO currency code, in lowercase. Must be a supported currency.
    • setEvidence

      public void setEvidence(Dispute.Evidence evidence)
    • setEvidenceDetails

      public void setEvidenceDetails(Dispute.EvidenceDetails evidenceDetails)
    • setId

      public void setId(String id)
      Unique identifier for the object.
    • setIsChargeRefundable

      public void setIsChargeRefundable(Boolean isChargeRefundable)
      If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute.
    • setLivemode

      public void setLivemode(Boolean livemode)
      Has the value true if the object exists in live mode or the value false if the object exists in test mode.
    • setMetadata

      public void setMetadata(Map<String,String> metadata)
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
    • setNetworkReasonCode

      public void setNetworkReasonCode(String networkReasonCode)
      Network-dependent reason code for the dispute.
    • setObject

      public void setObject(String object)
      String representing the object's type. Objects of the same type share the same value.

      Equal to dispute.

    • setPaymentMethodDetails

      public void setPaymentMethodDetails(Dispute.PaymentMethodDetails paymentMethodDetails)
    • setReason

      public void setReason(String reason)
      Reason given by cardholder for dispute. Possible values are bank_cannot_process, check_returned, credit_not_processed, customer_initiated, debit_not_authorized, duplicate, fraudulent, general, incorrect_account_details, insufficient_funds, product_not_received, product_unacceptable, subscription_canceled, or unrecognized. Learn more about dispute reasons.
    • setStatus

      public void setStatus(String status)
      Current status of dispute. Possible values are warning_needs_response, warning_under_review, warning_closed, needs_response, under_review, won, or lost.

      One of lost, needs_response, under_review, warning_closed, warning_needs_response, warning_under_review, or won.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getId

      public String getId()
      Unique identifier for the object.
      Specified by:
      getId in interface HasId
    • getMetadata

      public Map<String,String> getMetadata()
      Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
      Specified by:
      getMetadata in interface MetadataStore<Dispute>