Marked as helpful by the asker
Two things before live:
- Your secret key is read on the server, good. But the webhook handler parses JSON before verifying the signature, so verification always fails in production. Read
req.text()first. - The success page trusts
?session_id=from the URL to show 'thank you'. Confirm the payment server-side withcheckout.sessions.retrievebefore you thank anyone or unlock anything.