Skip to main content

Overview

Stigg’s Vue SDK is a Javascript library for embedding self-service components in Vue 3 apps. It is based on React SDK components under the hood.

Installing the SDK

Install the @stigg/vue-sdk package in your project using one of the below method:

From npm:

From yarn:

Retrieving the publishable key

In the Stigg app, go to Integrations > API keys. Copy the Publishable key of the relevant environment.

Getting started

Import the library’s CSS styles:
Configure the SDK by wrapping your application in StiggProvider:

Rendering widgets

Allow customers to select the plan that that they’d like to subscribe to from your public pricing page or in-app paywall Introduce self-service and drive in-app expansions using only a few lines of codes Easily accept payments without ever worrying about changes to your pricing model or migration to another billing provider

Example project

stiggio/vue-react-sdk

Migrating to v7.0.0

Bumped @stigg/react-sdk to 9.0.0. All types are re-exported via export type * from '@stigg/react-sdk', so the following breaking changes are inherited:
ChangeMigration
entitlementsUpdated event payload changed from Map<string, CachedEntitlement> to CustomerEntitlementsResultV2Update listeners to iterate .entitlements (an EntitlementV2[] array) instead of a Map.
EntitlementsState type removedReplace imports with CustomerEntitlementsResult.
getNumericEntitlement() on a metered feature now returns a FeatureTypeMismatch fallbackUse getMeteredEntitlement() for metered features.
CreditEntitlementCurrency named export removedUse CreditEntitlement['currency'] inline type instead.

SDK changelog

Vue.js SDK changelog