Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

clerk/use-stripe-subscription-demo

Repository files navigation

Warning

This repository has been archived as of January 11, 2024 and will not be further maintained. If you are curious about this repo and looking for help, please join our Discord https://clerk.com/discord

use-stripe-integration-demo

This is a demo implementation of use-stripe-subscription

To test it locally, .env.local must be populated with Stripe and Clerk environment variables according to the template in .env.local.example.

In addition to subscription management, this repository incorporates feature-gating via Stripe metadata.

In React, feature gating works via: <Gate feature="feature1">

In an API route, feature gating works via: customerHasFeature({customerId, "feature2"})

Both gates will deny the user unless you configure your Stripe Product's metadata with features set to feature1,feature2. Feature gating works with arbitrary strings.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published