code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.SubscriptionSchedule.create(
    customer="cus_8TEMHVY5moxIPI",
    start_date=1660122035,
    end_behavior="release",
    phases=[
      {
        "items": [
          {
            "price": "plan_JiX4v6L7JY0Vyt",
            "quantity": 1,
          },
        ],
        "iterations": 12,
      },
    ],
  )
  '''Response {
    "id": "sub_sched_1JuFVT2eZvKYlo2CSOQvG7P6",
    "object": "subscription_schedule",
    "application": null,
    "canceled_at": 1637053645,
    "completed_at": null,
    "created": 1659518858,
    "current_phase": {
      "start_date": 1660122035,
      "end_date": 1691658035
    },
    "customer": "cus_8TEMHVY5moxIPI",
    "default_settings": {
      "application_fee_percent": null,
      "automatic_tax": {
        "enabled": false
      },
      "billing_cycle_anchor": "automatic",
      "billing_thresholds": null,
      "collection_method": "charge_automatically",
      "default_payment_method": null,
      "invoice_settings": null,
      "transfer_data": null
    },
    "end_behavior": "release",
    "livemode": false,
    "metadata": {},
    "phases": [
      {
        "add_invoice_items": [],
        "application_fee_percent": null,
        "billing_cycle_anchor": null,
        "billing_thresholds": null,
        "collection_method": null,
        "coupon": null,
        "default_payment_method": null,
        "default_tax_rates": [],
        "end_date": 1691658035,
        "invoice_settings": null,
        "items": [
          {
            "billing_thresholds": null,
            "price": "plan_JiX4v6L7JY0Vyt",
            "quantity": 1,
            "tax_rates": []
          }
        ],
        "metadata": {},
        "proration_behavior": "create_prorations",
        "start_date": 1660122035,
        "transfer_data": null,
        "trial_end": null
      }
    ],
    "released_at": null,
    "released_subscription": null,
    "status": "canceled",
    "subscription": null,
    "test_clock": null
  }'''
nl: Create a scheduleCreates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions.Parameters customer optional The identifier of the customer to create the subscription schedule for. 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. phases optional array of hashes List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the end_date of one phase will always equal the start_date of the next phase.Show child parameters start_date optional When the subscription schedule starts. We recommend using now so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on.More parametersExpand all  default_settings optional dictionary   end_behavior optional   from_subscription optional ReturnsReturns a subscription schedule object if the call succeeded