Subscriptions are managed in the product-manager module. The naming has historical reasons when product-manager was meant to cover more products than just subscriptions, but after some design changes it manages just subscriptions, probably a better-suited name would so be the subscription-manager, but renaming it seemed not worth the effort.

DevelopmentController

Contains endpoints that should not be used by both FE and other micro-services. It should be mainly for testing purposes and/or resolving of issues. All endpoints here should be authorized for “other microservice only” although it should not be used in such way.

Currently contains scheduling endpoints for subscription renewal. These should be moved to another controller.

BonusOperationController

Contains endpoints specific to bonus operations. This includes:

  • Create a bonus operation

  • List bonus operations

  • Remove bonus operations

CustomerSubscriptionController

Contains most endpoints that deal with customer subscription in some way. This includes:

  • Create customer subscription

  • Get customer subscription

  • Activate customer subscription

  • Change subscription plans

  • Change autodebit date

  • Pay subscription fee

  • Waive subscription fee and fetch waive availability

  • Freeze and unfreeze customer subscription

FreeSubscriptionController

Contains endpoints specific to free subscriptions. This includes:

  • Create a free subscription record

  • List free subscriptions

  • Invalidate free subscriptions

SubscriptionOperationUsageController

Contains endpoints dealing with subsciption operations:

  • Query info about a potential operation

  • Commit an opearation

  • Revert previously committed operation

SubscriptionPlanController

Contains endpoints dealing with subscription plans in some way. This includes:

  • Create subscription plan

  • List subscription plans

  • Change subscription plan


BillingService

This service is responsible for all operations handling customer money:

  • Charge subscription fees

  • Save fee transaction records

  • Waive subscription fee

  • Get info for last fee billed

BonusOperationService

CustomerService

A light wrapper around customer-manager Api Client, currently only providing a check for customer existence.

CustomerSubscriptionChangeService

CustomerSubscriptionFreezeService

CustomerSubscriptionOverviewService

CustomerSubscriptionService

CustomerSubscriptionSnapshotService

KafkaMessagingService

OutputService

This service provides methods to notify customer via output-manager

PostingService

This service manages sending Thought Machine postings. To be reworked into using common postings library.

SubscriptionOperationUsageService

SubscriptionPlanService

SubscriptionPlanSnapshotService

Attachments:

~drawio~5d682732e90c310c17226629~Untitled Diagram.drawio.tmp (application/vnd.jgraph.mxfile)
~drawio~5d682732e90c310c17226629~Untitled Diagram.drawio.tmp (application/vnd.jgraph.mxfile)
~drawio~5d682732e90c310c17226629~Untitled Diagram.drawio.tmp (application/vnd.jgraph.mxfile)
Untitled Diagram.drawio (application/vnd.jgraph.mxfile)
Untitled Diagram.drawio.png (image/png)
~Untitled Diagram.drawio.tmp (application/vnd.jgraph.mxfile)
Untitled Diagram.drawio (application/vnd.jgraph.mxfile)
Untitled Diagram.drawio.png (image/png)