/logictrail:explain
Ask how something works, or start from a route, a function or a file. Claude answers in a few sentences, then walks the path step by step, calls out the branches and marks inferred links.
When Stripe reports a failed payment, the webhook marks the order failed, puts the reserved stock back and emails the customer.
-
POST /api/webhooks/striperunshandleStripeWebhook()server/src/payments/stripe.ts:17 -
switch (event.type)sends payment_intent.payment_failed tomarkOrderFailed()server/src/payments/stripe.ts:29 -
It writes
order.update, callsreleaseInventory()and emitsorder.paymentFailedserver/src/services/orderService.ts:30 -
notifyPaymentFailed()sends the email through Resend server/src/email/send.ts:21
An example on the sample shop, shortened. Claude's wording varies; the steps and lines come from the trace.