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: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 providerExample 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:
| Change | Migration |
|---|---|
entitlementsUpdated event payload changed from Map<string, CachedEntitlement> to CustomerEntitlementsResultV2 | Update listeners to iterate .entitlements (an EntitlementV2[] array) instead of a Map. |
EntitlementsState type removed | Replace imports with CustomerEntitlementsResult. |
getNumericEntitlement() on a metered feature now returns a FeatureTypeMismatch fallback | Use getMeteredEntitlement() for metered features. |
CreditEntitlementCurrency named export removed | Use CreditEntitlement['currency'] inline type instead. |
