# Expanding Responses

```sh
curl https://api.stripe.com/v1/charges/ch_3LmzzQ2eZvKYlo2C0XjzUzJV \
  -u sk_test_...: \
  -d "expand[]"=customer \
  -d "expand[]"="payment_intent.customer" \
  -G
```

### Response

```json
{
  "id": "ch_3LmzzQ2eZvKYlo2C0XjzUzJV",
  "object": "charge",
  "customer": {
    "id": "cu_14HOpH2eZvKYlo2CxXIM7Pb2",
    "object": "customer",
    // ...
  },
  "payment_intent": {
    "id": "pi_3MtwBwLkdIwHu7ix28a3tqPa",
    "object": "payment_intent",
    "customer": {
      "id": "cus_NffrFeUfNV2Hib",
      "object": "customer",
      // ...
    },
    // ...
  },
  // ...
}
```

Many 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. You can expand responses in two ways: by expanding the ID of a related object that appears in the response, or by requesting a field that isn’t included by default. For example, a `Charge` might have an associated `Customer` ID that you can expand in line using the `expand` request parameter—the `expandable` label in this documentation indicates which ID fields you can expand into objects. Some fields, such as the `number` and `cvc` fields for the `Issuing Card` object, aren’t included in the response by default, but you can request them the same way.

You can expand recursively by specifying nested fields after a dot (`.`). For example, requesting `payment_intent.customer` on a charge expands the `payment_intent` property into a full `PaymentIntent` object, then expands the `customer` property on that payment intent into a full `Customer` object. You can expand multiple objects at the same time by including multiple items in the `expand` array, up to a maximum depth of four levels—for example, the deepest expansion allowed when listing charges is `data.payment_intent.customer.default_source`.

You can use the `expand` parameter on any endpoint that returns expandable fields, including list, create, and update endpoints. Expansions on list requests start with the `data` property—for example, you can expand `data.customers` on a request to list charges and associated customers. Performing deep expansions on numerous list requests might result in slower processing times.

- Related guide: [Expanding responses](https://docs.stripe.com/expand.md?api-version=2025-08-27.basil)
- Related video: [Expand](https://www.youtube.com/watch?v=m8Vj_CEWyQc)
