feat: Add outgoing webhooks for subscriptions#9859
Merged
likhinbopanna merged 26 commits intomainfrom Oct 27, 2025
Merged
Conversation
migrations/2025-10-15-112824_add_invoice_paid_event_type/up.sql
Outdated
Show resolved
Hide resolved
2 tasks
jagan-jaya
requested changes
Oct 15, 2025
jagan-jaya
requested changes
Oct 15, 2025
…ns-outgoing-webhooks
…ns-outgoing-webhooks
…ns-outgoing-webhooks
…juspay/hyperswitch into subscriptions-outgoing-webhooks
jagan-jaya
requested changes
Oct 22, 2025
jagan-jaya
approved these changes
Oct 22, 2025
jarnura
approved these changes
Oct 24, 2025
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9859 +/- ##
=======================================
Coverage ? 3.94%
=======================================
Files ? 1223
Lines ? 299317
Branches ? 0
=======================================
Hits ? 11795
Misses ? 287522
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tsdk02
approved these changes
Oct 24, 2025
aadityaguptaa
pushed a commit
that referenced
this pull request
Nov 10, 2025
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Jagan Elavarasan <jaganelavarasan@gmail.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.
Type of Change
Description
This pull request adds support for subscription-related events and outgoing webhooks throughout the codebase. The changes introduce new types and logic to handle subscription events, such as
InvoicePaid, and ensure that outgoing webhooks are triggered for subscription payments. The implementation includes updates to enums, event metadata, webhook handling, and workflow logic.Subscription Event and Webhook Support
SubscriptionstoEventClass,InvoicePaidtoEventType, and mappedInvoicePaidto Stripe'sinvoice.paidevent type. [1] [2] [3] [4]OutgoingWebhookContent,EventObjectType,EventMetadata, andOutgoingWebhookEventContentenums to support subscription details and metadata. [1] [2] [3] [4] [5]invoice_sync.rsto generate subscription responses, trigger outgoing webhooks for successful and failed payments, and refactored handler return types for better state management. [1] [2] [3] [4] [5] [6] [7]These changes ensure that subscription payments are properly tracked, recorded, and communicated via outgoing webhooks, aligning the subscription flow with other payment-related events.
Additional Changes
Motivation and Context
How did you test it?
1. Create customer
Request
Response
2. Subscription create and confirm
Request
Response
Checklist
cargo +nightly fmt --allcargo clippy