Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stripe Integration #886

Merged
merged 60 commits into from
Feb 15, 2024
Merged

Stripe Integration #886

merged 60 commits into from
Feb 15, 2024

Conversation

ukrocks007
Copy link
Contributor

@ukrocks007 ukrocks007 commented Jan 2, 2024

This PR adds Stripe Integration to the saas-starter-kit. Fixes #12

How to test:

  • Create an account on Stripe.
  • Get the Secret Key from API Keys section.
  • Install Stripe Cli and authenticate
  • Create products and prices using the Stripe dashboard
  • Run npm run sync-stripe to ensure db & stripe have the same set of active products and prices.
  • Run stripe listen --forward-to=localhost:4002/api/webhooks/stripe in a terminal to forward the webhook events to local apis
  • Run the app with npm run dev
  • Test Credit Card number: 4242 4242 4242 4242

Add Stripe hostname to next.config.js
Add translations for subscriptions, from, and to
Add StripeTeam and StripeSubscription models
Add API endpoints for creating portal link and checkout session
Remove deprecated API endpoint for creating portal link
@ukrocks007 ukrocks007 added the enhancement New feature or request label Jan 2, 2024
@ukrocks007 ukrocks007 requested a review from a team January 2, 2024 13:09
@ukrocks007 ukrocks007 self-assigned this Jan 2, 2024
Copy link

socket-security bot commented Jan 2, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 9.33 kB namenyi
npm/[email protected] network, shell Transitive: eval +17 8.14 MB stripe-bindings

View full report↗︎

@ukrocks007 ukrocks007 marked this pull request as ready for review January 2, 2024 13:55
Copy link
Contributor

@devkiran devkiran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharing some nitpicks. I haven't tested the integration yet. Need to configure Stripe first.

lib/env.ts Outdated Show resolved Hide resolved
lib/stripe.ts Outdated Show resolved Hide resolved
models/stripeTeam.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
pages/api/teams/[slug]/payments/create-portal-link.ts Outdated Show resolved Hide resolved
pages/teams/[slug]/payments.tsx Outdated Show resolved Hide resolved
locales/en/common.json Outdated Show resolved Hide resolved
@ukrocks007 ukrocks007 requested a review from devkiran January 9, 2024 18:25
prisma/schema.prisma Outdated Show resolved Hide resolved
@deepakprabhakara deepakprabhakara self-requested a review February 13, 2024 12:34
# Conflicts:
#	package-lock.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Billing & subscriptions
5 participants