Skip to content

feat(api): pending invoice items family + invoice read fidelity (lines.data, post-payment credit notes) - #73

Merged
midagedev merged 2 commits into
mainfrom
feat/stripe-surface-wave2-main
Aug 24, 2026
Merged

feat(api): pending invoice items family + invoice read fidelity (lines.data, post-payment credit notes)#73
midagedev merged 2 commits into
mainfrom
feat/stripe-surface-wave2-main

Conversation

@midagedev

Copy link
Copy Markdown
Owner

Wave 2 of the Stripe 2025+ API surface program (follows #71, #72).

What

Tests

6 new contract subtests + storage migration/NULL-FK tests. go build/vet/test green (api 132 / billing 11 / storage 14 top-level).

…ude/exclude, invoice subscription/days_until_due, lines.data and post_payment_credit_notes_amount

- POST /v1/invoiceitems without invoice stores a pending item (nullable invoice_id via migration 022), optional subscription echo
- POST /v1/invoices pending_invoice_items_behavior=include attaches the customer's same-currency pending items once at create and sums subtotal/total/amount_due; exclude/omit leaves them pending
- POST /v1/invoices accepts subscription (customer match enforced) and days_until_due (due_date = created + days)
- invoice responses populate lines.data reusing the /lines serialization (pricing/quantity included)
- paid invoices report post_payment_credit_notes_amount from issued credit notes' credit amounts
The 150ms elapsed assertions flake on loaded CI runners. The receiver
blocks until releaseWebhook closes at test end, so any response proves
the handler did not wait on delivery; keep only a generous hang bound.
@midagedev
midagedev merged commit 38f2728 into main Aug 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant