sap-labs-france/ev-dashboard

Billing Platform - STRIPE Sub-accounts administration UI

ClaudeROSSI opened this issue · 1 comments

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:

  • ID
  • accountID (internal ID of the stripe subaccount)
  • Status (IDLE, PENDING, ACTIVE)
  • User Name (Name of the business owner)

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!

@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?