diff --git a/src/routes/api/the-nook/webhooks/stripe.ts b/src/routes/api/the-nook/webhooks/stripe.ts
index 01b5d6e..e09929b 100644
--- a/src/routes/api/the-nook/webhooks/stripe.ts
+++ b/src/routes/api/the-nook/webhooks/stripe.ts
@@ -20,7 +20,7 @@ import { createHmac, timingSafeEqual } from "node:crypto";
interface StripeSessionCompleted {
id: string;
type: string;
- customer_details?: { email?: string };
+ data?: { object?: { id?: string; customer_details?: { email?: string } } };
}
function verifyStripeSignature(rawBody: string, signatureHeader: string): boolean {
@@ -94,8 +94,8 @@ export async function POST(event: APIEvent) {
return json({ received: true });
}
- const sessionId = body.id;
- const email = body.customer_details?.email;
+ const sessionId = body.data?.object?.id;
+ const email = body.data?.object?.customer_details?.email;
if (!sessionId || !email) {
console.error("checkout.session.completed missing id or email:", rawBody);
return json({ received: true });
diff --git a/src/routes/nook/checkout.tsx b/src/routes/nook/checkout.tsx
index 753a5ca..7aa5c39 100644
--- a/src/routes/nook/checkout.tsx
+++ b/src/routes/nook/checkout.tsx
@@ -66,18 +66,27 @@ export default function NookCheckout() {
<>
- One license covers up to 3 of your own Macs. + Beta pricing — full price will be $15. One license covers up to 3 of + your own Macs.