Skip to content

Conversation

@waleedlatif1
Copy link
Collaborator

@waleedlatif1 waleedlatif1 commented Nov 5, 2025

Summary

  • added 50+ stripe tools and trigger and docs

Type of Change

  • New feature

Testing

Tested manually

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel
Copy link

vercel bot commented Nov 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Nov 7, 2025 6:55pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

Added comprehensive Stripe integration with 51 tools covering all major Stripe operations and a webhook trigger for event-driven workflows.

Key Changes

  • 51 Stripe Tools: Created tools for payment intents (8), customers (6), subscriptions (7), invoices (10), charges (6), products (6), prices (5), and events (2)
  • Stripe Block Configuration: apps/sim/blocks/blocks/stripe.ts provides a unified UI with 40+ operations, conditional field rendering, and JSON parsing for complex parameters
  • Webhook Trigger: apps/sim/triggers/stripe/webhook.ts supports 60+ Stripe event types with signature verification and event filtering
  • Type Definitions: apps/sim/tools/stripe/types.ts includes 746 lines of comprehensive TypeScript interfaces for all operations
  • Event Filtering: Enhanced webhook route to filter Stripe events based on user configuration
  • Documentation: Added 1070-line documentation file with detailed parameter specifications

Implementation Quality

  • Consistent tool implementation pattern across all 51 tools
  • Proper URL-encoded body formatting for Stripe API
  • Comprehensive metadata handling and response transformation
  • Well-structured conditional UI fields in block configuration
  • Follows existing patterns from other integrations (GitHub, Google Calendar)

Confidence Score: 5/5

  • Safe to merge - comprehensive implementation following established patterns with no security or logical issues identified.
  • The implementation is well-structured, comprehensive, and follows existing codebase patterns. All 51 tools use consistent patterns, proper TypeScript typing, correct Stripe API formatting, and appropriate error handling. The webhook implementation includes proper signature verification and event filtering. Code is production-ready.
  • No files require special attention. All implementations follow consistent patterns and are well-structured.

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/blocks/blocks/stripe.ts 5/5 Comprehensive Stripe block configuration with 40+ operations covering payment intents, customers, subscriptions, invoices, charges, products, prices, and events. Well-structured with conditional UI fields and proper input/output definitions.
apps/sim/triggers/stripe/webhook.ts 5/5 Stripe webhook trigger config with comprehensive event types covering all major Stripe events. Includes setup instructions and sample payload for user guidance.
apps/sim/tools/stripe/types.ts 5/5 Complete TypeScript type definitions for all Stripe resources. Well-organized with proper interfaces for params and responses for each operation.
apps/sim/tools/stripe/index.ts 5/5 Central export file for all 51 Stripe tool implementations, properly organized and exported.
apps/sim/app/api/webhooks/trigger/[path]/route.ts 5/5 Added event type filtering for Stripe webhooks (lines 149-163), allows users to filter incoming events based on configuration.
apps/docs/content/docs/en/tools/stripe.mdx 5/5 Comprehensive documentation for all Stripe tools with detailed parameter and output specifications.

Sequence Diagram

sequenceDiagram
    participant User
    participant UI as Stripe Block UI
    participant Block as Stripe Block
    participant Tool as Stripe Tool
    participant API as Stripe API
    participant Webhook as Webhook Endpoint
    participant Workflow as Workflow Engine

    Note over User,Workflow: Standard Tool Operation Flow
    User->>UI: Select operation & enter params
    UI->>Block: operation + params (JSON fields parsed)
    Block->>Block: Parse JSON (address, metadata, items, etc)
    Block->>Block: Convert string booleans to boolean
    Block->>Tool: Call stripe_{operation} with params
    Tool->>Tool: Build URL-encoded body
    Tool->>API: POST/GET with Authorization header
    API-->>Tool: Stripe response (JSON)
    Tool->>Tool: Transform response
    Tool-->>Block: Return output with metadata
    Block-->>User: Display results

    Note over User,Workflow: Webhook Trigger Flow
    API->>Webhook: POST webhook event
    Webhook->>Webhook: Parse webhook body
    Webhook->>Webhook: Verify Stripe signature
    Webhook->>Webhook: Check event type filter
    alt Event type matches filter
        Webhook->>Workflow: Queue workflow execution
        Workflow->>Workflow: Execute with event data
        Workflow-->>API: Return 200 OK
    else Event type filtered
        Webhook-->>API: Return 200 (skip execution)
    end
Loading

61 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@waleedlatif1 waleedlatif1 changed the title feat(tools): added 40+ stripe tools and trigger and docs feat(tools): added 450+ stripe tools and trigger and docs Nov 5, 2025
@waleedlatif1 waleedlatif1 changed the title feat(tools): added 450+ stripe tools and trigger and docs feat(tools): added 50+ stripe tools and trigger and docs Nov 5, 2025
@waleedlatif1
Copy link
Collaborator Author

@greptile

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Overview

Greptile Summary

This PR adds comprehensive Stripe integration with 50+ tools covering the full Stripe API surface area and webhook trigger support for real-time event handling.

Key Changes

  • 50+ Stripe Tools: Complete CRUD operations for payment intents, customers, subscriptions, invoices, charges, products, prices, and events
  • Type-Safe Implementation: Comprehensive TypeScript types (apps/sim/tools/stripe/types.ts) with proper interfaces for all Stripe entities
  • Webhook Trigger: Enhanced Stripe webhook trigger with 40+ event types, event filtering, and signature verification support
  • Event Filtering: Added smart event type filtering in webhook route handler to only execute workflows for configured events
  • UI Integration: Complete block configuration with conditional fields, JSON parsing, and boolean conversion
  • Comprehensive Documentation: Full documentation with usage examples for all 50+ tools

