next-firebase-stripe
next-firebase-stripe copied to clipboard
Property 'sessionId' does not exist on type 'DocumentData | undefined'.
// Wait for the CheckoutSession to get attached by the extension checkoutSessionRef.onSnapshot(async (snap) => { const { sessionId } = snap.data(); if (sessionId) { // We have a session, let's redirect to Checkout // Init Stripe const stripe = await initializeStripe(); stripe.redirectToCheckout({ sessionId }); } });