Stripe.Issuing.Dispute (stripity_stripe v3.3.2)

View Source

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

canceled()

@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()
}

created()

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}

duplicate()

@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()
}

evidence()

@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(:no_valid_authorization) => no_valid_authorization() | binary(),
  optional(:not_received) => not_received() | binary(),
  optional(:other) => other() | binary(),
  optional(:reason) =>
    :canceled
    | :duplicate
    | :fraudulent
    | :merchandise_not_as_described
    | :no_valid_authorization
    | :not_received
    | :other
    | :service_not_as_described,
  optional(:service_not_as_described) => service_not_as_described() | binary()
}

Evidence provided for the dispute.

fraudulent()

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

merchandise_not_as_described()

@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()
}

no_valid_authorization()

@type no_valid_authorization() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:explanation) => binary() | binary()
}

not_received()

@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
}

other()

@type other() :: %{
  optional(:additional_documentation) => binary() | binary(),
  optional(:explanation) => binary() | binary(),
  optional(:product_description) => binary() | binary(),
  optional(:product_type) => :merchandise | :service
}

service_not_as_described()

@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()
}

t()

@type t() :: %Stripe.Issuing.Dispute{
  amount: integer(),
  balance_transactions: term() | nil,
  created: integer(),
  currency: binary(),
  evidence: term(),
  id: binary(),
  livemode: boolean(),
  loss_reason: binary(),
  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.
  • loss_reason The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values.
  • 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

treasury()

@type treasury() :: %{optional(:received_debit) => binary()}

Params for disputes related to Treasury FinancialAccounts

Functions

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

@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

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

@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

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

@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}

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

@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

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

@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}