4.16.0 • Published 3 months ago

@stigg/vue-sdk v4.16.0

Weekly downloads
-
License
-
Repository
-
Last release
3 months 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.16.0

3 months ago

4.9.0

7 months ago

4.12.0

6 months ago

4.14.0

5 months ago

4.10.0

7 months ago

4.15.0

5 months ago

4.11.0

6 months ago

4.13.0

5 months ago

4.8.0

9 months ago

4.7.0

9 months ago

4.6.0

10 months ago

4.5.0

1 year ago

4.4.0

1 year ago

4.3.0

1 year ago

4.2.0

1 year ago

4.1.0

1 year ago

4.0.0

1 year ago

3.25.0

2 years ago

3.24.0

2 years ago

3.23.1

2 years ago

3.22.0

2 years ago

3.23.0

2 years ago

3.21.0

2 years ago

3.20.0

2 years ago

3.19.0

2 years ago

3.18.0

2 years ago

1.4.0

2 years ago

2.2.0

2 years ago

3.15.0

2 years ago

3.9.0

2 years ago

2.0.0

2 years ago

3.4.0

2 years ago

3.2.0

2 years ago

3.8.0

2 years ago

3.10.0

2 years ago

3.6.0

2 years ago

3.12.0

2 years ago

3.0.0

2 years ago

1.3.0

2 years ago

2.3.0

2 years ago

3.14.0

2 years ago

3.16.0

2 years ago

2.1.0

2 years ago

3.3.0

2 years ago

3.1.0

2 years ago

3.11.0

2 years ago

3.7.0

2 years ago

3.13.0

2 years ago

3.5.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

0.11.0

2 years ago

0.12.0

2 years ago

0.13.0

2 years ago

0.14.0

2 years ago

0.15.0

2 years ago

0.10.0

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.2

2 years ago

0.5.1

2 years ago

0.5.0

2 years ago

0.4.1

2 years ago

0.4.2

2 years ago

0.4.0

2 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.0.1

3 years ago