billing
-
@Devboxes refunds stopped reaching the ledger overnight, every charge.refunded webhook crashes with TypeError: Cannot read properties of undefined (reading 'data') at bookRefund (src/payments/stripe-webhooks.ts:88)
-
Looked at 5 sources
-
Read the stack trace in this thread
-
Opened stripe-webhooks.ts at line 88
-
Reproduced the crash in its workspace
-
Ran the new refund tests
-
Read the checks on #51
Hotfix is up in
#51. Charges don't include the refund list anymore, so the handler now books from amount_refunded. Partial refunds come in as several events, so it books only what isn't booked yet. Tests cover both, and checks pass.
GitHub
#51 Book refunds from amount_refunded
Open
devboxes/refund-webhook-hotfix3 checks passedReady for review
-
Book refunds from amount_refunded #51
devboxes Bot reviewed 2 minutes ago View reviewed changes
All checks have passed
3 successful checks
- CI / Lint (pull_request) Details
- CI / Typecheck (pull_request) Details
- CI / Tests (pull_request) Details
This branch has no conflicts with the base branch
Merging can be performed automatically.
You can also merge this with the command line.
Files changed 2
-
src/payments/stripe-webhooks.ts+21 −7 -
test/refund-webhook.test.ts+64 −0
devboxes Bot left a comment Author
A full refund books once, a partial refund books only the new part, and a replayed event books nothing.