Fix Stripe Transaction History Bug

Замовник: AI | Опубліковано: 25.12.2025
Бюджет: 30 $

My backend is a Next.js API route that relies on the official stripe-node SDK. Payments still complete and webhooks reach my server, yet every call that should pull a customer’s full transaction history now fails. The endpoint once worked, so I’m confident the keys are valid; the issue sits somewhere in how I’m requesting or parsing the data. I need a fresh set of eyes to trace the problem, patch it, and explain the fix so I don’t break it again during future releases. Deliverables • Updated code in my repo that reliably returns the correct transaction history for any customer ID I pass. • Brief changelog or comments summarising what broke and how you resolved it. • Simple reproduction steps for me to test locally (`yarn dev` ➜ hit `/api/transactions?customer=…` ➜ receive the full JSON array without errors). Acceptance criteria: the endpoint must mirror the data shown in the Stripe dashboard, with no 4xx/5xx responses, console warnings, or unhandled promise rejections.