A fully functional webhook system for handling order notifications in your business. This system can receive order events from e-commerce platforms, payment processors, or other systems and send appropriate notifications.
Your webhook system is now live and ready to use!
https://Victoria1234--ee50f49a3fb911f0867076b3cceeab13.web.val.run/webhook/ordershttps://Victoria1234--ee50f49a3fb911f0867076b3cceeab13.web.val.run/api/ordersāāā backend/
ā āāā database/
ā ā āāā migrations.ts # Database schema setup
ā ā āāā queries.ts # Order database operations
ā āāā routes/
ā ā āāā webhook.ts # Webhook endpoint handler
ā ā āāā orders.ts # Order management API
ā āāā index.ts # Main server entry point
āāā frontend/
ā āāā index.html # Demo interface
āāā shared/
ā āāā types.ts # Shared TypeScript types
āāā README.md
Environment Variables (optional):
WEBHOOK_SECRET: Secret key for validating webhook signaturesBUSINESS_EMAIL: Email address to receive order notificationsThe webhook endpoint is available at: /webhook/orders
Send POST requests to the webhook endpoint with order data:
curl -X POST https://your-domain.web.val.run/webhook/orders \ -H "Content-Type: application/json" \ -d '{ "event": "order.created", "data": { "orderId": "ORD-12345", "customerEmail": "customer@example.com", "customerName": "John Doe", "items": [ { "name": "Product Name", "quantity": 2, "price": 29.99 } ], "total": 59.98, "status": "paid", "timestamp": "2024-01-15T10:30:00Z" } }'
GET /api/orders - Get recent ordersGET /api/orders/:orderId - Get specific orderGET /api/orders/customer/:email - Get orders by customerGET /api/status - System statusGET /webhook/health - Webhook health check{ "event": "order.created", "data": { "orderId": "ORD-12345", "customerEmail": "customer@example.com", "customerName": "John Doe", "items": [ { "name": "Product Name", "quantity": 2, "price": 29.99, "sku": "PROD-001" // optional } ], "total": 59.98, "status": "paid", // paid, pending, shipped, delivered, cancelled "timestamp": "2024-01-15T10:30:00Z", "shippingAddress": { // optional "street": "123 Main St", "city": "Anytown", "state": "CA", "zipCode": "12345", "country": "USA" }, "metadata": {} // optional additional data } }
x-webhook-signature headerThe system automatically sends:
BUSINESS_EMAIL is configured)Your order notification webhook system is fully functional and ready for production use. You can: