Get Plans Flow

Client UI Initiates Request
The client UI calls the
useBillingPlans hook to trigger a call to the billing API.Billing API Validates Session
The billing API queries the client backend app to check the validity of the session and retrieve user details.
Return error to client if session is not valid
If the session is not valid, the billing API will return an error to the client UI.
Billing API Queries Lago
If session is valid then based on the user details, the billing API queries Lago to return the plans for the user. Currently, all plans are fixed for each client.