Skip to content

Stripe: List all Setup Attempts

Stripe setupAttempts.getSetupAttempts: arguments, response, policy and SDK examples.

← Setup attempts operations · Get started

Operation stripe.getsetupattempts

Provider route: GET /v1/setup_attempts. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["setupAttempts"]["getSetupAttempts"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.setupAttempts.getSetupAttempts(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.setup_attempts.get_setup_attempts(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectRequired within parentAdditional keys: not allowed
query.createdJSONOptional
query.created (anyOf 1)objectAlternative
query.created (anyOf 1).gtintegerOptional
query.created (anyOf 1).gteintegerOptional
query.created (anyOf 1).ltintegerOptional
query.created (anyOf 1).lteintegerOptional
query.created (anyOf 2)integerAlternative
query.ending_beforestringOptionalMaximum length: 5000
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000
query.limitintegerOptional
query.setup_intentstringRequired within parentMaximum length: 5000
query.starting_afterstringOptionalMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parent
data[]ModelEach itemExpand List all Setup Attempts — response body — data item
has_morebooleanRequired within parentTrue if this list has another page of items after this one that can be fetched.
objectstringRequired within parentString representing the object’s type. Objects of the same type share the same value. Always has the value `list`.
Known values: list
urlstringRequired within parentThe URL where this list can be accessed.
Maximum length: 5000
Pattern: ^/v1/setup_attempts

Referenced models: List all Setup Attempts — response body — data item

702 more schemas are linked from the tables above, on the schema pages.

List all Setup Attempts — response body — data item
FieldTypePresenceDescription and constraints
$objectRootA 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.
applicationJSONOptional
application (anyOf 1)JSONAlternativeThe value of [application](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation.
application (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
application (anyOf 1) (anyOf 2)ModelAlternativeExpand PostApplicationFeesIdRefund — response body — application / object: application
application (anyOf 2)nullAlternative
attach_to_selfbooleanOptionalIf 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.
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
customerJSONOptional
customer (anyOf 1)JSONAlternativeThe value of [customer](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation.
customer (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer (anyOf 1) (anyOf 3)ModelAlternativeExpand Delete a customer — response body
customer (anyOf 2)nullAlternative
customer_accountJSONOptional
customer_account (anyOf 1)stringAlternativeThe 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.
Maximum length: 5000
customer_account (anyOf 2)nullAlternative
flow_directionsJSONOptional
flow_directions (anyOf 1)arrayAlternativeIndicates 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.
flow_directions (anyOf 1)[]stringEach itemKnown values: inbound, outbound
flow_directions (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: setup_attempt
on_behalf_ofJSONOptional
on_behalf_of (anyOf 1)JSONAlternativeThe 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.
on_behalf_of (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
on_behalf_of (anyOf 1) (anyOf 2)ModelAlternativeExpand Create an account — response body
on_behalf_of (anyOf 2)nullAlternative
payment_methodJSONRequired within parentID of the payment method used with this SetupAttempt.
payment_method (anyOf 1)stringAlternativeMaximum length: 5000
payment_method (anyOf 2)ModelAlternativeExpand Create a Payment Method — response body
payment_method_detailsModelRequired within parentExpand List all Setup Attempts — response body — data item payment method details
setup_errorJSONOptional
setup_error (anyOf 1)JSONAlternativeThe error encountered during this attempt to confirm the SetupIntent, if any.
setup_error (anyOf 1) (anyOf 1)ModelAlternativeExpand Cancel a SetupIntent — response body — last_setup_error / value / type: api error, card error, idempotency error, invalid request error
setup_error (anyOf 2)nullAlternative
setup_intentJSONRequired within parentID of the SetupIntent that this attempt belongs to.
setup_intent (anyOf 1)stringAlternativeMaximum length: 5000
setup_intent (anyOf 2)ModelAlternativeExpand Cancel a Setup Intent — response body
statusstringRequired within parentStatus of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`.
Maximum length: 5000
usagestringRequired within parentThe 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`.
Maximum length: 5000

Referenced models: Create an account — response body, Cancel a SetupIntent — response body — last_setup_error / value / type: api error, card error, idempotency error, invalid request error, PostApplicationFeesIdRefund — response body — application / object: application, Create a customer — response body, Delete a customer — response body, Create a Payment Method — response body, List all Setup Attempts — response body — data item payment method details, Cancel a Setup Intent — response body

PostApplicationFeesIdRefund — response body — application / object: application
FieldTypePresenceDescription and constraints
$objectRoot
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the application.
Maximum length: 5000
name (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: application
Delete a customer — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: customer
Create an account — response body — groups The groups associated with the account payments pricing
FieldTypePresenceDescription and constraints
$objectRoot
payments_pricingJSONOptional
payments_pricing (anyOf 1)stringAlternativeThe group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://docs.stripe.com/connect/platform-pricing-tools) for details.
Maximum length: 5000
payments_pricing (anyOf 2)nullAlternative
Create an account — response body — tos acceptance
FieldTypePresenceDescription and constraints
$objectRoot
dateJSONOptional
date (anyOf 1)JSONAlternative
date (anyOf 1) (anyOf 1)integerAlternativeThe Unix timestamp marking when the account representative accepted their service agreement
Format: unix-time
date (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
date (anyOf 2)nullAlternative
ipJSONOptional
ip (anyOf 1)stringAlternativeThe IP address from which the account representative accepted their service agreement
Maximum length: 5000
ip (anyOf 2)nullAlternative
service_agreementstringOptionalThe user's service agreement type
Maximum length: 5000
user_agentJSONOptional
user_agent (anyOf 1)stringAlternativeThe user agent of the browser from which the account representative accepted their service agreement
Maximum length: 5000
user_agent (anyOf 2)nullAlternative
Create a Payment Method — response body — zip
FieldTypePresenceDescription and constraints
$objectRoot
Create a Payment Method — response body — boleto
FieldTypePresenceDescription and constraints
$objectRoot
tax_idstringRequired within parentUniquely identifies the customer tax id (CNPJ or CPF)
Maximum length: 5000

SDK function policy ID: stripe.getsetupattempts. Catalog operation: GetSetupAttempts. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.