code: import stripe
  stripe.api_key = "sk_test_your_key"
  import stripe
  intent = stripe.PaymentIntent.retrieve(
    "pi_1DrPsv2eZvKYlo2CEDzqXfPH",
    stripe_version="2022-08-01"
  )
  intent.capture()
nl: VersioningWhen backwards-incompatible changes are made to the API, a new, dated version is released. The current version is 2022-08-01. Read our API upgrades guide to see our API changelog and to learn more about backwards compatibility.All requests use your account API settings, unless you override the API version. The  changelog lists every available version. Note that by default webhook events are structured according to your account API version, unless you set an API version during endpoint creation.To override the API version, assign the version to the stripe.api_version property, or set it per-request as shown in the adjacent code sample. When overriding it per-request, methods on the returned object reuse the same Stripe version.You can visit your Dashboard to upgrade your API version. As a precaution, use API versioning to test a new API version before committing to an upgrade.