Currently commercial accounts that integrate with the configured billing system and get invoiced must be configured manually by granting the account BILLING, EXPORT, and IMPORT roles and adding some metadata to the account, like, for the KillBill billing system:
{
"accounting": "kb"
}
This process should be automated, such that users can enable billing themselves. The process could work like:
- Click "Subscribe" button
- Fill in form with necessary billing information, like billing address, billing email, etc. These fields should be defined by the billing service via the SolarNetwork Settings API so a form UI can be generated as appropriate for the user to fill in.
- Submit form, which validates the information and then when OK creates the new account in the billing system and enables billing for the customer (by adding the necessary roles to the user's account).