View Source Stripe.Review (stripity_stripe v3.2.0)

Reviews can be used to supplement automated fraud detection with human expertise.

Learn more about Radar and reviewing payments here.

Summary

Types

t()

The review type.

Functions

Approves a Review object, closing it and removing it from the list of reviews.

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Retrieves a Review object.

Types

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type t() :: %Stripe.Review{
  billing_zip: binary() | nil,
  charge: (binary() | Stripe.Charge.t()) | nil,
  closed_reason: binary() | nil,
  created: integer(),
  id: binary(),
  ip_address: binary() | nil,
  ip_address_location: term() | nil,
  livemode: boolean(),
  object: binary(),
  open: boolean(),
  opened_reason: binary(),
  payment_intent: binary() | Stripe.PaymentIntent.t(),
  reason: binary(),
  session: term() | nil
}

The review type.

  • billing_zip The ZIP or postal code of the card used, if applicable.
  • charge The charge associated with this review.
  • closed_reason The reason the review was closed, or null if it has not yet been closed. One of approved, refunded, refunded_as_fraud, disputed, or redacted.
  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • id Unique identifier for the object.
  • ip_address The IP address where the payment originated.
  • ip_address_location Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address.
  • livemode Has the value true if the object exists in live mode or the value false if the object exists in test mode.
  • object String representing the object's type. Objects of the same type share the same value.
  • open If true, the review needs action.
  • opened_reason The reason the review was opened. One of rule or manual.
  • payment_intent The PaymentIntent ID associated with this review, if one exists.
  • reason The reason the review is currently open or closed. One of rule, manual, approved, refunded, refunded_as_fraud, disputed, or redacted.
  • session Information related to the browsing session of the user who initiated the payment.

Functions

Link to this function

approve(review, params \\ %{}, opts \\ [])

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

Approves a Review object, closing it and removing it from the list of reviews.

Details

  • Method: post
  • Path: /v1/reviews/{review}/approve
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()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first.

Details

  • Method: get
  • Path: /v1/reviews
Link to this function

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

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

Retrieves a Review object.

Details

  • Method: get
  • Path: /v1/reviews/{review}