Stripe Webhook Setup Guide
Follow these steps to ensure ticket purchases are automatically confirmed and emailed to buyers.
Pending Bookings (may need manual fix)
Get your webhook endpoint URL
In your Base44 dashboard: Code → Functions → stripeWebhook. Copy the endpoint URL at the top.
https://nationalrealitytvawards.co.uk/api/functions/stripeWebhookRegister the webhook in Stripe (if not already done)
Go to Stripe Dashboard → Webhooks
Click + Add endpoint, paste the URL above, then under "Events to send" search for and select checkout.session.completed. Click Add endpoint.
Copy the signing secret from Stripe
In Stripe, click your webhook endpoint → under Signing secret click the eye icon to reveal it (starts with whsec_...). Copy it.
Update the secret in Base44
In your Base44 dashboard: Settings → Environment Variables. Find STRIPE_WEBHOOK_SECRET, paste the new secret, and click Save.
Test the webhook
In Stripe, click your webhook endpoint → Send test webhook (top right) → select checkout.session.completed → click Send test webhook.
If it returns 200 OK, everything is working. If it fails, check the response in Stripe's event log.
Fix existing pending bookings
If bookings are stuck in "pending" after payment, the webhook may have failed before the secret was updated. Use the Resend Email button above for each pending booking to manually trigger ticket delivery.
Note: This only sends the email. To mark a booking as paid, update it from the Admin Bookings page.
