code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.SetupIntent.cancel(
    "seti_1EuLW12eZvKYlo2CSSF0PlLO",
  )
  '''Response {
    "id": "seti_1EuLW12eZvKYlo2CSSF0PlLO",
    "object": "setup_intent",
    "application": null,
    "cancellation_reason": null,
    "client_secret": "seti_1EuLW12eZvKYlo2CSSF0PlLO_secret_FP9pDHZrmtOHCWIKnuIZPW0VhtPEsaa",
    "created": 1562687161,
    "customer": null,
    "description": null,
    "flow_directions": null,
    "last_setup_error": null,
    "latest_attempt": null,
    "livemode": false,
    "mandate": null,
    "metadata": {},
    "next_action": null,
    "on_behalf_of": null,
    "payment_method": null,
    "payment_method_options": {
      "card": {
        "mandate_options": null,
        "network": null,
        "request_three_d_secure": "automatic"
      }
    },
    "payment_method_types": [
      "card"
    ],
    "redaction": null,
    "single_use_mandate": null,
    "status": "canceled",
    "usage": "off_session"
  }'''
nl: Cancel a SetupIntentA SetupIntent object can be canceled when it is in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. 
  Once canceled, setup is abandoned and any operations on the SetupIntent will fail with an error.Parameters cancellation_reason optional Reason for canceling this SetupIntent. Possible values are abandoned, requested_by_customer, or duplicateReturnsReturns a SetupIntent object if the cancellation succeeded. Returns an error if the SetupIntent has already been canceled or is not in a cancelable state