# Your pricing group

Put your published plan versions in a pricing group, publish it, and render it in your app by its slug, so your customers can see the plans and check out.

A pricing group is the set of plans your pricing page shows, side by side. Your app asks for it by its slug, and checkout takes a plan version that a pricing group sells. Like a plan, a group has versions: you add plan versions to a draft, put them in order and publish it.

> **Note:**

- At least one published plan version ([Your first plan](/billing-setup/first-plan)).
- A console role that can create pricing groups and their versions.

## 1. Create the group

[Open pricing groups in the console](https://console.buildbase.app/dashboard/admin/subscriptions/groups)

In the **Billing** menu choose **Pricing groups**, then press **Create group**. Fill **Name** and **Slug**, here `Main pricing` and `main-pricing`: the slug is what your pricing page asks for. Leave **Who pays** on **A workspace** for plans a workspace buys. Press **Create**.

![The Create pricing group dialog: Name Main pricing and Slug main-pricing highlighted as step 1, Who pays A workspace, a description, and the Create button](/images/billing-setup/pricing-group/console-create-group.webp)

**Who pays** is locked once a version of the group is published: "A workspace plan is bought for a workspace; a person buys a plan for themself."

## 2. Manage versions

On the group's row, press **Manage versions**.

![All pricing groups with the Main pricing row, Active, and Manage versions highlighted as step 2](/images/billing-setup/pricing-group/console-group-manage-versions.webp)

## 3. Create the first version

Press **Create version**. With no published version to copy yet, the dialog starts from scratch. Press **Create version** in it.

![The Create group version dialog: Base version Start from scratch, No published versions available, and the Create version button highlighted as step 3](/images/billing-setup/pricing-group/console-create-group-version.webp)

## 4. Open the draft

Press **Edit** on **v1**. Under **Plan versions**, press **Add plan version**.

![The draft v1 of Main pricing: Version information, an empty Plan versions card, and Add plan version highlighted as step 4](/images/billing-setup/pricing-group/console-group-version-draft.webp)

## 5. Add your plan versions

**Add plan versions** lists your published plan versions. Tick each one the page should show, here **Pro - v1**, and press **Select**.

![Add plan versions with Pro - v1, Published, priced in EUR and USD, ticked, and Select (1) highlighted as step 5](/images/billing-setup/pricing-group/console-add-plan-versions.webp)

With more than one plan, use the arrows beside each to put them in order, from the base plan up.

## 6. Save the draft

Press **Save changes**. **Pricing group preview**, below the plans, compares their prices, features, limits and quotas in each currency and interval.

![The draft with Pro - v1 under Plan versions, the Pricing group preview showing €27.00/month for Pro, and Save changes highlighted as step 6](/images/billing-setup/pricing-group/console-group-save.webp)

## 7. Publish it

Press **Publish version**. Once published, the group version cannot be changed; a later change is a new version.

![The saved draft with Publish version highlighted as step 7, beside Save changes](/images/billing-setup/pricing-group/console-group-publish.webp)

## 8. Show it in your app

Render the group by its slug with `PricingPage`, from `@buildbase/sdk/react`:

```tsx
import { PricingPage } from '@buildbase/sdk/react';

function Pricing() {
  return (
    <PricingPage slug="main-pricing">
      {({ loading, error, plans, selectPlan }) => {
        if (loading) return <p>Loading plans...</p>;
        if (error) return <p>{error}</p>;
        return plans.map((plan) => (
          <button
            key={plan._id}
            onClick={() => selectPlan(plan._id, 'monthly', 'usd')}
          >
            Choose {plan.name}
          </button>
        ));
      }}
    </PricingPage>
  );
}
```

[Pricing page](/billing/pricing-page) covers the rest: the comparison table, highlighted items and metered allowances.

## Check that it worked

**Billing** > **Pricing groups** > **Manage versions** lists **v1** as **Current** and **Published**, with its plans.

![Group versions with v1 marked Current and Published, 1 plan, Active, and a View button](/images/billing-setup/pricing-group/console-group-published.webp)

On the plan version page, **Sold to** now reads **Workspaces**, the payer of the group it sits in, in place of **Not in a pricing group yet**.

## Things to watch out for

- **Only published plan versions can be added.** Publish the plan version first.
- **A plan version in no group cannot be checked out from your app.** It answers "Plan version not found"; for a one-off deal, create a checkout session with the org API instead ([billing overview](/billing/overview)).
- **A group version that lists an archived plan cannot be published.**

## Next steps

- [Your first test subscription](/billing-setup/first-subscription) - subscribe from your app with Stripe's test card
- [Pricing page](/billing/pricing-page) - render the group, its comparison table and metered allowances
- [Billing overview](/billing/overview) - checkout, plan changes, trials and cancellations
- [Entitlements](/billing/entitlements) - read what a workspace's plan includes
