Expansion

Many objects allow you to expand certain fields to retrieve related resources inline by using the expand request parameter. Only get and list requests support expansion at this time.

Expands can be nested to any depth by providing an object instead of a boolean value. Check the expand parameter of a resource to see which properties can be expanded.

Example

Click on a value to see it expanded in the response.

Request

const customer = await bias.payments.get("pay_id", {
    expand: {
    }
})

Response

{
  "object": "payment",
  "live": false,
  "id": "payment",
  "created_at": 1750000000000,
  "amount": 1000,
  "amount_capturable": 1000,
  "amount_received": 0,
  "amount_refunded": 0,
  "capture_method": "automatic",
  "customer": "customer",
  "description": "Payment for order 123",
  "dispute": null,
  "metadata": {},
  "payment_error": null,
  "payment_method": "payment_method",
  "session": "checkout_session",
  "statement_descriptor": null,
  "status": "succeeded"
}