ghostguild-org/server/api/helcim
Jennie Robinson Faber 335a4db7cc fix(account): show payment history + next-charge for paid-then-$0 members
Three related changes on /member/account:

1. Payment History section now renders when contributionAmount > 0 OR
   past payments exist. Previously a paid member who switched to $0 lost
   visibility of their own past charges.

2. New "Next charge: $X on DATE" row renders above the transaction list
   when nextPaymentDate is available, using --candle dashed border.

3. server/api/helcim/subscription.get.js now reads dateBilling from
   Helcim's GET response and handles data as either object or array.
   Helcim's real shape is {data: {id, dateBilling, ...}} — the old code
   expected {data: [{nextBillingDate}]} and returned empty strings, so
   the Membership-card "Next payment" row never rendered for members
   whose cached date was missing. subscription.post.js and
   update-contribution.post.js have the same wrong field name in their
   CREATE flows; left for a follow-up — the GET refresh masks it.

Manual edit-flow and admin-flow tests also recorded in
docs/LAUNCH_READINESS.md.
2026-04-20 12:36:18 +01:00
..
create-plan.post.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
customer-code.get.js refactor(helcim): use centralized helper in 5 simple endpoints 2026-04-08 21:44:18 +01:00
customer.post.js feat(server): rename contributionTier → contributionAmount in routes + utils 2026-04-19 18:44:29 +01:00
get-or-create-customer.post.js refactor(helcim): wrapped PATCH body, first-activation welcome email guard 2026-04-18 17:06:30 +01:00
initialize-payment.post.js refactor(helcim): use centralized helper in 5 simple endpoints 2026-04-08 21:44:18 +01:00
payment-history.get.js feat(billing): add payment history API route 2026-04-19 16:26:19 +01:00
plans.get.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
subscription.get.js fix(account): show payment history + next-charge for paid-then-$0 members 2026-04-20 12:36:18 +01:00
subscription.post.js merge: catch up with feature/helcim-plan-consolidation base 2026-04-19 21:33:40 +01:00
subscriptions.get.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
update-billing.post.js refactor(helcim): use helper in unused admin endpoints 2026-04-08 22:11:25 +01:00
update-card.post.js feat(billing): add update-card API route with rollback + status gate 2026-04-19 16:29:23 +01:00
verify-payment.post.js refactor(helcim): use centralized helper in 5 simple endpoints 2026-04-08 21:44:18 +01:00