Expansion returns related objects in the same response, such as a payment’s customer and payment method, instead of their IDs. Each endpoint that supports it lists the fields it can expand under its expand parameter, including creates and updates such as creating a payment.
A field set to true is expanded. An object in place of true also expands fields of the expanded object, such as payment_method: { customer: true }.
expand is a query parameter on every request, including POST and PATCH. Over HTTP, its value is URL-encoded JSON. The SDKs take it as an object.