MishkaPay.Payment.FraudWarning (Mishka Pay v0.0.1)

Copy Markdown View Source

A card issuer's early warning that a payment looks like fraud (an early fraud warning, issfr_... at Stripe Radar), often days before the buyer's bank opens a dispute. A guarded_struct the provider fills in, read with MishkaPay.fetch_fraud_warning/3 and MishkaPay.list_fraud_warnings/3.

  • :id, :payment_id, :charge_id: the warning and the payment it is about.
  • :fraud_type: the issuer's kind of fraud, in the provider's words ("made_with_stolen_card", "unauthorized_use_of_card", "card_never_received"...).
  • :actionable: whether a refund can still head off a dispute: the payment is not refunded or disputed yet. Refunding an actionable warning's payment in full usually stops the dispute and its fee.
  • :created_at.

Summary

Types

t()

The struct that builder/1 returns.

Functions

A sample %MishkaPay.Payment.FraudWarning{} populated from defaults + type-based fallbacks.

Types

t()

@type t() :: %MishkaPay.Payment.FraudWarning{
  actionable: boolean() | nil,
  charge_id: String.t() | nil,
  created_at: DateTime.t() | nil,
  fraud_type: String.t() | nil,
  id: String.t(),
  payment_id: String.t() | nil,
  provider: String.t()
}

The struct that builder/1 returns.

FieldTypeRequiredDefaultDescriptionDerives
:providerString.t()yesvalidate(not_nil_value, string)
:idString.t()yesvalidate(not_nil_value, string, not_empty)
:payment_idString.t() | nilnovalidate(string)
:charge_idString.t() | nilnovalidate(string)
:fraud_typeString.t() | nilnovalidate(string)
:actionableboolean() | nilnofalsevalidate(boolean)
:created_atDateTime.t() | nilnovalidate(struct)

Functions

builder(attrs_or_input, error \\ false)

enforce_keys()

enforce_keys(field)

example()

A sample %MishkaPay.Payment.FraudWarning{} populated from defaults + type-based fallbacks.

keys()

keys(field)