Open carstenlebek opened 1 year ago
I have added a webhook event constructor similar to stripe.
import { constructEvent } from "lemonsqueezy.ts"; const event = constructEvent( "RAW_REQUEST_BODY", "X-Signature HEADER_VALUE", "YOUR_WEBHOOK_SECRET" ) switch (event.type) { case "order_created": const order = event.data; break; case "order_refunded": const order = event.data; break; case "subscription_created": const subscription = event.data; break; default: break; }
I have added a webhook event constructor similar to stripe.