Sample - Stripe API
GET/v1/setup_attempts

List SetupIntent attempts

Lists SetupAttempts associated with a specified SetupIntent. Supply setup_intent to scope the results, and use created, limit, and cursor parameters to filter and paginate the attempts.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

6 parameters
createdobjectoptional
Filters attempts by creation time using an integer Unix timestamp or a range with `gt`, `gte`, `lt`, or `lte`.
ending_beforestringoptional
Object ID cursor for retrieving the previous page of attempts; the value can be at most 5000 characters.
expandarray<string>optional
Fields to expand in each SetupAttempt response; each value can be at most 5000 characters.
limitintegeroptional
Number of attempts to return, from 1 to 100. Defaults to 10 when omitted.
setup_intentstringrequired
The SetupIntent identifier whose attempts to retrieve, up to 5000 characters.
starting_afterstringoptional
Object ID cursor for retrieving the next page of attempts; the value can be at most 5000 characters.

2 status codes
200Returns a list object containing SetupAttempt resources in `data`, a `has_more` pagination indicator, the `list` object type, and the collection `url`.
dataarray<SetupAttempt>required
has_morebooleanrequired
True if this list has another page of items after this one that can be fetched.
objectstringrequired
String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Allowed:list
urlstringrequired
The URL where this list can be accessed.
defaultError response.
errorobjectrequired

Error handling

setup_intent must identify the SetupIntent whose attempts you want to list and can be at most 5000 characters. limit must be between 1 and 100 and defaults to 10 when omitted; created accepts an integer Unix timestamp or a range using gt, gte, lt, or lte.