# The SetupAttempt object

### The SetupAttempt object

```json
{
  "id": "setatt_1ErTsH2eZvKYlo2CI7ukcoF7",
  "object": "setup_attempt",
  "application": null,
  "created": 1562004309,
  "customer": null,
  "flow_directions": null,
  "livemode": false,
  "on_behalf_of": null,
  "payment_method": "pm_1ErTsG2eZvKYlo2CH0DNen59",
  "payment_method_details": {
    "card": {
      "three_d_secure": null
    },
    "type": "card"
  },
  "setup_error": null,
  "setup_intent": "seti_1ErTsG2eZvKYlo2CKaT8MITz",
  "status": "succeeded",
  "usage": "off_session"
}
```

## Attributes

- `id` (string)
  Unique identifier for the object.

- `object` (string)
  String representing the object’s type. Objects of the same type share the same value.

- `application` (string, nullable, expandable (can be expanded into an object with the `expand` request parameter))
  The value of [application](https://docs.stripe.com/docs/api/setup_intents/object.md#setup_intent_object-application) on the SetupIntent at the time of this confirmation.

- `attach_to_self` (boolean, nullable)
  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` (timestamp)
  Time at which the object was created. Measured in seconds since the Unix epoch.

- `customer` (string, nullable, expandable (can be expanded into an object with the `expand` request parameter))
  The value of [customer](https://docs.stripe.com/docs/api/setup_intents/object.md#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.

- `customer_account` (string, nullable)
  The value of [customer_account](https://docs.stripe.com/docs/api/setup_intents/object.md#setup_intent_object-customer_account) on the SetupIntent at the time of this confirmation.

- `flow_directions` (array of enums, nullable)
  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.
Possible enum values:
  - `inbound`
  - `outbound`

- `livemode` (boolean)
  Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

- `on_behalf_of` (string, nullable, expandable (can be expanded into an object with the `expand` request parameter))
  The value of [on_behalf_of](https://docs.stripe.com/docs/api/setup_intents/object.md#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.

- `payment_method` (string, expandable (can be expanded into an object with the `expand` request parameter))
  ID of the payment method used with this SetupAttempt.

- [`payment_method_details`](https://docs.stripe.com/api/setup_attempts/object.md?query=payment_method_details) (object)
  Details about the payment method at the time of SetupIntent confirmation.

- [`setup_error`](https://docs.stripe.com/api/setup_attempts/object.md?query=setup_error) (object, nullable)
  The error encountered during this attempt to confirm the SetupIntent, if any.

- `setup_intent` (string, expandable (can be expanded into an object with the `expand` request parameter))
  ID of the SetupIntent that this attempt belongs to.

- `status` (string)
  Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.

- `usage` (string)
  The value of [usage](https://docs.stripe.com/docs/api/setup_intents/object.md#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.
