Skip to content

Conversation

@rohilsurana
Copy link
Member

Summary

  • Added HTTP bridge handler at /billing/webhooks/callback/{provider} for Stripe webhook callbacks
  • Extracts provider from URL path and forwards to ConnectRPC BillingWebhookCallback handler
  • Preserves raw request body and headers for webhook signature verification
  • Added endpoint to authentication and authorization skip lists
  • Extracts Stripe webhook signature from headers in the handler

Changes

  • Created WebhookBridgeHandler that accepts webhooks with provider in path
  • Routes through full interceptor chain (auth, logging, audit)
  • Comprehensive test coverage for HTTP method validation, path parsing, and request transformation

Context

Stripe doesn't allow modifying webhook request body but allows custom URL paths. This handler enables extracting the provider from the URL path while maintaining compatibility with existing ConnectRPC infrastructure.

- Add WebhookBridgeHandler to handle REST-style webhook callbacks
- Extract provider from URL path (/billing/webhooks/callback/{provider})
- Forward requests to ConnectRPC handler with full interceptor chain
- Preserve raw body and headers (including Stripe-Signature)
- Use constants from consts package for header names
- Add comprehensive tests for HTTP methods, path parsing, and request transformation
@vercel
Copy link

vercel bot commented Jan 16, 2026

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

Project Deployment Review Updated (UTC)
frontier Ready Ready Preview, Comment Jan 16, 2026 7:00am

@coveralls
Copy link

coveralls commented Jan 16, 2026

Pull Request Test Coverage Report for Build 21058450693

Details

  • 54 of 71 (76.06%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.06%) to 37.887%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/api/v1beta1connect/billing_webhook.go 1 3 33.33%
pkg/server/server.go 0 4 0.0%
pkg/server/webhook_bridge.go 53 64 82.81%
Totals Coverage Status
Change from base Build 20983877421: 0.06%
Covered Lines: 15882
Relevant Lines: 41919

💛 - Coveralls

@rohilsurana rohilsurana merged commit d76e2cd into main Jan 16, 2026
7 checks passed
@rohilsurana rohilsurana deleted the feat/webhook-bridge-http-handler branch January 16, 2026 08:22
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.

4 participants