Implementation Details

  • All tools follow consistent patterns with proper form-urlencoded body formatting for Stripe API
  • Nested fields handled correctly (e.g., metadata[key], items[0][price], address[city])
  • Proper response transformation with metadata extraction for easy downstream usage
  • Webhook signature verification using signing secret for security
  • Event type filtering allows users to control which Stripe events trigger workflow execution

Confidence Score: 5/5

  • This PR is safe to merge with high confidence - well-structured implementation following established patterns
  • The implementation is excellent with consistent patterns across all 50+ tools, proper type safety, comprehensive testing surface (manual testing mentioned), correct Stripe API integration patterns, good error handling structure, and thorough documentation. All tools follow the same proven architecture used in existing integrations.
  • No files require special attention - all implementations follow consistent patterns and best practices

Important Files Changed

File Analysis

Filename Score Overview
apps/sim/tools/stripe/types.ts 5/5 Added comprehensive TypeScript type definitions for all Stripe entities (payment intents, customers, subscriptions, invoices, charges, products, prices, events) with proper type safety
apps/sim/triggers/stripe/webhook.ts 5/5 Enhanced webhook trigger configuration with 40+ event types, event filtering, webhook signing secret support, and comprehensive setup instructions
apps/sim/app/api/webhooks/trigger/[path]/route.ts 5/5 Added event type filtering logic for Stripe webhooks to filter events based on configured event types before execution
apps/sim/blocks/blocks/stripe.ts 5/5 Comprehensive Stripe block configuration with 50+ operations, conditional UI fields, JSON parsing, boolean conversion, and webhook trigger integration
apps/sim/tools/registry.ts 5/5 Registered all 50+ Stripe tools in the tools registry with proper imports and naming conventions
apps/docs/content/docs/en/tools/stripe.mdx 5/5 Comprehensive documentation for all 50+ Stripe tools with usage instructions, parameters, and examples

Sequence Diagram

sequenceDiagram
    participant User
    participant Workflow
    participant StripeBlock
    participant StripeTool
    participant StripeAPI
    participant StripeWebhook
    participant WebhookRoute
    
    Note over User,StripeAPI: Action Flow (Tools)
    User->>Workflow: Configure Stripe block with operation
    Workflow->>StripeBlock: Execute block with parameters
    StripeBlock->>StripeBlock: Parse JSON fields (address, metadata, items)
    StripeBlock->>StripeBlock: Convert boolean strings to actual booleans
    StripeBlock->>StripeTool: Call selected tool (e.g., stripe_create_payment_intent)
    StripeTool->>StripeTool: Format body as form-urlencoded
    StripeTool->>StripeTool: Handle nested fields (metadata[key], items[0][price])
    StripeTool->>StripeAPI: POST/GET with Bearer token authentication
    StripeAPI-->>StripeTool: Return Stripe object (payment_intent, customer, etc.)
    StripeTool->>StripeTool: Transform response with metadata extraction
    StripeTool-->>StripeBlock: Return ToolResponse with output and metadata
    StripeBlock-->>Workflow: Return result
    Workflow-->>User: Display operation result
    
    Note over User,WebhookRoute: Trigger Flow (Webhooks)
    User->>StripeWebhook: Configure webhook with URL and event types
    User->>StripeAPI: Register webhook endpoint in Stripe Dashboard
    StripeAPI->>WebhookRoute: POST webhook event (e.g., payment_intent.succeeded)
    WebhookRoute->>WebhookRoute: Verify webhook signature with signing secret
    WebhookRoute->>WebhookRoute: Check if event type in allowed list
    alt Event type matches filter
        WebhookRoute->>Workflow: Queue workflow execution with event data
        Workflow->>Workflow: Process event (access event.type, event.data, etc.)
        Workflow-->>User: Execute workflow actions
    else Event type filtered
        WebhookRoute-->>StripeAPI: Return 200 (event type filtered)
    end
Loading

62 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

…recrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily
@gitguardian
Copy link

gitguardian bot commented Nov 7, 2025

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@waleedlatif1 waleedlatif1 merged commit c3436e9 into staging Nov 7, 2025
9 checks passed
@waleedlatif1 waleedlatif1 deleted the sim-270 branch November 7, 2025 18:59
Sg312 pushed a commit that referenced this pull request Nov 7, 2025
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 40+ stripe tools and trigger

* added stripe tools to registry

* added number validation, tested all stripe tools

* update stripe payload, tested webhooks
@waleedlatif1 waleedlatif1 mentioned this pull request Nov 7, 2025
10 tasks
waleedlatif1 added a commit that referenced this pull request Nov 9, 2025
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 40+ stripe tools and trigger

* added stripe tools to registry

* added number validation, tested all stripe tools

* update stripe payload, tested webhooks
waleedlatif1 added a commit that referenced this pull request Nov 12, 2025
* feat(tools): added 150+ new tools across confluence, discord, exa, firecrawl, jina, jira, linear, linkup, MS suite, parallel, reddit, supabase, & tavily

* feat(tools): added 40+ stripe tools and trigger

* added stripe tools to registry

* added number validation, tested all stripe tools

* update stripe payload, tested webhooks
@waleedlatif1 waleedlatif1 mentioned this pull request Nov 12, 2025
10 tasks
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.

2 participants