Skip to content

Conversation

@thepushkaraj
Copy link
Contributor

@thepushkaraj thepushkaraj commented Oct 28, 2025

πŸ“‹ Description

Adds webhook examples documentation for cloudflare, netlify, supabase and vercel with subscription events

🎯 Type of Change

  • πŸ“ Documentation update (improving existing docs)
  • ✨ New documentation (adding new guides, API docs, etc.)
  • πŸ› Bug fix (fixing errors, broken links, incorrect information)
  • 🎨 Style/formatting (improving readability, fixing formatting)
  • πŸ—οΈ Structural change (reorganizing content, navigation updates)
  • 🌐 Translation (adding or improving translations)
  • πŸ–ΌοΈ Assets (adding or updating images, diagrams)

πŸ“– What documentation does this PR affect?

  • Getting Started / Setup
  • API Reference
  • Developer Resources
  • Integration Guides
  • Features Documentation
  • External Integrations
  • Changelog
  • Other:

βœ… Checklist

  • I have read the Contributing Guidelines
  • I have tested my changes locally with mintlify dev
  • All links are working correctly
  • Images are properly displayed and optimized
  • Code examples are tested and working
  • I have updated the navigation in docs.json (if applicable)
  • My changes follow the project's style guide
  • I have performed a self-review of my changes
  • I have added appropriate frontmatter to new pages

πŸ§ͺ Testing

  • Verified locally at http://localhost:3000
  • Checked responsive design on mobile viewport
  • Tested all code examples
  • Validated all external links

πŸ“Έ Screenshots (if applicable)

πŸ”— Related Issues

Closes #

πŸ“ Additional Notes

πŸ‘₯ Reviewers

@dodopayments/documentation-team

Summary by CodeRabbit

  • Documentation
    • Added comprehensive webhook integration guides for Cloudflare Workers, Netlify Functions, Supabase Edge Functions, and Vercel API Routes.
    • Each guide provides end-to-end setup, deployment steps, database schema examples, implementation patterns, signature verification, idempotent processing, event logging, and subscription event handling.
    • Updated site navigation to add a "Webhook Examples" subgroup under Webhooks.

@thepushkaraj thepushkaraj marked this pull request as ready for review October 28, 2025 13:29
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 28, 2025

Walkthrough

Adds four serverless webhook integration guides (Cloudflare, Netlify, Supabase, Vercel) and a navigation subgroup. Each guide provides DB schema, configs, TypeScript/Deno handler examples with signature verification, idempotency, upserts, testing, and troubleshooting.

Changes

Cohort / File(s) Summary
Webhook Examples Documentation
developer-resources/webhooks/examples/cloudflare-example.mdx, developer-resources/webhooks/examples/netlify-example.mdx, developer-resources/webhooks/examples/supabase-example.mdx, developer-resources/webhooks/examples/vercel-example.mdx
Adds four platform-specific guides containing prerequisites, installation, Neon/Postgres schema (customers, subscriptions, webhook_events), config examples (package.json, tsconfig.json, platform config files), TypeScript/Deno handler implementations with signature verification, idempotency via webhook_id, event handling (subscription.active, subscription.cancelled, subscription.renewed), logging, CORS, testing, and troubleshooting.
Navigation Configuration
docs.json
Inserts a "Webhook Examples" navigation subgroup under Webhooks linking to the four new example pages.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Sender as DodoPayments
  participant Worker as Serverless Function
  participant DB as Neon/Postgres
  rect rgb(235,245,235)
    Note over Worker,DB: verify -> log -> idempotency -> process -> upsert
  end
  Sender->>Worker: POST /webhook (payload + signature)
  Worker->>Worker: Read raw body, verify signature
  alt signature valid
    Worker->>DB: INSERT INTO webhook_events (idempotent insert)
    alt first-time event
      Worker->>Worker: Parse event type
      Worker->>DB: UPSERT customers / subscriptions (transaction)
      Worker-->>Sender: 200 OK
    else duplicate event
      Worker-->>Sender: 200 OK (ignored)
    end
  else signature invalid
    Worker-->>Sender: 401 Unauthorized
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify consistent signature verification and raw-body handling across platforms (Netlify/Cloudflare/Vercel/Supabase differences).
  • Check idempotency logic and unique constraints around webhook_id / webhook_events.
  • Review upsert SQL and transaction boundaries for customer/subscription updates.
  • Validate platform config files (e.g., wrangler.toml, netlify.toml, environment variable names).

Poem

