# `Stripe.Resources.SetupAttempt`
[🔗](https://github.com/jeffhuen/tiger_stripe/blob/main/lib/stripe/resources/setup_attempt.ex#L2)

PaymentFlowsSetupIntentSetupAttempt

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.

# `t`

```elixir
@type t() :: %Stripe.Resources.SetupAttempt{
  application: String.t() | Stripe.Resources.Application.t(),
  attach_to_self: boolean() | nil,
  created: integer(),
  customer: String.t() | Stripe.Resources.Customer.t(),
  customer_account: String.t(),
  flow_directions: [String.t()],
  id: String.t(),
  livemode: boolean(),
  object: String.t(),
  on_behalf_of: String.t() | Stripe.Resources.Account.t(),
  payment_method: String.t() | Stripe.Resources.PaymentMethod.t(),
  payment_method_details:
    Stripe.Resources.SetupAttempt.PaymentMethodDetails.t(),
  setup_error: Stripe.Resources.StripeError.t(),
  setup_intent: String.t() | Stripe.Resources.SetupIntent.t(),
  status: String.t(),
  usage: String.t()
}
```

* `application` - The value of [application](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. Nullable. Expandable.
* `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. Format: Unix timestamp.
* `customer` - The value of [customer](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. Nullable. Expandable.
* `customer_account` - The value of [customer_account](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation. Max length: 5000. Nullable.
* `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. Nullable.
* `id` - Unique identifier for the object. Max length: 5000.
* `livemode` - If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
* `object` - String representing the object's type. Objects of the same type share the same value. Possible values: `setup_attempt`.
* `on_behalf_of` - The value of [on_behalf_of](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. Nullable. Expandable.
* `payment_method` - ID of the payment method used with this SetupAttempt. Expandable.
* `payment_method_details` - Expandable.
* `setup_error` - The error encountered during this attempt to confirm the SetupIntent, if any. Nullable. Expandable.
* `setup_intent` - ID of the SetupIntent that this attempt belongs to. Expandable.
* `status` - Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. Max length: 5000.
* `usage` - The value of [usage](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. Max length: 5000.

# `expandable_fields`

# `object_name`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
