> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stigg.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing table

## Overview

Pricing tables allow your customers to select the plan that that they'd like to subscribe to. Pricing tables can be used on your public pricing page, as well as part of in-app paywalls.

One of the major benefits of leverage Stigg's pricing table widget, is that any change that you make to your pricing model is auto-magically reflected in the pricing table - no additional coding is required 😎.

## Pricing table layout

Pricing tables includes cards that represent each plan that customres can subscribe to.

Each plan includes the following details:

1. **Plan name**
2. **CTA button** to allow users to select the plan.
3. **Price**
4. **Entitlements** that the customer will get access to when subscribing to the plan. Entitlement [visibility](/documentation/modeling-your-pricing-in-stigg/plans#controlling-the-entitlement-visibility), [order](/documentation/modeling-your-pricing-in-stigg/plans#defining-the-entitlement-order) and [display text](/documentation/modeling-your-pricing-in-stigg/plans#customizing-the-entitlement-display-text) can be defined at the plan level.
5. **Available add-ons** - available add-ons are defined according to the list of add-ons that are [compatible with the plan](/documentation/modeling-your-pricing-in-stigg/add-ons#defining-add-on-compatibility-with-specific-plans). [Add-on visibility](/documentation/modeling-your-pricing-in-stigg/add-ons#controlling-the-add-on-visibility) is defined at the add-on level.

<img src="https://mintcdn.com/stigg/8tviKNnHCor59SIf/images/docs/pricing_table_overview.png?fit=max&auto=format&n=8tviKNnHCor59SIf&q=85&s=df633f6d7c0fe69ec26ec75c0e6cb045" alt="" width="2164" height="1568" data-path="images/docs/pricing_table_overview.png" />

<Warning>
  When integrating Stigg widgets into your application, it's highly recommended to [enable client-side security enforcement](/api-and-sdks/integration/frontend/hardening-client-side-access), especially in production environments.
</Warning>

## Rendering pricing tables

### In public pricing pages

Rendering Stigg's pricing table widget on your public pricing page allows you to present the available pricing to your website's visitors.

You can leverage the [product's customer journey](../modeling-your-pricing-in-stigg/products#defining-the-customer-journey) configuration to control what plan the customer will be provisioned a subscription for once they click on "Get started".

<img src="https://mintcdn.com/stigg/vKl0Sj1YLcCT0yUv/images/docs/3afa385-image.png?fit=max&auto=format&n=vKl0Sj1YLcCT0yUv&q=85&s=140a265214df7e99c90401925ed5347a" alt="" width="1816" height="1350" data-path="images/docs/3afa385-image.png" />

<CodeGroup>
  ```typescript React theme={null}
  <Paywall
     onPlanSelected={({ plan, intentionType }) => {  
       switch(intentionType) {
          case SubscribeIntentionType.START_TRIAL:
            // TODO: provision trial subscription
            break;
          case SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS:
            // TODO: redirect to contact us form
            break;
          case SubscribeIntentionType.UPGRADE_PLAN:
          case SubscribeIntentionType.DOWNGRADE_PLAN:
            // TODO: show checkout experience
            break;
       }
    }}  
  />
  ```

  ```typescript Vue.js theme={null}
  <script setup lang="ts">
  import {
    StiggProvider, StiggProviderProps, Paywall, PaywallProps
  } from '@stigg/vue-sdk';

  const stiggProvider: StiggProviderProps = {
    apiKey: "<STIGG_CLIENT_API_KEY>",
  }

    
  const paywall: PaywallProps = {
     onPlanSelected: ({plan}) => {
      	// TODO: handle customer intention to subscribe to plan  
     }
  }
  </script>

  <template>
     <StiggProvider v-bind="stiggProvider">
        <Paywall v-bind="paywall" />
     </StiggProvider>
  </template>
  ```

  ```html html theme={null}
  <body>
    <div id="paywall"/>
  </body>

  <script>
    const stigg = Stigg({
        apiKey: "<STIGG_CLIENT_API_KEY>",
      });
    
      const paywall = stigg.Paywall({
        onPlanSelected: (...args) => {
      		// TODO: handle customer intention to subscribe to plan  
        },
      });

      // mount the paywall to the container element
      paywall.mount('#paywall');
  </script>
  ```
</CodeGroup>

### In-app paywalls

To render paywalls inside your application, when a customer signs-in or restores their session set the customer ID:

<CodeGroup>
  ```typescript React theme={null}
  import { StiggProvider } from '@stigg/react-sdk';

  export function App() {
    return (
      <StiggProvider apiKey="<STIGG_CLIENT_API_KEY>" customerId="<LOGGED_IN_CUSTOMER_ID>">
        <NestedComponents />
      </StiggProvider>
    );
  }
  ```

  ```typescript Vue.js theme={null}
  <script setup lang="ts">
  import { StiggProvider, StiggProviderProps } from '@stigg/vue-sdk';

  const stiggProvider: StiggProviderProps = {
    apiKey: "<STIGG_CLIENT_API_KEY>",
    customerId: "<LOGGED_IN_CUSTOMER_ID>",
  };

  </script>

  <template>
     <StiggProvider v-bind="stiggProvider">
        <NestedComponents />
     </StiggProvider>
  </template>
  ```
</CodeGroup>

#### Downgrades and upgrades

Users that are logged in to the application can view the current plan that they're subscribed to, as well as downgrade and upgrade options.

<img src="https://mintcdn.com/stigg/ghlUDOmd1mRIOf61/images/docs/1a0e094-Screenshot_2023-09-11_at_13.40.04.png?fit=max&auto=format&n=ghlUDOmd1mRIOf61&q=85&s=8ae0eae383ccea969cb626691d1b5545" alt="" width="2144" height="1360" data-path="images/docs/1a0e094-Screenshot_2023-09-11_at_13.40.04.png" />

<CodeGroup>
  ```typescript React theme={null}
  <Paywall
     onPlanSelected={({ plan, customer, intentionType }) => {  
       switch(intentionType) {
          case SubscribeIntentionType.START_TRIAL:
            // TODO: provision trial subscription
            break;
          case SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS:
            // TODO: redirect to contact us form
            break;
          case SubscribeIntentionType.CHANGE_UNIT_QUANTITY:
          case SubscribeIntentionType.UPGRADE_PLAN:
          case SubscribeIntentionType.DOWNGRADE_PLAN:
            // TODO: show checkout experience
            break;
          case SubscribeIntentionType.CANCEL_SCHEDULED_UPDATES:
            // TODO: show confirmation dialog
            // once confirmed, cancel the scheduled subscription update
            break;
       }
    }}  
  />
  ```

  ```typescript Vue.js theme={null}
  <script setup lang="ts">
  import {
    StiggProvider, StiggProviderProps, Paywall, PaywallProps
  } from '@stigg/vue-sdk';

  const paywall: PaywallProps = {
     onPlanSelected: ({plan}) => {
      // TODO: handle customer intention to subscribe to plan  
     }
  }
  </script>

  <template>
     <StiggProvider v-bind="stiggProvider">
        <Paywall v-bind="paywall" />
     </StiggProvider>
  </template>
  ```
</CodeGroup>

#### Upgrade only

It's also possible to only present the upgrade options (and hide lower tier/free plans); thereby, encouraging customers to upsell:

<img src="https://mintcdn.com/stigg/vKl0Sj1YLcCT0yUv/images/docs/3972b12-Screenshot_2023-09-11_at_13.58.14.png?fit=max&auto=format&n=vKl0Sj1YLcCT0yUv&q=85&s=29da87de81c7d9efb9959d6a258f1745" alt="" width="1358" height="1372" data-path="images/docs/3972b12-Screenshot_2023-09-11_at_13.58.14.png" />

<CodeGroup>
  ```typescript React theme={null}
  <Paywall
     showOnlyEligiblePlans
     onPlanSelected={({ plan, customer, intentionType }) => {
        switch(intentionType) {
          case SubscribeIntentionType.START_TRIAL:
            // TODO: provision trial subscription
            break;
          case SubscribeIntentionType.REQUEST_CUSTOM_PLAN_ACCESS:
            // TODO: redirect to contact us form
            break;
          case SubscribeIntentionType.CHANGE_UNIT_QUANTITY:
          case SubscribeIntentionType.UPGRADE_PLAN:
          case SubscribeIntentionType.DOWNGRADE_PLAN:
            // TODO: show checkout experience
            break;
          case SubscribeIntentionType.CANCEL_SCHEDULED_UPDATES:
            // TODO: show confirmation dialog
            // once confirmed, cancel the scheduled subscription update
            break;
        }
    }}  
  />
  ```

  ```typescript Vue.js theme={null}
  <script setup lang="ts">
  import {
    StiggProvider, StiggProviderProps, Paywall, PaywallProps
  } from '@stigg/vue-sdk';

  const paywall: PaywallProps = {
     showOnlyEligiblePlans: true,
     onPlanSelected: ({plan}) => {
       // TODO: handle customer intention to subscribe to plan  
     }
  }
  </script>

  <template>
     <StiggProvider v-bind="stiggProvider">
        <Paywall v-bind="paywall" />
     </StiggProvider>
  </template>
  ```
</CodeGroup>

#### Tiered and volume pricing

When [tiered](../modeling-your-pricing-in-stigg/plans#tiered) and [volume](../modeling-your-pricing-in-stigg/plans#volume) pricing is defined, this is automatically reflected in the Stigg pricing table widget with a numeric up-down picker where customers can choose their desired unit quantity:

<img src="https://mintcdn.com/stigg/_E1NPxWRKvYZ5hDE/images/docs/8a51d11-Screenshot_2024-02-15_at_12.23.04.png?fit=max&auto=format&n=_E1NPxWRKvYZ5hDE&q=85&s=ee56b99ddd0cdba3368ed795d9fe8a9d" alt="" width="2022" height="1130" data-path="images/docs/8a51d11-Screenshot_2024-02-15_at_12.23.04.png" />

#### Stair-step pricing

When [stair-step](../modeling-your-pricing-in-stigg/plans#stair-step) pricing is defined, this is automatically reflected in the Stigg pricing table widget with a drop-down where customers can choose their desired tier:

<img src="https://mintcdn.com/stigg/rbfzdbhZ6y5pB9n-/images/docs/9375184-image.png?fit=max&auto=format&n=rbfzdbhZ6y5pB9n-&q=85&s=786328062fbbb7bdcaed5c070d291921" alt="" width="2054" height="1136" data-path="images/docs/9375184-image.png" />

## Customization

### No-code widget designer

The Stigg app offers a no-code widget designer, which allows you to control the widget colors, typography and layout.

<img src="https://mintcdn.com/stigg/UlAt5XRaB6FPzp-f/images/docs/0f5152e-image.png?fit=max&auto=format&n=UlAt5XRaB6FPzp-f&q=85&s=cc22cb00fdb4e4d5072c063a6649b949" alt="" width="3094" height="1766" data-path="images/docs/0f5152e-image.png" />

### Custom CSS

For more advanced customization, custom CSS can be applied using the widget designer of the Stigg app. Alternatively, custom CSS can also be applied using code.

Below you can find a list of the supported CSS classes:

#### General layout

| Class name                 | Description                                     |
| -------------------------- | ----------------------------------------------- |
| stigg-paywall-layout       | Styles applied to the entire paywall page       |
| stigg-paywall-plans-layout | Styles applied to the container of all plans    |
| stigg-starting-at-text     | Styles applied to the plan price starts at text |

#### Billing period switcher

| Class name                    | Description                                                 |
| ----------------------------- | ----------------------------------------------------------- |
| stigg-period-picker-container | Styles applied to the period toggle section                 |
| stigg-period-switch           | Styles applied to the period switch button                  |
| stigg-monthly-period-text     | Styles applied to the monthly period text                   |
| stigg-annual-period-text      | Styles applied to the annual period text                    |
| stigg-discount-rate-text      | Styles applied to the discount rate given to annual billing |

#### Plan card

| Class name                       | Description                                                                           |
| -------------------------------- | ------------------------------------------------------------------------------------- |
| stigg-plan-offering-container    | Styles applied to the plan container                                                  |
| stigg-header-wrapper             | Styles applied to the plan header section                                             |
| stigg-plan-header                | Styles applied to the title of the plan                                               |
| stigg-price-text                 | Styles applied to the price of the plan                                               |
| stigg-plan-description           | Styles applied to the description of the plan                                         |
| stigg-price-billing-period-text  | Styles applied to the text stating the billing period of the plan                     |
| stigg-plan-header-divider        | Styles applied to the divider between the header section and entitlements section     |
| stigg-paywall-plan-button-layout | Styles applied to the button section                                                  |
| stigg-paywall-plan-button        | Styles applied to the button of the plan                                              |
| stigg-paywall-plan-button-text   | Styles applied to the text of the button                                              |
| stigg-highlight-badge            | Styles applied to the recommended plan badge                                          |
| stigg-highlight-badge-text       | Styles applied to the recommended plan badge text                                     |
| stigg-trial-days-left-text       | Styles applied to the text describing how many days are left of the plan's free trial |
| stigg-`{plan.id}`                | Styles applied to specific plans according to their unique ID                         |

#### Plan entitlements

| Class name                               | Description                                                               |
| ---------------------------------------- | ------------------------------------------------------------------------- |
| stigg-plan-entitlements-container        | Styles applied to the entire section                                      |
| stigg-plan-entitlements-title            | Styles applied to the title of the section                                |
| stigg-entitlement-row-container          | Styles applied to the area of each entitlement                            |
| stigg-entitlement-name                   | Styles applied to the text of each entitlement                            |
| stigg-entitlement-row-icon               | Styles applied to the icon of each entitlement                            |
| stigg-entitlement-feature-`{feature.id}` | Styles applied to a specific entitlement row using its feature ID (slug). |

<Note>
  `{feature.id}` is the feature’s slug (lowercase; spaces and special characters become `-`).\
  This class is added **in addition to** `stigg-entitlement-row-container`, so you can safely target one entitlement without affecting others.\
  Mirrors the existing patterns: `stigg-{plan.id}` (plan) and `stigg-compatible-addon-{addon.id}` (add-on).
</Note>

#### Plan add-ons

| Class name                         | Description                                                 |
| ---------------------------------- | ----------------------------------------------------------- |
| stigg-compatible-addons-container  | Styles applied to the entire section                        |
| stigg-compatible-addons-header     | Styles applied to the title of the section                  |
| stigg-compatible-addons-list       | Styles applied to the add-on list                           |
| stigg-compatible-addon-item        | Styles applied to every row in the add-on list              |
| stigg-compatible-addon-\{addon.id} | Styles applied to a specific add-on row using its add-on ID |
| stigg-compatible-addon-icon        | Styles applied to the icon of each add-on                   |
| stigg-compatible-addon-content     | A wrapper around the add-on name                            |
| stigg-compatible-addon-name        | Styles applied to the add-on name                           |

### Texts

The default widget texts can currently be overridden using code:

<CodeGroup>
  ```javascript React theme={null}
  const textOverrides = {  
      highlightChip: 'Best value',  
      planCTAButton: {  
          startTrial: (plan: Plan) => `Start trial (${plan.defaultTrialConfig.duration} days)`,  
          upgrade: 'Start now',
          custom: 'Contact us',  
          switchToBillingPeriod: billingPeriod => `Switch to ${billingPeriod.toLowerCase()}`,
          cancelScheduledUpdate: 'Cancel update',
      },  
      price: {  
          custom: 'Contact us',  
      },  
  }

  <Paywall  
      highlightedPlanId="plan-id"  
      onPlanSelected={({ plan, customer }) => {  
          ...  
      }}  
      textOverrides={textOverrides}  
  />
  ```
</CodeGroup>

<Note>
  You can find additional text override options [here](https://react-sdk-docs.stigg.io/types/paywalllocalization)
</Note>

## Additional resources

<Card title="Pricing Table Properties" icon="table-list" href="https://react-sdk-docs.stigg.io/types/paywallprops" horizontal />

<Card title="Global Theming Customization" icon="palette" href="https://docs.stigg.io/docs/react-sdk#global-theming" horizontal />

## Related SDKs

<CardGroup cols={2}>
  <Card title="" href="/api-and-sdks/integration/frontend/react" horizontal>
    <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
      <img src="https://mintcdn.com/stigg/FZ_ywutvYHnQbKpn/images/react.svg?fit=max&auto=format&n=FZ_ywutvYHnQbKpn&q=85&s=75e8661a7d87b8e2b3493d7fdfb33db9" alt="React" style={{ width: '32px' }} width="23" height="20" data-path="images/react.svg" />

      <span>React</span>
    </div>
  </Card>

  <Card title="" href="/api-and-sdks/integration/frontend/vuejs" horizontal>
    <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
      <img src="https://mintcdn.com/stigg/qpsRT7dNo0hXTxnb/images/vue.svg?fit=max&auto=format&n=qpsRT7dNo0hXTxnb&q=85&s=c861442fd84f9822a716d778b10a8dba" alt="Vue.js" style={{ width: '32px' }} width="800" height="800" data-path="images/vue.svg" />

      <span>Vue.js</span>
    </div>
  </Card>

  <Card title="" href="/api-and-sdks/integration/frontend/nextjs" horizontal>
    <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
      <img src="https://mintcdn.com/stigg/FZ_ywutvYHnQbKpn/images/next.svg?fit=max&auto=format&n=FZ_ywutvYHnQbKpn&q=85&s=7fea95b3e8f678015cb8b8d58d1e7886" alt="Next.js" style={{ width: '32px' }} width="16" height="16" data-path="images/next.svg" />

      <span>Next.js</span>
    </div>
  </Card>

  <Card title="" href="/api-and-sdks/integration/frontend/html" horizontal>
    <div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
      <img src="https://mintcdn.com/stigg/aJeGPh9dwMpK_Kcr/images/html.svg?fit=max&auto=format&n=aJeGPh9dwMpK_Kcr&q=85&s=ae948dc9e5ca66cf75892b94859954a0" alt="Webflow, Wordpress, HTML" style={{ width: '32px' }} width="800" height="800" data-path="images/html.svg" />

      <span>Webflow, Wordpress, HTML</span>
    </div>
  </Card>
</CardGroup>
