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
feat(billing): wire fetchBilling() to real GET /api/v1/billing endpoint (#23)
InstaNode-dev/api PR #15 just landed — the agent API now serves
GET /api/v1/billing as the aggregated subscription-state endpoint
the dashboard had been fixturing.
This commit drops the fixture path. fetchBilling() now calls the
real endpoint and maps the response into the dashboard's existing
BillingDetails shape (status, current_period_end, payment_last4,
payment_network — every field the agent API can populate is now
live; the ones the agent API doesn't expose yet stay undefined and
render as "—" in the UI).
Fallback: on 503 (Razorpay unconfigured in local dev), still falls
back to FIXTURE_BILLING so the BillingPage doesn't break for
developers without RAZORPAY_KEY_ID set. Any other error propagates
so production failures aren't silently swallowed.
Closes the partial-fixture comment block I left in PR #20.
Verified: npm run build clean (116 HTML + 116 .md), 26/26 markdown
renderer tests pass, Playwright auth/navigation/resources specs
all green.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments