From 6e339e9c64a820fe539520a724fe2037c8ed962f Mon Sep 17 00:00:00 2001 From: Amirul Islam Redwan Date: Thu, 10 Sep 2026 22:49:52 +0000 Subject: [PATCH] feat(webhooks): activate real-time webhooks for all 4 couriers (Steadfast, Pathao, RedX, Paperfly) --- src/http.ts | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/src/http.ts b/src/http.ts index 156b91d..4e7a9ae 100644 --- a/src/http.ts +++ b/src/http.ts @@ -182,7 +182,33 @@ app.post("/webhooks/pathao", (req: Request, res: Response) => { console.log("[Pathao Webhook Received]:", JSON.stringify(payload)); return res.status(200).json({ status: "success", - message: "Webhook received successfully.", + message: "Pathao webhook received successfully.", + }); +}); + +/** + * Official RedX Webhook Integration Endpoint + * Callback URL: https://courier.auraajenticai.cloud/webhooks/redx + */ +app.post("/webhooks/redx", (req: Request, res: Response) => { + const payload = req.body; + console.log("[RedX Webhook Received]:", JSON.stringify(payload)); + return res.status(200).json({ + status: "success", + message: "RedX webhook received successfully.", + }); +}); + +/** + * Official Paperfly Webhook Integration Endpoint + * Callback URL: https://courier.auraajenticai.cloud/webhooks/paperfly + */ +app.post("/webhooks/paperfly", (req: Request, res: Response) => { + const payload = req.body; + console.log("[Paperfly Webhook Received]:", JSON.stringify(payload)); + return res.status(200).json({ + status: "success", + message: "Paperfly webhook received successfully.", }); }); @@ -198,6 +224,8 @@ app.get("/health", (_req, res) => { webhooks: { steadfast: "/webhooks/steadfast", pathao: "/webhooks/pathao", + redx: "/webhooks/redx", + paperfly: "/webhooks/paperfly", }, performance: { sessions_active: sessions.size,