ghostguild-org/server/api/helcim
Jennie Robinson Faber 4f9c11a755 feat(billing): add payment history API route
Add GET /api/helcim/payment-history returning the authenticated
member's normalized Helcim card transactions (newest first, capped
at 50). Resolves helcimCustomerId -> customerCode via getHelcimCustomer
before calling listHelcimCustomerTransactions. Returns
{ transactions: [] } when the member has no helcimCustomerId, and
{ transactions: [], error: 'unavailable' } (HTTP 200) on Helcim
failures so the UI can render fallback copy.

Covered by unit tests at tests/server/api/helcim-payment-history.test.js
(auth, missing customer id, happy path, both Helcim failure paths,
missing customerCode).
2026-04-19 16:26:19 +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(signup): community guidelines agreement and policies routes 2026-04-18 17:06:10 +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.post.js fix(helcim): restore subscriptionStartDate on paid-tier activation 2026-04-18 17:28:05 +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
verify-payment.post.js refactor(helcim): use centralized helper in 5 simple endpoints 2026-04-08 21:44:18 +01:00