🐰 I hopped through docs with a careful jot,
New serverless guides in every spot,
Cloudflare, Netlify, Vercel, Supabase too,
I logged each webhook and upserted true,
Hooray for hooks; subscriptions hop anew!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
βœ… Passed checks (2 passed)
Check name Status Explanation
Title Check βœ… Passed The pull request title "feat(webhooks): add webhook examples for cloudflare, netlify, supabase and vercel" is fully related to the main changes in the changeset. The raw summary shows that this PR adds four new MDX documentation files (cloudflare-example.mdx, netlify-example.mdx, supabase-example.mdx, and vercel-example.mdx) with complete webhook integration guides, plus an update to docs.json to organize these examples in the navigation. The title accurately and concisely captures the primary objective without being vague or misleading, and it provides enough specificity that reviewers can quickly understand the scope of the changes.
Description Check βœ… Passed The pull request description follows the repository's template structure and includes all required sections: a clear description of changes, the correct type of change marked (✨ New documentation), the affected documentation area identified (Integration Guides), and a comprehensive checklist with all items checked off indicating the author has tested changes locally, validated links, tested code examples, updated navigation, and followed style guidelines. The testing section also documents verification at localhost:3000, responsive design checks, and external link validation. While optional sections like "Related Issues" and "Additional Notes" are left empty, the core required content is present and substantive, demonstrating the author followed the contribution process.
✨ Finishing touches
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (1)
developer-resources/webhooks/examples/cloudflare-example.mdx (1)

140-234: Database schema is well-designed with comprehensive indexes.

The schema includes:

  • Proper UUID primary keys and foreign key constraints (line 163)
  • CHECK constraints for status and interval enums (lines 166-167)
  • Appropriate indexes for common query patterns (lines 190-198)
  • Automatic updated_at triggers (lines 210-218)
  • Helpful comments for maintainability

One minor suggestion: Consider adding a comment explaining why NUMERIC(10, 2) was chosen for amount fields vs. other numeric precision options, though this is optional documentation enhancement.

πŸ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 9200f20 and 429d5a8.

πŸ“’ Files selected for processing (5)
  • developer-resources/webhooks/examples/cloudflare-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/netlify-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/supabase-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/vercel-example.mdx (1 hunks)
  • docs.json (1 hunks)
🧰 Additional context used
πŸ““ Path-based instructions (2)
**/*.{md,mdx}

πŸ“„ CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

Every documentation page must begin with YAML frontmatter containing title and description

Files:

  • developer-resources/webhooks/examples/vercel-example.mdx
  • developer-resources/webhooks/examples/netlify-example.mdx
  • developer-resources/webhooks/examples/cloudflare-example.mdx
  • developer-resources/webhooks/examples/supabase-example.mdx
**/*.mdx

πŸ“„ CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

