fix: Complete Polar webhook integration with comprehensive event handling#61
Merged
Conversation
- Handle order.paid events that contain subscription data - Reuse existing subscription creation logic for consistency - Fixes 401 errors when Polar sends order.paid instead of subscription.created 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
- Add handlers for customer.created/updated events - Add handlers for checkout.created/updated events - Add handlers for order.created events - Add handlers for subscription.uncanceled/revoked events - Prevents 401 errors for unhandled webhook event types - Ensures all subscribed events are properly acknowledged 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Handle all Polar webhook event types to prevent 401 errors - Add proper subscription status handling for active/uncanceled/revoked - Add placeholder handlers for order, refund, and informational events - Ensures webhook endpoint responds to all events Polar can send 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Complete fix for Polar webhook integration issues that were preventing subscription sync after payment completion.
Problems Solved
https://www.convertiq.cloud)order.paidevent handler for subscription creationKey Changes
✅ Enhanced webhook handler (
/src/app/api/webhooks/polar/route.ts):order.paidevent handler that creates subscription records✅ Admin recovery tools:
Technical Details
order.paidevents (notsubscription.created) for new subscriptionsTesting
order.paideventsImpact
🤖 Generated with Claude Code