View Source Stripe.Issuing.Dispute (stripity_stripe v3.2.0)

As a card issuer, you can dispute transactions that the cardholder does not recognize, suspects to be fraudulent, or has other issues with.

Related guide: Issuing disputes

Summary

Types

Evidence provided for the dispute.

t()

The issuing.dispute type.

Params for disputes related to Treasury FinancialAccounts

Functions

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Retrieves an Issuing Dispute object.

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

Types

@type canceled() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:canceled_at) => integer() | binary(),
  optional(:cancellation_policy_provided) => boolean() | binary(),
  optional(:cancellation_reason) => binary() | binary(),
  optional(:expected_at) => integer() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:product_description) => binary() | binary(),
  optional(:product_type) => :merchandise | :service,
  optional(:return_status) => :merchant_rejected | :successful,
  optional(:returned_at) => integer() | binary()
}
@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type duplicate() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:card_statement) => binary() | binary(),
  optional(:cash_receipt) => binary() | binary(),
  optional(:check_image) => binary() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:original_transaction) => binary()
}
@type evidence() :: %{
  optional(:canceled) => canceled() | binary(),
  optional(:duplicate) => duplicate() | binary(),
  optional(:fraudulent) => fraudulent() | binary(),
  optional(:merchandise_not_as_described) =>
    merchandise_not_as_described() | binary(),
  optional(:not_received) => not_received() | binary(),
  optional(:other) => other() | binary(),
  optional(:reason) =>
    :canceled
    | :duplicate
    | :fraudulent
    | :merchandise_not_as_described
    | :not_received
    | :other
    | :service_not_as_described,
  optional(:service_not_as_described) => service_not_as_described() | binary()
}

Evidence provided for the dispute.

@type fraudulent() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:explanation) => binary() | binary()
}
Link to this type

merchandise_not_as_described()

View Source
@type merchandise_not_as_described() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:received_at) => integer() | binary(),
  optional(:return_description) => binary() | binary(),
  optional(:return_status) => :merchant_rejected | :successful,
  optional(:returned_at) => integer() | binary()
}
@type not_received() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:expected_at) => integer() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:product_description) => binary() | binary(),
  optional(:product_type) => :merchandise | :service
}
@type other() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:product_description) => binary() | binary(),
  optional(:product_type) => :merchandise | :service
}
Link to this type

service_not_as_described()

View Source
@type service_not_as_described() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:canceled_at) => integer() | binary(),
  optional(:cancellation_reason) => binary() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:received_at) => integer() | binary()
}
@type t() :: %Stripe.Issuing.Dispute{
  amount: integer(),
  balance_transactions: term() | nil,
  created: integer(),
  currency: binary(),
  evidence: term(),
  id: binary(),
  livemode: boolean(),
  metadata: term(),
  object: binary(),
  status: binary(),
  transaction: binary() | Stripe.Issuing.Transaction.t(),
  treasury: term() | nil
}

The issuing.dispute type.

  • amount Disputed amount in the card's currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation).
  • balance_transactions List of balance transactions associated with the dispute.
  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • currency The currency the transaction was made in.
  • evidence
  • id Unique identifier for the object.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • 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.
  • object String representing the object's type. Objects of the same type share the same value.
  • status Current status of the dispute.
  • transaction The transaction being disputed.
  • treasury Treasury details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts
@type treasury() :: %{optional(:received_debit) => binary()}

Params for disputes related to Treasury FinancialAccounts

Functions

Link to this function

create(params \\ %{}, opts \\ [])

View Source
@spec create(
  params :: %{
    optional(:amount) => integer(),
    optional(:evidence) => evidence(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()},
    optional(:transaction) => binary(),
    optional(:treasury) => treasury()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to Dispute reasons and evidence for more details about evidence requirements.

Details

  • Method: post
  • Path: /v1/issuing/disputes
Link to this function

list(params \\ %{}, opts \\ [])

View Source
@spec list(
  params :: %{
    optional(:created) => created() | integer(),
    optional(:ending_before) => binary(),
    optional(:expand) => [binary()],
    optional(:limit) => integer(),
    optional(:starting_after) => binary(),
    optional(:status) => :expired | :lost | :submitted | :unsubmitted | :won,
    optional(:transaction) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Details

  • Method: get
  • Path: /v1/issuing/disputes
Link to this function

retrieve(dispute, params \\ %{}, opts \\ [])

View Source
@spec retrieve(
  dispute :: binary(),
  params :: %{optional(:expand) => [binary()]},
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Retrieves an Issuing Dispute object.

Details

  • Method: get
  • Path: /v1/issuing/disputes/{dispute}
Link to this function

submit(dispute, params \\ %{}, opts \\ [])

View Source
@spec submit(
  dispute :: binary(),
  params :: %{
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute’s reason are present. For more details, see Dispute reasons and evidence.

Details

  • Method: post
  • Path: /v1/issuing/disputes/{dispute}/submit
Link to this function

update(dispute, params \\ %{}, opts \\ [])

View Source
@spec update(
  dispute :: binary(),
  params :: %{
    optional(:amount) => integer(),
    optional(:evidence) => evidence(),
    optional(:expand) => [binary()],
    optional(:metadata) => %{optional(binary()) => binary()} | binary()
  },
  opts :: Keyword.t()
) :: {:ok, t()} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string.

Details

  • Method: post
  • Path: /v1/issuing/disputes/{dispute}