code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.SubscriptionItem.modify(
    "si_MAzroazQBGguLd",
    metadata={"order_id": "6735"},
  )
  '''Response {
    "id": "si_MAzroazQBGguLd",
    "object": "subscription_item",
    "billing_thresholds": null,
    "created": 1659518859,
    "metadata": {
      "order_id": "6735"
    },
    "price": {
      "id": "price_1LSTX02eZvKYlo2CrKMGl6Dy",
      "object": "price",
      "active": true,
      "billing_scheme": "per_unit",
      "created": 1659479142,
      "currency": "usd",
      "custom_unit_amount": null,
      "livemode": false,
      "lookup_key": null,
      "metadata": {},
      "nickname": null,
      "product": "prod_MApBpixJvIPdF1",
      "recurring": {
        "aggregate_usage": null,
        "interval": "month",
        "interval_count": 1,
        "usage_type": "licensed"
      },
      "tax_behavior": "unspecified",
      "tiers_mode": null,
      "transform_quantity": null,
      "type": "recurring",
      "unit_amount": 1200,
      "unit_amount_decimal": "1200"
    },
    "quantity": 1,
    "subscription": "sub_1LSdra2eZvKYlo2CbANuqqoc",
    "tax_rates": []
  }'''
nl: Update a subscription itemUpdates the plan or quantity of an item on a current subscription.Parameters metadata optional dictionary Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata. payment_behavior optional enum Use allow_incomplete to transition the subscription to status=past_due if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription’s invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the SCA Migration Guide for Billing to learn more. This is the default behavior.
  Use default_incomplete to transition the subscription to status=past_due when payment is required and await explicit confirmation of the invoice’s payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, SCA regulation, or collecting a mandate for a bank debit payment method.
  Use pending_if_incomplete to update the subscription using pending updates. When you use pending_if_incomplete you can only pass the parameters supported by pending updates.
  Use error_if_incomplete if you want Stripe to return an HTTP 402 status code if a subscription’s invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the changelog to learn more.Possible enum valuesallow_incomplete error_if_incomplete pending_if_incomplete default_incomplete  price optional The ID of the price object. When changing a subscription item’s price, quantity is set to 1 unless a quantity parameter is provided. proration_behavior optional enum Determines how to handle prorations when the billing cycle changes (e.g., when switching plans, resetting billing_cycle_anchor=now, or starting a trial), or if an item’s quantity changes.Possible enum valuescreate_prorations Will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under certain conditions.none Disable creating prorations in this request.always_invoice Always invoice immediately for prorations. quantity optional The quantity you’d like to apply to the subscription item you’re creating.More parametersExpand all  billing_thresholds optional dictionary   off_session optional   price_data optional dictionary   proration_date optional   tax_rates optional Return