A payment the provider's fraud rules held for the seller to look at before it goes on (a
review, prv_... at Stripe Radar). A guarded_struct the provider fills in, read with
MishkaPay.fetch_fraud_review/3 and MishkaPay.list_fraud_reviews/3, and let through with
MishkaPay.approve_fraud_review/3. Refunding the payment closes it the other way.
:id,:payment_id,:charge_id: the review and the payment it holds.:open: whether it still waits for the seller.:opened_reason::rule(a fraud rule placed it) or:manual(someone did).:reason: why it is open or how it closed, in the provider's words ("rule","manual","approved","refunded","refunded_as_fraud","disputed","redacted"...);:closed_reasononly how it closed.:ip_address: where the buyer paid from, when the provider knows.:created_at.
Summary
Functions
A sample %MishkaPay.Payment.FraudReview{} populated from defaults + type-based fallbacks.
Types
@type t() :: %MishkaPay.Payment.FraudReview{ charge_id: String.t() | nil, closed_reason: String.t() | nil, created_at: DateTime.t() | nil, id: String.t(), ip_address: String.t() | nil, open: boolean() | nil, opened_reason: (:rule | :manual) | nil, payment_id: String.t() | nil, provider: String.t(), reason: String.t() | nil }
The struct that builder/1 returns.
| Field | Type | Required | Default | Description | Derives |
|---|---|---|---|---|---|
:provider | String.t() | yes | validate(not_nil_value, string) | ||
:id | String.t() | yes | validate(not_nil_value, string, not_empty) | ||
:payment_id | String.t() | nil | no | validate(string) | ||
:charge_id | String.t() | nil | no | validate(string) | ||
:open | boolean() | nil | no | false | validate(boolean) | |
:opened_reason | :rule | :manual | nil | no | validate(enum=Atom[rule::manual]) | ||
:reason | String.t() | nil | no | validate(string) | ||
:closed_reason | String.t() | nil | no | validate(string) | ||
:ip_address | String.t() | nil | no | validate(string) | ||
:created_at | DateTime.t() | nil | no | validate(struct) |