code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.SetupAttempt.list(limit=3)
  '''Response {
    "object": "list",
    "url": "/v1/setup_attempts",
    "has_more": false,
    "data": [
      {
        "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"
      },
      {...},
      {...}
    ]
  }'''
nl: List all SetupAttemptsReturns a list of SetupAttempts associated with a provided SetupIntent.Parameters setup_intent required Only return SetupAttempts created by the SetupIntent specified by
  this ID.More parametersExpand all  created optional dictionary   ending_before optional   limit optional   starting_after optional ReturnsA dictionary with a data property that contains
  an array of up to limit SetupAttempts which were created by the
  specified SetupIntent, starting after SetupAttempts starting_after. Each
  entry in the array is a separate SetupAttempts object. If no more
  SetupAttempts are available, the resulting array will be empty. This
  request should never raise an error