code: import stripe
  stripe.api_key = "sk_test_your_key"
  
  stripe.Charge.retrieve(
    'ch_3LSdrM2eZvKYlo2C1A6YRLyL',
    expand=['customer', 'invoice.subscription']
  )
  '''Response {
    "id": "ch_3LSdrM2eZvKYlo2C1A6YRLyL",
    "object": "charge",
    "customer": {
      "id": "cu_18CHts2eZvKYlo2CbmAAQORe",
      "object": "customer",
      ...
    },
    "invoice": {
      "id": "in_1LSdrM2eZvKYlo2CdjHtGeNU",
      "object": "invoice",
      "subscription": {
        "id": "su_1JbiLB2eZvKYlo2CRmgET2WF",
        "object": "subscription",
        ...
      },
      ...
    },
    ...
  }'''
nl: Expanding ResponsesMany objects allow you to request additional information as an expanded response by using the expand request parameter. This parameter is available on all API requests, and applies to the response of that request only. Responses can be expanded in two ways.In many cases, an object contains the ID of a related object in its response properties. For example, a Charge may have an associated Customer ID. Those objects can be expanded inline with the expand request parameter. ID fields that can be expanded into objects are noted in this documentation with theexpandable label.In some cases, such as the Issuing Card object's number and cvc fields, there are available fields that are not included in responses by default. You can request these fields as an expanded response by using the expand request parameter. Fields that can be included in an expanded response are noted in this documentation with the expandable label.You can expand recursively by specifying nested fields after a dot (.). For example, requesting invoice.subscription on a charge will expand the invoice property into a full Invoice object, and will then expand the subscription property on that invoice into a full Subscription object.You can use the expand param on any endpoint which returns expandable fields, including list, create, and update endpoints.Expansions on list requests start with the data property. For example, you would expand data.customers on a request to list charges and associated customers. Many deep expansions on list requests can be slow.Expansions have a maximum depth of four levels (so for example, when listing charges,data.invoice.subscription.default_source is the deepest allowed).You can expand multiple objects at once by identifying multiple items in the expand array.