**/*.mdx: Use clear, direct language appropriate for technical audiences
Write instructions in second person (you)
Use active voice over passive voice
Use present tense for current states and future tense for outcomes
Maintain consistent terminology across documentation
Keep sentences concise while preserving necessary context
Use parallel structure in lists, headings, and procedures
Lead sections with the most important information (inverted pyramid)
Use progressive disclosure: introduce basics before advanced topics
Break complex procedures into numbered steps using /
Include prerequisites and context before instructions
Provide expected outcomes for each major step
End sections with next steps or related information
Use descriptive, keyword-rich headings for navigation and SEO
Focus on user goals and outcomes rather than system features
Anticipate common questions and address them proactively
Include troubleshooting for likely failure points
Provide multiple pathways (beginner vs advanced) when appropriate, with an opinionated recommended path
Use for supplementary information that supports main content
Use for expert advice, shortcuts, or best practices
Use for critical cautions, breaking changes, or destructive actions
Use for neutral background or contextual information
Use for success confirmations or achievement indicators
Use to present the same concept in multiple languages
Provide complete, runnable code examples with language specified and filename when relevant
Include RequestExample/ResponseExample blocks for API endpoint docs
Document API parameters using (path, query, header, body) with types and required/defaults
Document API responses using with names, types, and required flags
Use for nested object properties or hierarchical information
Use / for platform-specific or alternative approaches
Use / for suppl...

Files:

  • developer-resources/webhooks/examples/vercel-example.mdx
  • developer-resources/webhooks/examples/netlify-example.mdx
  • developer-resources/webhooks/examples/cloudflare-example.mdx
  • developer-resources/webhooks/examples/supabase-example.mdx
πŸ”‡ Additional comments (11)
docs.json (1)

169-178: Navigation structure looks good.

The new "Webhook Examples" group is properly nested and positioned, with correct file path references. The icon and grouping align well with existing navigation patterns.

developer-resources/webhooks/examples/cloudflare-example.mdx (2)

1-5: Frontmatter is correct.

All required metadata (title, description, icon) is present and properly formatted.


245-344: Implementation code is comprehensive and well-structured.

The TypeScript implementation includes all essential components:

  • Proper signature verification using standardwebhooks
  • Idempotency enforcement via webhook_id lookup (lines 399-412)
  • Raw event logging for audit trail (lines 414-419)
  • Structured error handling with retry-friendly logging (lines 437-461)
  • CORS configuration with proper header handling

The code demonstrates good practices for webhook handling.

developer-resources/webhooks/examples/netlify-example.mdx (2)

1-5: Frontmatter is correct.

All required metadata present and properly formatted.


232-311: Implementation code is well-structured and Netlify-appropriate.

The handler implementation correctly uses Netlify's Handler pattern with proper:

  • HTTP method routing
  • CORS preflight handling (lines 315-320)
  • Status code and header structure specific to Netlify
  • Signature verification and idempotency logic matching other examples

The code quality and error handling are consistent with the Cloudflare example.

developer-resources/webhooks/examples/supabase-example.mdx (3)

1-5: Frontmatter is correct.

All required metadata present and properly formatted.


11-17: Tip component adds valuable context without interrupting flow.

The Supabase subscription starter kit reference is well-positioned and helps users discover related resources.


220-431: Deno-based implementation is well-structured and appropriate for Supabase Edge Functions.

The implementation correctly:

  • Uses serve() from Deno standard library (line 222)
  • Imports from CDN (esm.sh) appropriate for Deno runtime
  • Implements Supabase client initialization (line 273)
  • Handles idempotency via Supabase queries instead of raw SQL (lines 327-340)
  • Logs events using Supabase client methods (lines 343-358)
  • Includes comprehensive error handling with retry-friendly logging

The Deno/Supabase-specific patterns are correctly implemented.

developer-resources/webhooks/examples/vercel-example.mdx (3)

1-5: Frontmatter is correct.

All required metadata present and properly formatted.


247-251: Config export correctly disables body parsing.

The bodyParser: false configuration is necessary to access the raw request body for webhook signature verification. This is properly documented in the "How It Works" section (line 210).


317-447: Vercel API route implementation correctly uses Web API patterns.

The implementation properly:

  • Exports OPTIONS and POST as named functions (Vercel convention)
  • Uses Web API Request/Response objects
  • Disables body parsing to access raw body for signature verification
  • Implements CORS preflight handling
  • Includes comprehensive error handling and logging
  • Uses helper function for consistent JSON responses

The code demonstrates correct Vercel serverless patterns.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
developer-resources/webhooks/examples/netlify-example.mdx (1)

64-64: Add the definite article to match parallel structure.

This was flagged in the previous review. Line 64 should read "Using the standardwebhooks library" to match the Cloudflare example and maintain consistent phrasing across all webhook guides.

Apply this diff:

-βœ… **Signature verification** - Using standardwebhooks library  
+βœ… **Signature verification** - Using the standardwebhooks library
developer-resources/webhooks/examples/cloudflare-example.mdx (1)

72-72: Add article "the" before library name.

Line 72 reads "Using standardwebhooks library" which is awkward. Revise to "Using the standardwebhooks library" for better readability.

-βœ… **Signature verification** - Using standardwebhooks library  
+βœ… **Signature verification** - Using the standardwebhooks library
🧹 Nitpick comments (4)
developer-resources/webhooks/examples/vercel-example.mdx (1)

242-317: CORS headers should be included in all response types, not just OPTIONS.

The corsHeaders object is defined (line 248) and used in the OPTIONS handler (line 316), but the jsonResponse helper (line 255) does not include them. This means error responses and success responses lack CORS headers, which can cause client-side CORS failures.

Update the jsonResponse helper to consistently include CORS headers in all responses:

function jsonResponse(data: any, status: number = 200) {
  return new Response(JSON.stringify(data), {
    status,
    headers: { 
      'Content-Type': 'application/json',
      ...corsHeaders
    }
  });
}

Alternatively, if CORS is not needed for certain responses, either remove the corsHeaders definition or document why it's only needed for OPTIONS.

developer-resources/webhooks/examples/cloudflare-example.mdx (3)

30-35: Use <Steps>/<Step> component for database setup procedure.

The database setup instructions (lines 30–35) should use Mintlify's <Steps>/<Step> component for consistent UI/UX across the documentation. This applies to the numbered list format here and in the Quick Setup section.

-### 3. Database Setup
-
-1. Sign up for [Neon](https://neon.tech)
-2. Create a new project
-3. Open the SQL Editor
-4. Copy and paste the contents of [`schema.sql`](#database-schema)
-5. Run the query
-6. Get your connection string from Neon β†’ Connection Details
+### 3. Database Setup
+
+<Steps>
+  <Step title="Sign up for Neon">
+    Visit [Neon](https://neon.tech) and create an account.
+  </Step>
+  <Step title="Create a new project">
+    Create a new project in your Neon dashboard.
+  </Step>
+  <Step title="Open the SQL Editor">
+    Navigate to the SQL Editor in your project.
+  </Step>
+  <Step title="Run the database schema">
+    Copy and paste the contents of [`schema.sql`](#database-schema) and run the query.
+  </Step>
+  <Step title="Get your connection string">
+    Retrieve your connection string from Neon β†’ Connection Details for use in configuration.
+  </Step>
+</Steps>

13-26: Quick Setup steps could use <Steps>/<Step> for better UX.

While the numbered structure is clear, consider wrapping the Quick Setup prerequisite check and installation steps (lines 13–26) in <Steps>/<Step> for a polished, consistent Mintlify experience. This is optional but recommended for longer procedural sections.


494-504: Add verification step after deploying webhook endpoint.

After configuring the endpoint in the DodoPayments dashboard (line 502–504), consider adding a <Check> component to confirm the webhook is receiving and processing events. This validates the entire setup end-to-end and aligns with the guideline to include verification and testing steps with expected outcomes.

Example addition:

 **Configure in DodoPayments Dashboard:**
 1. Go to Developers β†’ Webhooks
 2. Add endpoint with your Worker URL
 3. Enable: subscription.active, subscription.cancelled, subscription.renewed
+
+<Check>
+Verify the webhook is working by checking the `webhook_events` table in your Neon database for recent `processed = true` records, or test with a manual webhook trigger from the dashboard.
+</Check>
πŸ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between 429d5a8 and ce8fcc2.

πŸ“’ Files selected for processing (4)
  • developer-resources/webhooks/examples/cloudflare-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/netlify-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/supabase-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/vercel-example.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • developer-resources/webhooks/examples/supabase-example.mdx
🧰 Additional context used
πŸ““ Path-based instructions (2)
**/*.{md,mdx}

