feat(subscription): domain_model for subscription and invoice#9640
Merged
likhinbopanna merged 27 commits intomainfrom Oct 9, 2025
Merged
feat(subscription): domain_model for subscription and invoice#9640likhinbopanna merged 27 commits intomainfrom
likhinbopanna merged 27 commits intomainfrom
Conversation
…scription-domain_model
…scription-domain_model
…scription-domain_model
Changed Files
|
…scription-domain_model
…scription-domain_model
jagan-jaya
previously approved these changes
Oct 8, 2025
jarnura
previously approved these changes
Oct 8, 2025
…scription-domain_model
jagan-jaya
approved these changes
Oct 8, 2025
jarnura
approved these changes
Oct 9, 2025
chaitak-gorai
pushed a commit
that referenced
this pull request
Oct 16, 2025
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Jagan <jaganelavarasan@gmail.com>
drdholu
pushed a commit
to drdholu/hyperswitch
that referenced
this pull request
Oct 30, 2025
…#9640) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Jagan <jaganelavarasan@gmail.com>
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 <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 introduces new domain models for subscriptions and invoices, and refactors the codebase to use these models instead of the previous Diesel-based models. The changes improve type safety and abstraction for subscription and invoice handling, and update relevant interfaces and function calls throughout the codebase to use the new models.
Domain Model Additions:
Subscriptiondomain model incrates/hyperswitch_domain_models/src/subscription.rs, including theSubscriptionStatusenum, conversion traits, and theSubscriptionInterfacetrait for standardized operations. Also added theSubscriptionUpdatestruct with conversion logic.Invoicedomain model incrates/hyperswitch_domain_models/src/invoice.rs, including conversion traits, theInvoiceInterfacetrait for CRUD operations, and theInvoiceUpdatestruct with conversion logic.Refactoring and Integration:
crates/router/src/core/subscription.rsandcrates/router/src/core/subscription/billing_processor_handler.rsto use the new domain models (hyperswitch_domain_models::subscription::Subscriptionandhyperswitch_domain_models::invoice::Invoice) instead of Diesel models. [1] [2] [3] [4] [5] [6] [7] [8]invoice_handler.rsto use the new domain model and retrieve the merchant key store for secure operations.Module Organization:
invoiceandsubscriptionmodules incrates/hyperswitch_domain_models/src/lib.rsfor proper integration with the rest of the domain models. [1] [2]These changes lay the groundwork for improved maintainability and extensibility in handling subscriptions and invoices in the codebase.
How did you test it?
Create Billing Connector
Update profile to set the billing processor
Create Customer
Create Subscription
Confirm Subscription
Screenshots