-
Couldn't load subscription status.
- Fork 24
feat(webhooks): add webhook examples for cloudflare, netlify, supabase and vercel #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(webhooks): add webhook examples for cloudflare, netlify, supabase and vercel #127
Conversation
WalkthroughAdds 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
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
Estimated code review effortπ― 3 (Moderate) | β±οΈ ~25 minutes
Poem
Pre-merge checks and finishing touchesβ Failed checks (1 warning)
β Passed checks (2 passed)
β¨ Finishing touchesπ§ͺ Generate unit tests (beta)
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. Comment |
There was a problem hiding this 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
π 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.mdxdeveloper-resources/webhooks/examples/netlify-example.mdxdeveloper-resources/webhooks/examples/cloudflare-example.mdxdeveloper-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.mdxdeveloper-resources/webhooks/examples/netlify-example.mdxdeveloper-resources/webhooks/examples/cloudflare-example.mdxdeveloper-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: falseconfiguration 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.
There was a problem hiding this 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 librarydeveloper-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
corsHeadersobject is defined (line 248) and used in the OPTIONS handler (line 316), but thejsonResponsehelper (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
jsonResponsehelper 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
corsHeadersdefinition 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
π 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.mdxdeveloper-resources/webhooks/examples/cloudflare-example.mdxdeveloper-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.mdxdeveloper-resources/webhooks/examples/cloudflare-example.mdxdeveloper-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_idbefore 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.
There was a problem hiding this 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.mdxpage that all platform guides reference, reducing redundancy and making future schema updates easier.
π Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
π 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.mdxdeveloper-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.mdxdeveloper-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
Handlerinterface, 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: Theexpandablemeta 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 expandablefollows the pattern oflanguage filename expandable.No issues found with the code block syntax.
| <Card title="GitHub Repository" icon="github" href="https://github.com/dodopayments/cloud-functions/tree/main/cloudflare"> | ||
| Complete source code and setup guide | ||
| </Card> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
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.
| ## 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© 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.
| <Card title="GitHub Repository" icon="github" href="https://github.com/dodopayments/cloud-functions/tree/main/netlify"> | ||
| Complete source code and setup guide | ||
| </Card> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© Analysis chain
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.
| ## 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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
π§© 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.
π Description
Adds webhook examples documentation for cloudflare, netlify, supabase and vercel with subscription events
π― Type of Change
π What documentation does this PR affect?
β Checklist
mintlify devdocs.json(if applicable)π§ͺ Testing
πΈ Screenshots (if applicable)
π Related Issues
Closes #
π Additional Notes
π₯ Reviewers
@dodopayments/documentation-team
Summary by CodeRabbit