πŸ“„ CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

Every documentation page must begin with YAML frontmatter containing title and description

Files:

  • developer-resources/webhooks/examples/netlify-example.mdx
  • developer-resources/webhooks/examples/cloudflare-example.mdx
  • developer-resources/webhooks/examples/vercel-example.mdx
**/*.mdx

πŸ“„ CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

**/*.mdx: Use clear, direct language appropriate for technical audiences
Write instructions in second person (you)
Use active voice over passive voice
Use present tense for current states and future tense for outcomes
Maintain consistent terminology across documentation
Keep sentences concise while preserving necessary context
Use parallel structure in lists, headings, and procedures
Lead sections with the most important information (inverted pyramid)
Use progressive disclosure: introduce basics before advanced topics
Break complex procedures into numbered steps using /
Include prerequisites and context before instructions
Provide expected outcomes for each major step
End sections with next steps or related information
Use descriptive, keyword-rich headings for navigation and SEO
Focus on user goals and outcomes rather than system features
Anticipate common questions and address them proactively
Include troubleshooting for likely failure points
Provide multiple pathways (beginner vs advanced) when appropriate, with an opinionated recommended path
Use for supplementary information that supports main content
Use for expert advice, shortcuts, or best practices
Use for critical cautions, breaking changes, or destructive actions
Use for neutral background or contextual information
Use for success confirmations or achievement indicators
Use to present the same concept in multiple languages
Provide complete, runnable code examples with language specified and filename when relevant
Include RequestExample/ResponseExample blocks for API endpoint docs
Document API parameters using (path, query, header, body) with types and required/defaults
Document API responses using with names, types, and required flags
Use for nested object properties or hierarchical information
Use / for platform-specific or alternative approaches
Use / for suppl...

Files:

  • developer-resources/webhooks/examples/netlify-example.mdx
  • developer-resources/webhooks/examples/cloudflare-example.mdx
  • developer-resources/webhooks/examples/vercel-example.mdx
πŸ”‡ Additional comments (14)
developer-resources/webhooks/examples/netlify-example.mdx (1)

1-514: Documentation quality and completeness look excellent.

The Netlify webhook guide is well-structured with clear progressive disclosure, comprehensive code examples, proper error handling, and practical testing/troubleshooting sections. The implementation demonstrates idempotency via webhook_id, signature verification, database schema design with indexes and triggers, and realistic TypeScript patterns. All prerequisites are upfront, instructions use active voice and second person, and internal/external links are descriptive.

developer-resources/webhooks/examples/vercel-example.mdx (8)

1-5: Frontmatter is complete and properly formatted.

