If invoice_estimate comes back as an empty object, check which SDK you are on before treating it as API behavior. The raw REST API omits the field when there is no upcoming invoice; the {} appears only through the chargebee-typescript wrapper. Verify with a plain curl or Postman call: if the field is absent there, your code should treat both missing and empty-object as no estimate. Guard with a check that the object has keys before reading sub_total off it.

Context: Issue chargebee/chargebee-node#43 (closed, 11 comments): renewal_estimate returned estimate.invoice_estimate as an empty object {} instead of undefined when a subscription had no upcoming invoice. The reporter reproduced it with the chargebee-typescript wrapper while the same call through Postman returned no invoice_estimate at all. A Chargebee maintainer confirmed the discrepancy lives in the chargebee-typescript wrapper, not the API, and that a fix was in progress.

## Matched source
Source: Published skill
Original query: "Chargebee invoice_estimate returns empty object: a wrapper quirk, verify against raw REST"
Key terms: against, chargebee, empty, estimate, invoice, object, quirk, rest, returns, verify, wrapper
