4.4.0 • Published 1 month ago

@stigg/vue-sdk v4.4.0

Weekly downloads
-
License
-
Repository
-
Last release
1 month ago

@stigg/vue-sdk

Stigg SDK for Vue 3 applications.

Table of contents

Installation

Using npm

npm install @stigg/vue-sdk

Using yarn

yarn add @stigg/vue-sdk

Getting Started

Configure the SDK by wrapping your application in StiggProvider:

<script setup lang="ts">
import { StiggProvider, StiggProviderProps } from '@stigg/vue-sdk';

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

</script>

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

Or in a context of a specific customer:

<script setup lang="ts">
import { StiggProvider, StiggProviderProps } from '@stigg/vue-sdk';

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

</script>

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

Paywall

Use Paywall component to render the public pricing page or customer paywall:

<script setup lang="ts">
import { Paywall, PaywallProps } from '@stigg/vue-sdk';

const paywall: PaywallProps = {
   onPlanSelected: ({plan}) => {
      console.log(`Selected plan: ${plan.displayName}`);
   }
};

</script>

<template>
  <Paywall v-bind="paywall" />
</template>

Customer Portal

Use the Customer Portal component to provide customers with visibility to their current subscription details:

<script setup lang="ts">
import { CustomerPortal, CustomerPortalProps, Paywall, PaywallProps } from '@stigg/vue-sdk';

const customerPortal: CustomerPortalProps = {
   onManageSubscription: () => {
     console.log('Manage subscription');
   }
};

const paywall: PaywallProps = {
  onPlanSelected: ({plan}) => {
    console.log(`Selected plan: ${plan.displayName}`);
  }
};

</script>

<template>
  <CustomerPortal v-bind="customerPortal">
    <template v-slot:paywall-component>
      <Paywall v-bind="paywall" />
    </template>
  </CustomerPortal>
</template>
4.4.0

1 month ago

4.3.0

3 months ago

4.2.0

3 months ago

4.1.0

3 months ago

4.0.0

4 months ago

3.25.0

4 months ago

3.24.0

4 months ago

3.23.1

4 months ago

3.22.0

4 months ago

3.23.0

4 months ago

3.21.0

5 months ago

3.20.0

5 months ago

3.19.0

5 months ago

3.18.0

5 months ago

1.4.0

10 months ago

2.2.0

9 months ago

3.15.0

7 months ago

3.9.0

8 months ago

2.0.0

10 months ago

3.4.0

9 months ago

3.2.0

9 months ago

3.8.0

8 months ago

3.10.0

8 months ago

3.6.0

8 months ago

3.12.0

8 months ago

3.0.0

9 months ago

1.3.0

10 months ago

2.3.0

9 months ago

3.14.0

8 months ago

3.16.0

5 months ago

2.1.0

10 months ago

3.3.0

9 months ago

3.1.0

9 months ago

3.11.0

8 months ago

3.7.0

8 months ago

3.13.0

8 months ago

3.5.0

8 months ago

1.2.0

11 months ago

1.1.0

11 months ago

1.0.0

12 months ago

0.11.0

1 year ago

0.12.0

12 months ago

0.13.0

12 months ago

0.14.0

12 months ago

0.15.0

12 months ago

0.10.0

1 year ago

0.9.0

1 year ago

0.8.0

1 year ago

0.7.0

1 year ago

0.6.0

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.1

1 year ago

0.4.2

1 year ago

0.4.0

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.0.1

1 year ago