YAML frontmatter includes required title and description fields, and the content structure follows progressive disclosure principles effectively.


11-53: Setup instructions are clear and comprehensive.

Prerequisites, numbered steps, and dual deployment options (CLI and Dashboard) are well-organized and follow documentation best practices. Expected outcome (webhook URL) is provided.


69-113: Configuration files are correctly structured for Vercel TypeScript project.

Both package.json and tsconfig.json are properly configured with ES2022 modules, appropriate dependencies, and correct include/exclude patterns for Vercel Functions.


115-210: Database schema is well-designed and production-ready.

Table structures include proper foreign keys, CHECK constraints, comprehensive indexes optimized for webhook queries, and automatic timestamp triggers. The unique constraint on webhook_id correctly enforces idempotency.


320-442: Error handling and business logic are well-implemented.

The handler correctly:

  • Validates environment variables before use (lines 327-342)
  • Verifies webhook signatures and returns 401 on failure (line 350-357)
  • Implements idempotency by checking webhook_id before processing (line 367-376)
  • Logs all events to database for audit trail and retry purposes (line 379-386)
  • Catches and logs processing errors while marking events as unprocessed (line 413-425)
  • Returns appropriate HTTP status codes with descriptive error messages

The flow ensures webhooks can be safely replayed by DodoPayments without duplicate side effects.


446-471: Testing and troubleshooting guidance is clear and complete.

The "How It Works" section accurately describes the implementation flow, and the Testing section provides both local development (npm run dev) and production debugging paths (Vercel Dashboard logs and DodoPayments Dashboard configuration).


473-487: Common issues and resources sections are well-curated.

The troubleshooting table addresses likely failure points (verification, database, timeout, environment variables) with actionable solutions. Resources section provides appropriate external documentation links and references the internal Webhook Events Guide.


62-67: Key Features section is accurate and consistent with implementation.

All listed features (signature verification, idempotency, event logging, error handling) are correctly implemented in the code and properly described with supporting details. The grammar is also consistent with other webhook example guides.

developer-resources/webhooks/examples/cloudflare-example.mdx (5)

1-5: YAML frontmatter looks good.

The frontmatter includes required title and description fields. All set for documentation indexing and SEO.


244-482: TypeScript implementation is comprehensive and production-ready.

The worker.ts code includes strong error handling (lines 362–368, 376–386, 445–457), proper signature verification, idempotency checks, comprehensive logging, and well-structured database operations. Realistic data handling, appropriate use of templates in SQL, and clear comments make it easy to understand the flow. Database upsert patterns (lines 303–312, 318–336) are correct and safe.


143-232: Database schema is well-structured with production best practices.

Comprehensive schema includes proper indexes (lines 190–198) on frequently queried columns, triggers for auto-updating timestamps (lines 210–218), detailed comments for maintainability, and appropriate constraints (line 166). Webhook idempotency support via webhook_id (line 179) and error tracking (line 183) are well thought out.


80-137: Configuration files are realistic and complete.

The package.json (lines 80–101), wrangler.toml (lines 104–116), and tsconfig.json (lines 118–137) all reflect realistic dependencies and settings for a production Cloudflare Workers setup. Versions are pinned appropriately, and observability configuration is included.


506-512: Troubleshooting table covers key failure points.

The Common Issues table addresses signature verification failures, database connectivity, and deployment issuesβ€”all likely pain points. Solutions are actionable and specific.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🧹 Nitpick comments (2)
developer-resources/webhooks/examples/cloudflare-example.mdx (2)

28-35: Add guidance context for Database Setup step.

The Database Setup section directs users to set up Neon and run SQL, but lacks a component explaining this is critical setup. Consider adding a brief note about connection strings or error troubleshooting here.

Apply this enhancement to improve user experience:

 ### 3. Database Setup
 
