Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

webhook wip

Kiran K66dfe9c9635e
diff --git a/apps/web/app/api/paypal/webhook/route.ts b/apps/web/app/api/paypal/webhook/route.ts
new file mode 100644
index 0000000000..7091bcb363
--- /dev/null
+++ b/apps/web/app/api/paypal/webhook/route.ts
@@ -0,0 +1,12 @@
+const relevantEvents = new Set(["PAYMENT.PAYOUTS-ITEM.SUCCEEDED"]);
+
+// POST /api/shopify/integration/webhook – Listen to Shopify webhook events
+export const POST = async (req: Request) => {
+ const data = await req.text();
+ const headers = req.headers;
+
+ // TODO:
+ // Verify signature
+
+ return new Response("OK");
+};
diff --git a/apps/web/app/api/paypal/webhook/verify-signature.ts b/apps/web/app/api/paypal/webhook/verify-signature.ts
new file mode 100644
index 0000000000..a09d990496
--- /dev/null
+++ b/apps/web/app/api/paypal/webhook/verify-signature.ts
@@ -0,0 +1,3 @@
+async function verifySignature(event, headers) {
+ //
+}