Business Logic Components
Business Logic Components are specialized React components designed to handle complex, multi-step user workflows related to subscription and invoice management. Unlike basic UI components, these components encapsulate entire processes, including API calls, state management, and user interaction, providing a streamlined way to implement critical business functionalities.
These components are useful for handling specific scenarios in a subscription's lifecycle, such as recovering from a failed payment or allowing a user to resume a previously canceled plan.
Component Overview#
This section covers components that address specific business cases you may encounter when managing customer subscriptions.
OverdueInvoicePayment#
The OverdueInvoicePayment component provides a complete solution for users to pay off outstanding invoices. It can be triggered for a specific subscription or for an entire customer account. The component fetches all overdue invoices, groups them by currency and payment method, and presents the user with options to pay. It handles the entire payment flow, including wallet interactions and real-time status updates.
View detailed documentation for OverdueInvoicePayment
ResumeSubscription#
The ResumeSubscription component allows users to reactivate a subscription that has been canceled. It manages the logic of checking if the user needs to re-stake funds to meet the plan's requirements and guides them through the necessary steps using a wallet connection. This simplifies the process of bringing a customer back to an active plan.
View detailed documentation for ResumeSubscription
Next Steps#
Dive into the detailed documentation for each component to understand their props, usage patterns, and see complete integration examples:
- OverdueInvoicePayment: Learn how to help users resolve overdue payments.
- ResumeSubscription: Learn how to allow users to resume canceled subscriptions.