+<Note>
+Ensure you have SQL Editor access in Neon before proceeding. The connection string will be needed for environment variables in the next step.
+</Note>
+
 1. Sign up for [Neon](https://neon.tech)

146-236: ⚠️ Duplicate schema across multiple integration guides.

The database schema (lines 146–236) is identical across cloudflare-example.mdx, netlify-example.mdx, and likely the other platform guides. Consider whether this content should be extracted into a shared schema reference page to avoid duplication and maintenance burden.

This is a maintenance improvement for the documentation structure, not a functional issue. Consider creating a dedicated /developer-resources/webhooks/shared-schema.mdx page that all platform guides reference, reducing redundancy and making future schema updates easier.

πŸ“œ Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between ce8fcc2 and 8568ece.

πŸ“’ Files selected for processing (4)
  • developer-resources/webhooks/examples/cloudflare-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/netlify-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/supabase-example.mdx (1 hunks)
  • developer-resources/webhooks/examples/vercel-example.mdx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • developer-resources/webhooks/examples/supabase-example.mdx
  • developer-resources/webhooks/examples/vercel-example.mdx
🧰 Additional context used
πŸ““ Path-based instructions (2)
**/*.{md,mdx}

πŸ“„ CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

Every documentation page must begin with YAML frontmatter containing title and description

Files:

  • developer-resources/webhooks/examples/netlify-example.mdx
  • developer-resources/webhooks/examples/cloudflare-example.mdx
**/*.mdx

πŸ“„ CodeRabbit inference engine (.cursor/rules/mintlify.mdc)

**/*.mdx: Use clear, direct language appropriate for technical audiences
Write instructions in second person (you)
Use active voice over passive voice
Use present tense for current states and future tense for outcomes
Maintain consistent terminology across documentation
Keep sentences concise while preserving necessary context
Use parallel structure in lists, headings, and procedures
Lead sections with the most important information (inverted pyramid)
Use progressive disclosure: introduce basics before advanced topics
Break complex procedures into numbered steps using /
Include prerequisites and context before instructions
Provide expected outcomes for each major step
End sections with next steps or related information
Use descriptive, keyword-rich headings for navigation and SEO
Focus on user goals and outcomes rather than system features
Anticipate common questions and address them proactively
Include troubleshooting for likely failure points
Provide multiple pathways (beginner vs advanced) when appropriate, with an opinionated recommended path
Use for supplementary information that supports main content
Use for expert advice, shortcuts, or best practices
Use for critical cautions, breaking changes, or destructive actions
Use for neutral background or contextual information
Use for success confirmations or achievement indicators
Use to present the same concept in multiple languages
Provide complete, runnable code examples with language specified and filename when relevant
Include RequestExample/ResponseExample blocks for API endpoint docs
Document API parameters using (path, query, header, body) with types and required/defaults
Document API responses using with names, types, and required flags
Use for nested object properties or hierarchical information
Use / for platform-specific or alternative approaches
Use / for suppl...

Files:

  • developer-resources/webhooks/examples/netlify-example.mdx
  • developer-resources/webhooks/examples/cloudflare-example.mdx
🧠 Learnings (2)
πŸ“š Learning: 2025-09-15T12:32:29.480Z
Learnt from: CR
PR: dodopayments/dodo-docs#0
File: .cursor/rules/mintlify.mdc:0-0
Timestamp: 2025-09-15T12:32:29.480Z
Learning: Applies to **/*.mdx : Use <Update> to document versioned changes with clear labels and descriptions

Applied to files:

  • developer-resources/webhooks/examples/cloudflare-example.mdx
πŸ“š Learning: 2025-09-15T12:32:29.480Z
Learnt from: CR
PR: dodopayments/dodo-docs#0
File: .cursor/rules/mintlify.mdc:0-0
Timestamp: 2025-09-15T12:32:29.480Z
Learning: Applies to **/*.mdx : Test all links to ensure they are functional and relevant

Applied to files:

  • developer-resources/webhooks/examples/cloudflare-example.mdx
πŸ”‡ Additional comments (3)
developer-resources/webhooks/examples/netlify-example.mdx (2)

37-45: βœ… Good UX guidance for environment variables.

The section provides both CLI and dashboard options for setting environment variables (lines 40-42 and line 45). This is excellent guidance that accommodates different user preferences.


310-486: βœ… Platform-appropriate implementation for Netlify Functions.

The handler correctly uses Netlify's Handler interface, properly accesses the event object, and returns the correct response format. The webhook verification, idempotency, and event processing logic mirror the Cloudflare implementation appropriately.

developer-resources/webhooks/examples/cloudflare-example.mdx (1)

107-119: The expandable meta option on fenced code blocks inside CodeGroup is the correct Mintlify syntax. The code block at lines 107-119 uses the correct format: wrangler.toml expandable follows the pattern of language filename expandable.

No issues found with the code block syntax.

Comment on lines +7 to +9
<Card title="GitHub Repository" icon="github" href="https://github.com/dodopayments/cloud-functions/tree/main/cloudflare">
Complete source code and setup guide
</Card>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

⚠️ Verify GitHub repository link status.

The GitHub repository link at line 7 points to https://github.com/dodopayments/cloud-functions/tree/main/cloudflare. Previous reviews flagged this URL as broken (404 error), and the repository does not exist in the dodopayments GitHub organization. Confirm whether this repository exists now or should be removed/updated to a correct resource.


🌐 Web query:

Does the GitHub repository dodopayments/cloud-functions exist and is the cloudflare subdirectory available?

πŸ’‘ Result:

I checked GitHub on Oct 30, 2025: the repository https://github.com/dodopayments/cloud-functions returns 404 (not found), and there is no visible "cloud-functions" repo under the dodopayments organization β€” so the repo does not appear to exist (publicly) and therefore no cloudflare subdirectory is available. [1][2]

Sources:

  • GitHub repo URL check (404). [1]
  • dodopayments organization repositories listing (no cloud-functions). [2]

Remove or replace the broken GitHub repository link.

The GitHub repository link at line 7-9 points to a non-existent repository (dodopayments/cloud-functions returns 404). Either remove the Card component entirely or replace the href with a valid resource that provides the complete source code and setup guide.

πŸ€– Prompt for AI Agents
In developer-resources/webhooks/examples/cloudflare-example.mdx around lines 7
to 9, the Card component links to a non-existent GitHub repo
(dodopayments/cloud-functions) causing a 404; either remove this Card or replace
its href with a valid URL that contains the complete source code and setup guide
(or point to an internal repo/path or official docs), and update the Card text
if needed to reflect the new resource; ensure the link is reachable before
committing.

Comment on lines +531 to +536
## Resources

- [Cloudflare Workers Docs](https://developers.cloudflare.com/workers/)
- [Neon Docs](https://neon.tech/docs/)
- [Webhook Events Guide](/developer-resources/webhooks/intents/webhook-events-guide)
- [GitHub Repo](https://github.com/dodopayments/cloud-functions/tree/main/cloudflare)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

Verify external resource links are current.

The Resources section contains links that should be verified for accuracy. Based on past reviews, the Neon Docs link may redirect, and the GitHub Repo link was flagged as broken. Please confirm all links are current and functional.


🏁 Script executed:

#!/bin/bash
# Verify external links in Resources section are accessible

echo "Checking Cloudflare Workers Docs..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://developers.cloudflare.com/workers/"

echo "Checking Neon Docs..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://neon.tech/docs/"

echo "Checking if webhook-events-guide exists in navigation..."
find . -type f \( -name "*.mdx" -o -name "*.md" \) -exec grep -l "webhook-events-guide" {} \;

Length of output: 625


Now let me search for the specific repo and webhook guide file:


Let me also check the GitHub repo directly in a simpler way:



Let me search for the webhook-events-guide file and verify the GitHub repo:

Let me verify the internal link structure in the codebase:


Based on my verification of the resource links in the Resources section (lines 531-536), I found the following:

**Cloudflare Workers Docs** - βœ“ Accessible (HTTP 200)  
**Neon Docs** - βœ“ Valid redirect (HTTP 308 from `neon.tech/docs` to `neon.com/docs`)  
**Internal webhook-events-guide link** - Requires verification of correct path structure within the codebase  
**GitHub Repo** - Could not be verified through public search

All external links to documented third-party services are functional. The internal link reference should be verified to ensure the path `/developer-resources/webhooks/intents/webhook-events-guide` is correct and the file exists in the documentation structure.

---

🏁 Script executed:

```shell
#!/bin/bash
# Find webhook-events-guide file or reference definition
echo "=== Searching for webhook-events-guide file definition ==="
find . -type f \( -name "*.mdx" -o -name "*.md" -o -name "*.json" \) -exec grep -l "webhook-events-guide" {} \; | head -5

echo ""
echo "=== Checking if file exists directly ==="
find . -type f -name "*webhook-events-guide*"

echo ""
echo "=== Looking at one reference to understand file structure ==="
grep -B2 -A2 "webhook-events-guide" ./developer-resources/webhooks/examples/cloudflare-example.mdx | head -10

Length of output: 930


🏁 Script executed:

#!/bin/bash
# Check if GitHub repo is accessible
echo "Checking GitHub repo link..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://github.com/dodopayments/cloud-functions"

echo ""
echo "Checking GitHub repo tree/cloudflare path..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://github.com/dodopayments/cloud-functions/tree/main/cloudflare"

Length of output: 108


🏁 Script executed:

#!/bin/bash
# Check file structure for webhook-events-guide

echo "=== Looking for webhook-events-guide file ==="
find . -name "*webhook*" -type f | grep -E "\.(mdx|md)$"

echo ""
echo "=== Checking for intents directory ==="
find . -type d -name "intents"

echo ""
echo "=== Searching for actual webhook-events-guide reference ==="
rg -n "webhook-events-guide" --type mdx | head -3

echo ""
echo "=== Checking GitHub repo with curl ==="
curl -s -o /dev/null -w "GitHub repo status: %{http_code}\n" "https://github.com/dodopayments/cloud-functions/tree/main/cloudflare"

Length of output: 792


Fix broken GitHub repository link at line 536.

The GitHub repo link https://github.com/dodopayments/cloud-functions/tree/main/cloudflare returns HTTP 404. Either update the link to the correct repository URL or remove it if the repository is no longer maintained. The other links (Cloudflare Workers Docs, Neon Docs, and internal Webhook Events Guide) are all functional.

πŸ€– Prompt for AI Agents
In developer-resources/webhooks/examples/cloudflare-example.mdx around lines 531
to 536, the GitHub repo link at line 536
(https://github.com/dodopayments/cloud-functions/tree/main/cloudflare) returns
404; either update that href to the correct repository URL (confirm the org/name
and tree/branch/path) or remove the GitHub entry entirely if the repo is
unpublished, and ensure the Resources list order/format remains consistent after
the change.

Comment on lines +7 to +9
<Card title="GitHub Repository" icon="github" href="https://github.com/dodopayments/cloud-functions/tree/main/netlify">
Complete source code and setup guide
</Card>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

⚠️ Verify GitHub repository link status (same as Cloudflare).

The GitHub repository link at line 7 points to https://github.com/dodopayments/cloud-functions/tree/main/netlify. As flagged in the Cloudflare guide, this repository does not exist in the dodopayments GitHub organization. Confirm status or remove this link.


🌐 Web query:

Does the GitHub repository dodopayments/cloud-functions exist and is the netlify subdirectory available?

πŸ’‘ Result:

Short answer: No β€” at the time I checked (Oct 30, 2025) the repository github.com/dodopayments/cloud-functions returns 404, so it does not exist or is not public, and therefore there is no accessible netlify subdirectory. [1][2]

Sources:

  • Direct repo URL check (404). [1]
  • Dodo Payments GitHub organization repositories listing. [2]

Remove the invalid GitHub repository link.

The GitHub repository dodopayments/cloud-functions does not exist or is not public and returns a 404 error. Remove the Card component at lines 7-9 that references this invalid repository link, as it points to an inaccessible resource.

πŸ€– Prompt for AI Agents
In developer-resources/webhooks/examples/netlify-example.mdx around lines 7 to
9, remove the Card component that links to the invalid GitHub repository
(https://github.com/dodopayments/cloud-functions) because it returns 404; delete
those three lines (the entire Card block) or replace the href and content with a
valid public repo or a different resource if needed.

Comment on lines +525 to +531
## Resources

- [Netlify Functions Docs](https://docs.netlify.com/functions/overview/)
- [Netlify CLI](https://docs.netlify.com/cli/get-started/)
- [Neon Docs](https://neon.tech/docs/)
- [Webhook Events Guide](/developer-resources/webhooks/intents/webhook-events-guide)
- [GitHub Repo](https://github.com/dodopayments/cloud-functions/tree/main/netlify)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

🧩 Analysis chain

Verify external resource links in Resources section.

The Resources section contains external links that should be verified. The GitHub Repo link (line 531) was flagged in previous reviews as broken, and the Neon Docs link may redirect.


🏁 Script executed:

#!/bin/bash
# Verify Netlify-specific documentation links

echo "Checking Netlify Functions Docs..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://docs.netlify.com/functions/overview/"

echo "Checking Netlify CLI Docs..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://docs.netlify.com/cli/get-started/"

echo "Checking Neon Docs..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://neon.tech/docs/"

Length of output: 136


🏁 Script executed:

#!/bin/bash
# Verify internal link exists
echo "Searching for webhook-events-guide documentation..."
fd -t f "webhook-events-guide" 2>/dev/null || echo "File not found via fd"

echo ""
echo "Checking GitHub Repo link..."
curl -s -o /dev/null -w "HTTP Status: %{http_code}\n" "https://github.com/dodopayments/cloud-functions/tree/main/netlify"

echo ""
echo "Searching for any webhook events guide files in developer-resources..."
fd -t f "webhook" developer-resources/ 2>/dev/null | head -20 || echo "Search completed"

Length of output: 327


Fix broken GitHub repository link in Resources section (line 531).

The GitHub Repo link returns HTTP 404 and is inaccessible. This link should be updated or removed. The other external links (Netlify Functions Docs, Netlify CLI, Neon Docs) redirect normally and are functional. The internal Webhook Events Guide link exists and is correct.

πŸ€– Prompt for AI Agents
In developer-resources/webhooks/examples/netlify-example.mdx around lines 525 to
531, the "GitHub Repo" link points to a 404 page; update or remove it: either
replace the broken URL with the correct repository path (verify the org/name and
branch) or remove the GitHub Repo bullet entirely, and then confirm the
Resources section renders with a reachable link or no broken link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant