Handling DodoPayments Webhooks with Firebase Cloud Functions
This guide walks through integrating DodoPayments webhook events into a Firebase Cloud Function. Firebase is a natural choice for handling webhooks because it provides a serverless environment that...

Source: DEV Community
This guide walks through integrating DodoPayments webhook events into a Firebase Cloud Function. Firebase is a natural choice for handling webhooks because it provides a serverless environment that scales automatically and minimizes infrastructure management. By the end of this guide you'll have a deployed Cloud Function that receives DodoPayments events, verifies their authenticity, and writes the results to Firestore. Prerequisites Firebase project set up with Blaze plan DodoPayments merchant account in test mode Firebase CLI installed Setting up Firebase Function This guide assumes your Firebase CLI is already installed and you are at the root of your project. Authenticate and initalize functions firebase login firebase init functions Select an existing project or create a new one. Choose TypeScript when prompted. It's recommended for modern Nuxt projects. Opt in to install dependencies when prompted. In your index.ts file write a placeholder function to get your public endpoint URL