View Source Stripe.SetupAttempt (stripity_stripe v3.1.1)

A SetupAttempt describes one attempted confirmation of a SetupIntent, whether that confirmation is successful or unsuccessful. You can use SetupAttempts to inspect details of a specific attempt at setting up a payment method using a SetupIntent.

Link to this section Summary

Types

t()

The setup_attempt type.

Functions

Returns a list of SetupAttempts that associate with a provided SetupIntent.

Link to this section Types

@type created() :: %{
  optional(:gt) => integer(),
  optional(:gte) => integer(),
  optional(:lt) => integer(),
  optional(:lte) => integer()
}
@type t() :: %Stripe.SetupAttempt{
  application: (binary() | term()) | nil,
  attach_to_self: boolean(),
  created: integer(),
  customer: (binary() | Stripe.Customer.t() | Stripe.DeletedCustomer.t()) | nil,
  flow_directions: term() | nil,
  id: binary(),
  livemode: boolean(),
  object: binary(),
  on_behalf_of: (binary() | Stripe.Account.t()) | nil,
  payment_method: binary() | Stripe.PaymentMethod.t(),
  payment_method_details: term(),
  setup_error: Stripe.ApiErrors.t() | nil,
  setup_intent: binary() | Stripe.SetupIntent.t(),
  status: binary(),
  usage: binary()
}

The setup_attempt type.

  • application The value of application on the SetupIntent at the time of this confirmation.
  • attach_to_self If present, the SetupIntent's payment method will be attached to the in-context Stripe Account.

It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer.

  • created Time at which the object was created. Measured in seconds since the Unix epoch.
  • customer The value of customer on the SetupIntent at the time of this confirmation.
  • flow_directions Indicates the directions of money movement for which this payment method is intended to be used.

Include inbound if you intend to use the payment method as the origin to pull funds from. Include outbound if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes.

  • 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.
  • object String representing the object's type. Objects of the same type share the same value.
  • on_behalf_of The value of on_behalf_of on the SetupIntent at the time of this confirmation.
  • payment_method ID of the payment method used with this SetupAttempt.
  • payment_method_details
  • setup_error The error encountered during this attempt to confirm the SetupIntent, if any.
  • setup_intent ID of the SetupIntent that this attempt belongs to.
  • status Status of this SetupAttempt, one of requires_confirmation, requires_action, processing, succeeded, failed, or abandoned.
  • usage The value of usage on the SetupIntent at the time of this confirmation, one of off_session or on_session.

Link to this section Functions

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(:setup_intent) => binary(),
    optional(:starting_after) => binary()
  },
  opts :: Keyword.t()
) ::
  {:ok, Stripe.List.t(t())} | {:error, Stripe.ApiErrors.t()} | {:error, term()}

Returns a list of SetupAttempts that associate with a provided SetupIntent.

Details

  • Method: get
  • Path: /v1/setup_attempts