Payments

ScaffoldHub has built-in payments for workspaces using Stripe.

Payments are optional, and you can enable them on the modeling tool.

Check the Setup > Payments with Stripe section for instructions on how to set up payments.

Check the Architecture > Payments sections for technical instructions on how to add or remove plans.

Subscribing

By default, there are three plans, Free, Growth, and Enterprise.

Each workspace starts on the Free plan.

When the User clicks on Subscribe, it opens the Stripe Checkout page.

After payment is successful, the application enables the Plan.

Managing Subscription

Users can cancel, upgrade, or downgrade a plan.

When users click on Manage Subscription, they are redirected to the Stripe Customer Portal.

Upgrading or Downgrading a Plan

When users upgrade or downgrade a plan on the customer portal, a webhook is triggered, and the application is updated.

Canceling a Plan

When users cancel a plan, it is not canceled immediately, because they paid for the full period. The plan is marked to cancel at the end period and remains active until then.

Features

Permissions/Features can be configured by plan.

Page Access

When a plan is enabled, its features are also enabled. It's explained in detail on Architecture > Payments.

On the demonstration, all paid plans enable the Premium entity.

Action Access

You can also restrict access to specific actions.

For example, if we change the demonstration code to enable the Free plan to read the Premium entity, free users will be able to see the Premium listing, but not to Create, Edit, or Delete records.

Restrictions for Workspaces and Admins

The user who subscribed to the plan is the only one that can modify it

This avoids that different users make charges to other's credit cards.

You can't delete a workspace that has an active plan

Plans marked as cancel at the end period can be deleted, because there won't be any charges in the future for that plan.

You can't delete the plan manager or remove its admin permission