# setup\_attempt

From **Stripe API**.

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

- Type: `object`

## Properties

### `application`

- Required: false
- Nullable: true

The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.

### `created`

- Required: true
- Type: `integer`
- Format: `unix-time`

Time at which the object was created. Measured in seconds since the Unix epoch.

### `customer`

- Required: false
- Nullable: true

The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.

### `id`

- Required: true
- Type: `string`
- maxLength: `5000`

Unique identifier for the object.

### `livemode`

- Required: true
- Type: `boolean`

Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.

### `object`

- Required: true
- Type: `string`
- Allowed values: `"setup_attempt"`

String representing the object's type. Objects of the same type share the same value.

### `on_behalf_of`

- Required: false
- Nullable: true

The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.

### `payment_method`

- Required: true
ID of the payment method used with this SetupAttempt.

### `payment_method_details`

- Required: true
- Type: `object`

### `setup_error`

- Required: false
- Nullable: true

The error encountered during this attempt to confirm the SetupIntent, if any.

### `setup_intent`

- Required: true
ID of the SetupIntent that this attempt belongs to.

### `status`

- Required: true
- Type: `string`
- maxLength: `5000`

Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.

### `usage`

- Required: true
- Type: `string`
- maxLength: `5000`

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

## JSON Schema

```json
{"description":"A SetupAttempt describes one attempted confirmation of a SetupIntent,\nwhether that confirmation was successful or unsuccessful. You can use\nSetupAttempts to inspect details of a specific attempt at setting up a\npayment method using a SetupIntent.","properties":{"application":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/application"}],"description":"The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/application"}]}},"created":{"description":"Time at which the object was created. Measured in seconds since the Unix epoch.","format":"unix-time","type":"integer"},"customer":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/customer"},{"$ref":"#/components/schemas/deleted_customer"}],"description":"The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/customer"},{"$ref":"#/components/schemas/deleted_customer"}]}},"id":{"description":"Unique identifier for the object.","maxLength":5000,"type":"string"},"livemode":{"description":"Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode.","type":"boolean"},"object":{"description":"String representing the object's type. Objects of the same type share the same value.","enum":["setup_attempt"],"type":"string"},"on_behalf_of":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/account"}],"description":"The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation.","nullable":true,"x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/account"}]}},"payment_method":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/payment_method"}],"description":"ID of the payment method used with this SetupAttempt.","x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/payment_method"}]}},"payment_method_details":{"$ref":"#/components/schemas/setup_attempt_payment_method_details"},"setup_error":{"anyOf":[{"$ref":"#/components/schemas/api_errors"}],"description":"The error encountered during this attempt to confirm the SetupIntent, if any.","nullable":true},"setup_intent":{"anyOf":[{"maxLength":5000,"type":"string"},{"$ref":"#/components/schemas/setup_intent"}],"description":"ID of the SetupIntent that this attempt belongs to.","x-expansionResources":{"oneOf":[{"$ref":"#/components/schemas/setup_intent"}]}},"status":{"description":"Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.","maxLength":5000,"type":"string"},"usage":{"description":"The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`.","maxLength":5000,"type":"string"}},"required":["created","id","livemode","object","payment_method","payment_method_details","setup_intent","status","usage"],"title":"PaymentFlowsSetupIntentSetupAttempt","type":"object","x-expandableFields":["application","customer","on_behalf_of","payment_method","payment_method_details","setup_error","setup_intent"],"x-resourceId":"setup_attempt"}
```
