Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MG-11 - Remove super admin content from billing #20

Merged
merged 8 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 0 additions & 121 deletions docs/billing.md

This file was deleted.

63 changes: 63 additions & 0 deletions docs/domain-management/billing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: Billing
---

This service allows users to view and subscribe to billing plans, manage payment methods and billing information, and download generated invoices and receipts.
Magistrala employs the use of [Stripe](https://docs.stripe.com/) to handle the user's private information.
This means that Magistrala will not have the user's card payment credentials at any point in time.

Navigate to the Billing tab on the sidenav bar. This tab will only be visible to admin members of a domain.

## Overview
The billing page has multiple sections present each important to the billing process.

![Billing Page](../img/billing/billing-page.png)

In a newly created domain without any data on billing, all the sections will be empty.


## Add Billing Information
This section includes the user's contact details such as addresses, emails, and the name of the user to whom the subscription will be charged.
![Billing](../img/billing/billing-information.png)

To fill this section, click on `Add` to trigger a dialogbox.
On the form, you are required to fill in the Name, Email, Phone, Country and City of the billed customer.
State and Province or Addresses are optional but help in the creation of invoices.
After filling in the required data, click `Add` and the information will be fed into the system.

![Billing Information](../img/billing/add-bill-info.png)

## Subscribe to a Billing Plan
The subscription section handles the domain's subscription plan and shows the status of the subscription.

The first step is to add a billing plan to the domain this done by clicking `Choose` will display a list of available subscription plans.

![Billing-plan-addition](../img/billing/choose.png)

The subscription status can be either be **completed** where the user has already been charged or **incomplete** where the process is not yet done and the subscription is inactive.

The **plan details** generally show the user the limits of their subscribed plan. This ensures they are aware of their restrictions at all times. These limits define what can be accessed in terms of domains, users, groups, and devices.

## Add a Payment Method
Click on the `Add` button to gain access to the stripe page where you will fill in your cards or paypal information.
A succesful update will lead you back to the Magistrala billing page with an active payment method.

![Adding the Card](../img/billing/add-card.png)

You can add as many payment cards as needed.
Each card will be verified by stripe to prevent any fraudulent cards from being accepted. Ensure that the card has sufficient funds to cover the subscription cost.
You can also edit payment methods, set a default card and delete any payment method.

![Add multiple cards](../img/billing/pm-table.png)

To set a payment method as default simply select 'Set as default' in the dropdown. Once payment method has been set as default, a badge showing default appears. To delete a payment method simply select 'delete' on the dropdown and the payment method will be deleted.

## Generate an Invoice
Once the plan is selected, an invoice will be generated that can be downloaded by clicking the invoice icon downloads a pdf with all the required data.
![Invoice section](../img/billing/invoice.png)


## Generate a Receipt
Once payment is received, there will be an receipt generated that a user can download by clicking on the receipt icon.

![Invoice section](../img/billing/receipt.png)
96 changes: 96 additions & 0 deletions docs/domain-management/domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: Domain
---

## Domain Information

Navigate to the `Domain` section in the side navigation under **Domain Management** to find out more about the domain.

Here a user can edit the Domain Name, Alias, Tags and Metadata as well as copy the Domain ID.

The Domain status can be disabled by clicking the `Disable` button or enabled by the `Enable` button. Disabling the domain will revoke the access for users who are not domain admins.

![Domain Info](../img/domain/domain-info.png)

## Domain Roles

From the roles section of the domain, the user can create new roles with varying role actions.

By default, an admin role with complete control over the domain is always present and granted to the Domain creator.

![Domain Roles](../img/domain/roles.png)

This is a domain role actions comprehensive list:

- **Domain Management**

- update
- enable
- disable
- read
- delete

- **Role Management**

- manage_role
- add_role_users
- remove_role_users
- view_role_users

- **Client Management**

- client_create
- client_update
- client_read
- client_delete
- client_set_parent_group
- client_connect_to_channel
- client_manage_role
- client_add_role_users
- client_remove_role_users
- client_view_role_users

- **Channel Management**

- channel_create
- channel_update
- channel_read
- channel_delete
- channel_set_parent_group
- channel_connect_to_client
- channel_publish
- channel_subscribe
- channel_manage_role
- channel_add_role_users
- channel_remove_role_users
- channel_view_role_users

- **Group Management**

- group_create
- group_update
- group_read
- group_delete
- group_membership
- group_set_child
- group_set_parent
- group_manage_role
- group_add_role_users
- group_remove_role_users
- group_view_role_users

To create a new role, click on the `+ Create` button, provide a descriptive name for the role, and optionally add users and actions

![Create Domain Role](../img/domain/create-role.png)

Once created, these domain roles can be edited in their respective pages.
A user can edit the domain role id, name, role actions and role members. These fields can all be edited accordingly while on the page or by using the options on the dropdown menu.

![Domain Role Page](../img/domain/domain-role-id.png)
![Domain Action Buttons](../img/domain/role-actions.png)

## Domain Members

An admin or a member with the right permissions can assign users to a domain. Members must be assigned with specific roles.

> This feature is currently under development :hammer:
7 changes: 7 additions & 0 deletions docs/domain-management/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Introduction
---

This section will detail management of a domain, creation of roles, assigning of users to the domain, invitation of users to the domains and management of billing and subscriptions of the domain.

Within the billing section a user will be able to manage subscriptions, add or update billing plans, add payment methods, download invoices and receipts. Lastly, in the invitations section a user is able to manage sent and received invitations.
5 changes: 5 additions & 0 deletions docs/domain-management/invitations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: Invitations
---

> This feature is currently under development :hammer:
Loading