sap-labs-france / ev-dashboard

The Open e-Mobility Charging Station management front-end Angular application (check also ev-server and ev-mobile)
https://open-e-mobility.fr/
Apache License 2.0
71 stars 103 forks source link

Billing Platform - STRIPE Sub-accounts administration UI #3180

Open ClaudeROSSI opened 2 years ago

ClaudeROSSI commented 2 years ago

In BILLING Settings, when BILLING_PLATFORM module is enabled, the billing settings tab should grant the admin the possibility to see a list of sub-accounts. This list will show data provided by the new BILLING endpoints.

Interfaces: image.png

The list should show the columns:

The account link is not shown. This information is sent by mail to the business owner when triggering the onboarding process.

The list should allow adding a new subaccount - so we have on the top of the list a "Add Sub-account" button opening a dedicated popup. This popup allows (at least) to select the (future) business owner of the sub-account. By pressing "Save" a sub-account gets created with the initial state (i.e.: IDLE)

On each line, when the state is IDLE we should be able to trigger the onboarding process by calling the corresponding onboard endpoint. This action transitions the status from IDLE to PENDING, populates the accountLink property and sends it by mail to the owner.

It should be possible to edit the subaccount to change the userID. When the status is PENDING no additional action is possible.

The onboarding process is done via some STRIPE wizard and returns the final accountID. Once we have it the state is set to ACTIVE.

Only the admin can add/edit/onboard a subaccount. There is no plan to allow deleting a subaccount for now!

ClaudeROSSI commented 2 years ago

@RohanAntony: Just created that issue for the onboarding process. Let me know if you need more details.

@Ninjeneer: Shall we add an ERROR state to handle the situation where the onboarding process fails?