new-site/api/src
justin 8af2685d07 fix(webhooks): read invoice.subscription in both API shapes (acacia + dahlia)
The live Stripe webhook endpoint has NO pinned api_version, so it follows the
account default (currently 2024-12-18.acacia), which delivers the subscription
link as the top-level invoice.subscription. The code only read the new
2026-03-25.dahlia shape (invoice.parent.subscription_details.subscription), so
recurring renewal/payment-failed events would have returned a null subscription
id and silently failed to fulfill once the events were enabled.

invoiceSubscriptionId() now reads the modern shape first, then falls back to the
legacy top-level field. All other invoice fields used by the handlers
(amount_due, attempt_count, hosted_invoice_url, id) are stable across both
versions. +5 tests (legacy string/object, modern-preferred-over-legacy).
2026-06-18 08:42:29 -05:00
..
lib Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
middleware admin: view order PDFs from MinIO (signed forms, prepared filings, evidence) 2026-06-16 00:20:15 -05:00
routes fix(webhooks): read invoice.subscription in both API shapes (acacia + dahlia) 2026-06-18 08:42:29 -05:00
config.ts chore(email): decommission SMTP2GO references — local MTA only 2026-06-17 22:46:59 -05:00
create-admin.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
db.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
email.ts chore(email): decommission SMTP2GO references — local MTA only 2026-06-17 22:46:59 -05:00
erpnext-client.ts auth: make ERPNext the single source of truth for customer passwords 2026-06-17 10:09:32 -05:00
fx.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
index.ts ifta: 3-touch business-day cadence + 'I already filed it' suppression 2026-06-13 23:41:14 -05:00
sanctions.ts Initial commit — Performance West telecom compliance platform 2026-04-27 06:54:22 -05:00
service-catalog.ts feat(healthcare): OIG/SAM exclusion screening as $79/mo Stripe Subscription 2026-06-18 07:54:38 -05:00