Rank 1: Thread
This is what all it required by polar to see the webhook data. Managing with webhook data is not an issue, but how do I pair this all with appwrite functions structure so I will be able to verify the signature and get the webhook data in the first place?
import { Hono } from "hono";
import { Webhooks } from "@polar-sh/hono";
const app = new Hono();
app.post(
"/polar/webhooks",
Webhooks({
webhookSecret: process.env.POLAR_WEBHOOK_SECRET!,
onPayload: async (payload) => {
console.log("Received webhook payload:", payload);
},
})
);