Socket
Book a DemoInstallSign in
Socket

@stigg/vue-2-sdk

Package Overview
Dependencies
Maintainers
9
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stigg/vue-2-sdk

Stigg SDK for Vue 2 applications.

latest
npmnpm
Version
0.0.6
Version published
Weekly downloads
62
-28.74%
Maintainers
9
Weekly downloads
 
Created
Source

@stigg/vue-2-sdk

Stigg SDK for Vue 2 applications.

Table of contents

  • Installation
  • Paywall
  • Customization

Installation

Using npm

npm install @stigg/vue-2-sdk

Using yarn

yarn add @stigg/vue-2-sdk

Getting Started

Configure the SDK by wrapping your application in StiggProvider:

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

const apiKey = "<STIGG_CLIENT_API_KEY>";
</script>

<template>
   <StiggProvider :apiKey="apiKey">
      <NestedComponents />
   </StiggProvider>
</template>

Paywall

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

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

const apiKey = "<STIGG_CLIENT_API_KEY>";

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

<template>
   <StiggProvider :apiKey="apiKey">
      <Paywall v-bind="paywall" />
   </StiggProvider>
</template>

Customer Portal

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

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

const apiKey = "<STIGG_CLIENT_API_KEY>";

const customerId = "<CUSTOMER-ID>";

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

<template>
   <StiggProvider :apiKey="apiKey" :customer-id="customerId">
      <CustomerPortal v-bind="customerPortal"/>
   </StiggProvider>
</template>

FAQs

Package last updated on 19 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts