You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on #17, we found several gaps in the shapes the API returns. They predate #17 and don't change any totals.
Plan-line metadata. Plan lines always return metadata: {}. Stripe copies the subscription's metadata onto the plan line (probed through the Stripe MCP, 2026-10-16). The line builder is in billing/invoicing.py (~490).
total_discount_amounts.compute_totals leaves zero-amount discounts out of the invoice's total_discount_amounts. Lines now list {amount: 0, discount} entries as Stripe's do; whether Stripe's invoice-level total keeps the zero entry is unprobed.
Expanding discounts.expand[]=discounts silently does nothing (serialize/expand.py), so a discount's start/end can't be read through the API. Stripe's discount object has [id, object, checkout_session, customer, customer_account, end, invoice, invoice_item, promotion_code, source{coupon,type}, start, subscription, subscription_item] (probed).
Discount events. No customer.discount.created, customer.discount.updated or customer.discount.deleted events are emitted, including when a repeating discount ends. They are listed in spec/event_types.py but never fired.
Resume invoices. Resume invoices don't record their discounts or tax rates (no discounts= and no tax_rate_ids= on create_invoice). The totals list a di_ that invoice.discounts lacks, and a draft rebuild would drop both.
Impact on the company fixtures
Item 1 would change the metadata on every plan line in both fixtures.
Item 4 would add events.
The other items have no fixture impact known.
Suggested next steps
Fix item 1 and item 5 first. Item 1 is visible on every invoice, and item 5 can drop a discount on rebuild. Then decide whether expand and discount events belong in scope.
Activity